Merge branch 'for-chris' of git://repo.or.cz/btrfs-progs-unstable/devel into raid56
authorChris Mason <chris.mason@fusionio.com>
Wed, 6 Feb 2013 17:42:24 +0000 (12:42 -0500)
committerChris Mason <chris.mason@fusionio.com>
Wed, 6 Feb 2013 17:42:24 +0000 (12:42 -0500)
Conflicts:
ctree.h

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
1  2 
Makefile
cmds-balance.c
ctree.h
disk-io.c
extent-tree.c
find-root.c
kerncompat.h
mkfs.c
volumes.c
volumes.h

diff --cc Makefile
index decf8ec0b3887a1066ec6b546656b386214d4972,bef1e13b41ead43e54d02671b1a8160a545ce115..596bf93f0dcf3dc64b04cf1a9e1b2f71b74f25c4
+++ b/Makefile
@@@ -5,10 -5,10 +5,10 @@@ objects = ctree.o disk-io.o radix-tree.
          root-tree.o dir-item.o file-item.o inode-item.o \
          inode-map.o crc32c.o rbtree.o extent-cache.o extent_io.o \
          volumes.o utils.o btrfs-list.o btrfslabel.o repair.o \
 -        send-stream.o send-utils.o qgroup.o
 +        send-stream.o send-utils.o qgroup.o raid6.o
  cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
               cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
-              cmds-quota.o cmds-qgroup.o
+              cmds-quota.o cmds-qgroup.o cmds-replace.o
  
  CHECKFLAGS= -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
            -Wuninitialized -Wshadow -Wundef
diff --cc cmds-balance.c
Simple merge
diff --cc ctree.h
index e82f4c9f5e5ada757c528e97db4d220b1d5e4fc0,d0f6062facedd2a3999034ce19fcab10c746b6a0..9bdcf6b6fba280beec833cfdfc8633894630a2b3
+++ b/ctree.h
@@@ -437,8 -445,8 +445,9 @@@ struct btrfs_super_block 
   * code was pretty buggy.  Lets not let them try anymore.
   */
  #define BTRFS_FEATURE_INCOMPAT_BIG_METADATA     (1ULL << 5)
 +#define BTRFS_FEATURE_INCOMPAT_RAID56         (1ULL << 7)
  
+ #define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF   (1ULL << 6)
  
  #define BTRFS_FEATURE_COMPAT_SUPP             0ULL
  #define BTRFS_FEATURE_COMPAT_RO_SUPP          0ULL
         BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL |        \
         BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO |          \
         BTRFS_FEATURE_INCOMPAT_BIG_METADATA |          \
 -       BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS |          \
 -       BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF)
++       BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF |         \
 +       BTRFS_FEATURE_INCOMPAT_RAID56 |                \
 +       BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS)
  
  /*
   * A leaf is full of items. offset and size tell us where to find
diff --cc disk-io.c
Simple merge
diff --cc extent-tree.c
Simple merge
diff --cc find-root.c
Simple merge
diff --cc kerncompat.h
Simple merge
diff --cc mkfs.c
index 7cd0c23ce5b2868af2c71bc1f202cb572513343c,0e042c7a48af4a85234c52c1a89ecf37a51e7cdc..9dd10d68ac636fedf2f17e8c15d313476e48c0a9
--- 1/mkfs.c
--- 2/mkfs.c
+++ b/mkfs.c
@@@ -204,11 -205,10 +205,11 @@@ static int create_one_raid_group(struc
  static int create_raid_groups(struct btrfs_trans_handle *trans,
                              struct btrfs_root *root, u64 data_profile,
                              int data_profile_opt, u64 metadata_profile,
-                             int metadata_profile_opt, int mixed)
+                             int metadata_profile_opt, int mixed, int ssd)
  {
        u64 num_devices = btrfs_super_num_devices(&root->fs_info->super_copy);
 -      u64 allowed;
 +      u64 allowed = 0;
 +      u64 devices_for_raid = num_devices;
        int ret;
  
        /*
@@@ -1444,24 -1485,15 +1499,25 @@@ raid_groups
        ret = create_data_reloc_tree(trans, root);
        BUG_ON(ret);
  
-       if (mixed) {
-               struct btrfs_super_block *super = &root->fs_info->super_copy;
-               u64 flags = btrfs_super_incompat_flags(super);
+       super = &root->fs_info->super_copy;
+       flags = btrfs_super_incompat_flags(super);
+       flags |= BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF;
  
+       if (mixed)
                flags |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
-               btrfs_set_super_incompat_flags(super, flags);
-       }
+       btrfs_set_super_incompat_flags(super, flags);
  
 +      if ((data_profile | metadata_profile) &
 +          (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
 +              struct btrfs_super_block *super = &root->fs_info->super_copy;
 +              u64 flags = btrfs_super_incompat_flags(super);
 +
 +              flags |= BTRFS_FEATURE_INCOMPAT_RAID56;
 +              btrfs_set_super_incompat_flags(super, flags);
 +              printf("Setting RAID5/6 feature flag\n");
 +      }
 +
        printf("fs created label %s on %s\n\tnodesize %u leafsize %u "
            "sectorsize %u size %s\n",
            label, first_file, nodesize, leafsize, sectorsize,
diff --cc volumes.c
Simple merge
diff --cc volumes.h
Simple merge