Displaying 7 results from an estimated 7 matches for "btrfs_super_incompat_flags".
2013 Apr 11
2
[PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block
The following case will make the incompat/compat flag of the super block
be recovered.
Task1 |Task2
flags = btrfs_super_incompat_flags(); |
|flags = btrfs_super_incompat_flags();
flags |= new_flag1; |
|flags |= new_flag2;
btrfs_set_super_incompat_flags(flags); |
|btrfs_set_super_incompat_flags(flags);
the new_flag1 is recovered.
In order to avoid this problem, we introduce a lock named super_lock into
the btrfs...
2012 Jul 24
1
[PATCH v4] Btrfs: Check INCOMPAT flags on remount and add helper function
...pat(__fs_info, opt) \
+ __btrfs_set_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt)
+
+static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info,
+ u64 flag)
+{
+ struct btrfs_super_block *disk_super;
+ u64 features;
+
+ disk_super = fs_info->super_copy;
+ features = btrfs_super_incompat_flags(disk_super);
+ if (!(features & flag)) {
+ features |= flag;
+ btrfs_set_super_incompat_flags(disk_super, features);
+ }
+}
+
#define btrfs_abort_transaction(trans, root, errno) \
do { \
__btrfs_abort_transaction(trans, root, __func__, \
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/io...
2013 May 16
0
[PATCH] btrfs-progs: mkfs: add -O option to specify fs features
...orig);
+ if (features & BTRFS_FEATURE_LIST_ALL) {
+ list_all_fs_features();
+ exit(0);
+ }
+ break;
+ }
case ''s'':
sectorsize = parse_size(optarg);
break;
@@ -1521,21 +1624,22 @@ raid_groups:
super = root->fs_info->super_copy;
flags = btrfs_super_incompat_flags(super);
+ /*
+ * FS features that can be set by other means than -O
+ * just set the bit here
+ */
if (mixed)
- flags |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
-
- btrfs_set_super_incompat_flags(super, flags);
+ features |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
if ((data_profile | metadat...
2009 Dec 17
0
[PATCH] Btrfs: set a incompat flag when setting default subvol
...k_super;
+ u64 features;
u64 objectid = 0;
u64 dir_id;
@@ -1610,6 +1612,12 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
btrfs_mark_buffer_dirty(path->nodes[0]);
btrfs_free_path(path);
+ disk_super = &root->fs_info->super_copy;
+ features = btrfs_super_incompat_flags(disk_super);
+ if (!(features & BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL)) {
+ features |= BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL;
+ btrfs_set_super_incompat_flags(disk_super, features);
+ }
btrfs_end_transaction(trans, root);
return 0;
--
1.5.4.3
--
To unsubscribe from this list: send th...
2011 Nov 30
1
[PATCH] Canonicalise BTRFS: and Btrfs: to btrfs:
...trfs/inode.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 94abc25..f4d419b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2106,7 +2106,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
features = btrfs_super_incompat_flags(disk_super) &
~BTRFS_FEATURE_INCOMPAT_SUPP;
if (features) {
- printk(KERN_ERR "BTRFS: couldn''t mount because of "
+ printk(KERN_ERR "btrfs: couldn''t mount because of "
"unsupported optional features (%Lx).\n",
(unsigned...
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...1 +81,28 @@ int enable_extrefs_flag(struct btrfs_root *root)
return 0;
}
+int enable_skinny_metadata(struct btrfs_root *root)
+{
+ struct btrfs_trans_handle *trans;
+ struct btrfs_super_block *disk_super;
+ u64 super_flags;
+
+ disk_super = &root->fs_info->super_copy;
+ super_flags = btrfs_super_incompat_flags(disk_super);
+ super_flags |= BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA;
+ trans = btrfs_start_transaction(root, 1);
+ btrfs_set_super_incompat_flags(disk_super, super_flags);
+ btrfs_commit_transaction(trans, root);
+
+ return 0;
+}
+
static void print_usage(void)
{
fprintf(stderr, "usage: b...
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello,
This patch series adds an initial implementation of restriper (it''s a
clever name for relocation framework that allows to do selective profile
changing and selective balancing with some goodies like pausing/resuming
and reporting progress to the user.
Profile changing is global (per-FS) so far, per-subvolume profiles
require some discussion and can be implemented in future.