search for: ms_rdon

Displaying 20 results from an estimated 48 matches for "ms_rdon".

Did you mean: ms_rdonly
2010 Nov 25
0
[RFC PATCH 2/4] Btrfs: add MS_RDONLY to avoid backgroud writeback
...ommit_transaction(struct btrfs_trans_handle *trans, unsigned long now = get_seconds(); int flush_on_commit = btrfs_test_opt(root, FLUSHONCOMMIT); + /* + * Since some error may force btrfs readonly, this can + * avoid backgroud writeback. + */ + if (root->fs_info->sb->s_flags & MS_RDONLY) + return 0; + btrfs_run_ordered_operations(root, 0); /* make a pass through all the delayed refs we have so far -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at htt...
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
...text when an IO is @@ -1700,6 +1702,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, if (!btrfs_super_root(disk_super)) goto fail_iput; + /* check filesystem state */ + fs_info->fs_state |= btrfs_super_flags(disk_super); + + btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY); + ret = btrfs_parse_options(tree_root, options); if (ret) { err = ret; @@ -2405,10 +2412,17 @@ int btrfs_commit_super(struct btrfs_root *root) up_write(&root->fs_info->cleanup_work_sem); trans = btrfs_join_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans...
2003 Jan 29
0
Ext3, orphans and read-only
...that reorders the tests in orphan_cleanup. It works on 2.4.9-e.10 and 2.4.18-19. A very similar patch should work on 2.5.59. --- linux-as/fs/ext3/super.c.orig Wed Jan 29 08:53:59 2003 +++ linux-as/fs/ext3/super.c Wed Jan 29 08:57:51 2003 @@ -815,12 +815,6 @@ return; } - if (s_flags & MS_RDONLY) { - printk(KERN_INFO "EXT3-fs: %s: orphan cleanup on readonly fs\n", - bdevname(sb->s_dev)); - sb->s_flags &= ~MS_RDONLY; - } - if (sb->u.ext3_sb.s_mount_state & EXT3_ERROR_FS) { if (es->s_last_orphan) jbd_debug(1, "Errors on filesystem, &quo...
2012 Mar 08
3
[PATCH 0/3] kinit: Allow mount options
This patch series allows user-specified mount commands to be sent in via kernel command line ("kinit_mount=...") or via an embedded /etc/fstab file. The first patch is a cleanup of a patch sent last November by San Mehat (http://web.archiveorange.com/archive/v/EazJNBMORV2U7E0coh5h); the next two are small improvements or bug fixes.
1997 Apr 07
2
amd 920824upl102 ignores the nodev option
amd from the amd-920824upl102-6.i386.rpm file distributed with RedHat Linux 4.1 does not honor the nodev option for NFS filesystems and probably other mount types, allowing any user access to the device files in /dev on a system, provided that they have root access to another linux box on the network. In addition, the default amd.conf from RH 4.1 maps /net/* to NFS mounting, which makes the bug in
2005 Jan 18
0
[PATCH] ext3: commit superblock before panicking
...urnal is aborted before panic() is called. Eric Signed-off-by: Eric Lammerts <eric at lammerts.org> --- linux-2.6.10/fs/ext3/super.c.orig 2005-01-18 15:07:47.673128436 -0500 +++ linux-2.6.10/fs/ext3/super.c 2005-01-18 15:43:55.311501654 -0500 @@ -143,9 +143,6 @@ if (sb->s_flags & MS_RDONLY) return; - if (test_opt (sb, ERRORS_PANIC)) - panic ("EXT3-fs (device %s): panic forced after error\n", - sb->s_id); if (test_opt (sb, ERRORS_RO)) { printk (KERN_CRIT "Remounting filesystem read-only\n"); sb->s_flags |= MS_RDONLY; @@ -156,6 +153,9 @@...
2015 Oct 14
1
Ocfs2-devel Digest, Vol 138, Issue 31 review
...else if (osb->s_mount_opt & OCFS2_MOUNT_ERRORS_CONT) { > + pr_crit("OCFS2: Returning error to the calling process.\n"); > + rv = -EIO; > + } else { /* default option */ > + rv = -EROFS; > + if (sb->s_flags & MS_RDONLY && > + (ocfs2_is_soft_readonly(osb) || > + ocfs2_is_hard_readonly(osb))) > + return rv; > > - ocfs2_set_osb_flag(osb, OCFS2_OSB_ERROR_FS); > - > - if (sb->s_flags & MS_RDONLY &...
2015 Oct 14
1
Ocfs2-devel Digest, Vol 138, Issue 31 review
...else if (osb->s_mount_opt & OCFS2_MOUNT_ERRORS_CONT) { > + pr_crit("OCFS2: Returning error to the calling process.\n"); > + rv = -EIO; > + } else { /* default option */ > + rv = -EROFS; > + if (sb->s_flags & MS_RDONLY && > + (ocfs2_is_soft_readonly(osb) || > + ocfs2_is_hard_readonly(osb))) > + return rv; > > - ocfs2_set_osb_flag(osb, OCFS2_OSB_ERROR_FS); > - > - if (sb->s_flags & MS_RDONLY &...
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
The reason the deadlock is that: Task Btrfs-cleaner umount() down_write(&s->s_umount) sync_filesystem() do auto-defragment and produce lots of dirty pages close_ctree() wait for the end of btrfs-cleaner start_transaction reserve space shrink_delalloc() writeback_inodes_sb_nr_if_idle()
2011 Nov 09
6
[PATCH 0/5] Btrfs: mount error handling fixes
A bunch of fixes (memory leaks, NULL pointer dereferences and devices hanging in busy state) to sanitize error handling during mount sequence. This is on top of for-linus + slyfox''s double-free fix. Thanks, Ilya Ilya Dryomov (5): Btrfs: fix memory leak in btrfs_parse_early_options() Btrfs: fix subvol_name leak on error in btrfs_mount() Btrfs: avoid null dereference and leaks
2009 Jan 24
2
[PATCH] btrfs: flushoncommit mount option
...IT); + break; default: break; } @@ -369,9 +374,8 @@ fail_close: int btrfs_sync_fs(struct super_block *sb, int wait) { struct btrfs_trans_handle *trans; - struct btrfs_root *root; + struct btrfs_root *root = btrfs_sb(sb); int ret; - root = btrfs_sb(sb); if (sb->s_flags & MS_RDONLY) return 0; diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 919172d..b8822d5 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -892,6 +892,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, struct extent_io_tree *pinned_copy; DEFINE_WAIT...
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
...gt;clean_orphans = 1; + } spin_unlock(&fs_info->fs_roots_radix_lock); radix_tree_preload_end(); if (ret) { @@ -1227,10 +1230,6 @@ again: ret = btrfs_find_dead_roots(fs_info->tree_root, root->root_key.objectid); WARN_ON(ret); - - if (!(fs_info->sb->s_flags & MS_RDONLY)) - btrfs_orphan_cleanup(root); - return root; fail: free_fs_root(root); @@ -1689,6 +1688,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, mutex_init(&fs_info->cleaner_mutex); mutex_init(&fs_info->volume_mutex); init_rwsem(&fs_info->extent_commit_sem); +...
2011 Apr 06
3
[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set
...(match_strdup(&args[0]), flags, holder, fs_devices); @@ -715,6 +729,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, fmode_t mode = FMODE_READ; char *subvol_name = NULL; u64 subvol_objectid = 0; + u64 subvol_rootid = 0; int error = 0; if (!(flags & MS_RDONLY)) @@ -722,7 +737,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, error = btrfs_parse_early_options(data, mode, fs_type, &subvol_name, &subvol_objectid, - &fs_devices); + &subvol_rootid, &fs_devices); if (error) return erro...
2016 Jan 06
0
[klibc:master] mount: Implement -o defaults
...ls/mount_opts.c @@ -89,8 +89,13 @@ parse_mount_options(char *arg, unsigned long rwflag, struct extra_opts *extra) break; } - if (res != 0 && s[0]) - add_extra_option(extra, opt); + if (res != 0 && s[0]) { + if (!strcmp(opt, "defaults")) + rwflag &= ~(MS_RDONLY|MS_NOSUID|MS_NODEV| + MS_NOEXEC|MS_SYNCHRONOUS); + else + add_extra_option(extra, opt); + } } return rwflag;
2005 Jun 20
0
[patch 1/3] fs/ext3/super.c: fix sparse warnings
An embedded and charset-unspecified text was scrubbed... Name: sparse-fs_ext3_super.patch URL: <http://listman.redhat.com/archives/ext3-users/attachments/20050620/af49961a/attachment.ksh>
2006 Jun 26
0
[klibc 17/43] sparc32: transfer arch-specific options to /arch.cmd
...ine RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 -extern int root_mountflags; - char reboot_command[COMMAND_LINE_SIZE]; enum sparc_cpu sparc_cpu_model; @@ -328,14 +326,7 @@ #endif } pfn_base = phys_base >> PAGE_SHIFT; - if (!root_flags) - root_mountflags &= ~MS_RDONLY; ROOT_DEV = old_decode_dev(root_dev); -#ifdef CONFIG_BLK_DEV_INITRD - rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK; - rd_prompt = ((ram_flags & RAMDISK_PROMPT_FLAG) != 0); - rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0); -#endif prom_setsync(prom_sync_me); @@ -3...
2010 Jan 15
0
[PATCH] Btrfs: fix regression in orphan cleanup
...@@ -3796,6 +3796,12 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) if (location.type == BTRFS_INODE_ITEM_KEY) { inode = btrfs_iget(dir->i_sb, &location, root); + if (unlikely(root->clean_orphans) && + !(inode->i_sb->s_flags & MS_RDONLY)) { + down_read(&root->fs_info->cleanup_work_sem); + btrfs_orphan_cleanup(root); + up_read(&root->fs_info->cleanup_work_sem); + } return inode; } -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a mes...
2010 Dec 29
0
[PATCH] btrfs: Require CAP_SYS_ADMIN for filesystem rebalance
...x/random.h> #include <linux/iocontext.h> +#include <linux/capability.h> #include <asm/div64.h> #include "compat.h" #include "ctree.h" @@ -1905,6 +1906,9 @@ int btrfs_balance(struct btrfs_root *dev_root) if (dev_root->fs_info->sb->s_flags & MS_RDONLY) return -EROFS; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + mutex_lock(&dev_root->fs_info->volume_mutex); dev_root = dev_root->fs_info->dev_root; -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a me...
2013 Apr 11
0
[PATCH 1/2] Btrfs: fix unblocked autodefraggers when remount
...&fs_info->fs_state); +} +static inline void btrfs_remount_begin(struct btrfs_fs_info *fs_info, + unsigned long old_opts, int flags) +{ if (btrfs_raw_test_opt(old_opts, AUTO_DEFRAG) && (!btrfs_raw_test_opt(fs_info->mount_opt, AUTO_DEFRAG) || (flags & MS_RDONLY))) { @@ -1247,7 +1250,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) unsigned int old_metadata_ratio = fs_info->metadata_ratio; int ret; - btrfs_remount_prepare(fs_info, old_opts, *flags); + btrfs_remount_prepare(fs_info); ret = btrfs_parse_options(root...
2001 Feb 28
2
Samba Compile problems
...e/sys/capability.h:23, from include/includes.h:323, from smbd/server.c:23: /usr/include/linux/fs.h:46: warning: `BLOCK_SIZE' redefined /usr/include/sys/mount.h:28: warning: this is the location of the previous definition /usr/include/linux/fs.h:85: warning: `MS_RDONLY' redefined /usr/include/sys/mount.h:37: warning: this is the location of the previous definition /usr/include/linux/fs.h:86: warning: `MS_NOSUID' redefined /usr/include/sys/mount.h:39: warning: this is the location of the previous definition /usr/include/linux/fs.h:87: warning: `MS_NODE...