btrfs: remove redundant csum buffer in btrfs_io_bio
[sfrench/cifs-2.6.git] / fs / btrfs / volumes.h
index aefce895e99468d428dd9d8f39af4fe6a6b4d18a..702c78cf2b4df17a0848644810da63fa11fcbbe5 100644 (file)
@@ -210,6 +210,8 @@ BTRFS_DEVICE_GETSET_FUNCS(bytes_used);
 
 struct btrfs_fs_devices {
        u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */
+       u8 metadata_uuid[BTRFS_FSID_SIZE];
+       bool fsid_change;
        struct list_head fs_list;
 
        u64 num_devices;
@@ -218,6 +220,10 @@ struct btrfs_fs_devices {
        u64 missing_devices;
        u64 total_rw_bytes;
        u64 total_devices;
+
+       /* Highest generation number of seen devices */
+       u64 latest_generation;
+
        struct block_device *latest_bdev;
 
        /* all of the devices in the FS, protected by a mutex
@@ -268,7 +274,6 @@ struct btrfs_io_bio {
        u64 logical;
        u8 *csum;
        u8 csum_inline[BTRFS_BIO_INLINE_CSUM_SIZE];
-       u8 *csum_allocated;
        btrfs_io_bio_end_io_t *end_io;
        struct bvec_iter iter;
        /*
@@ -331,6 +336,8 @@ struct btrfs_raid_attr {
        int tolerated_failures; /* max tolerated fail devs */
        int devs_increment;     /* ndevs has to be a multiple of this */
        int ncopies;            /* how many copies to data has */
+       int nparity;            /* number of stripes worth of bytes to store
+                                * parity information */
        int mindev_error;       /* error code if min devs requisite is unmet */
        const char raid_name[8]; /* name of the raid */
        u64 bg_flag;            /* block group flag of the raid */
@@ -430,6 +437,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *path);
 int btrfs_balance(struct btrfs_fs_info *fs_info,
                  struct btrfs_balance_control *bctl,
                  struct btrfs_ioctl_balance_args *bargs);
+void btrfs_describe_block_groups(u64 flags, char *buf, u32 size_buf);
 int btrfs_resume_balance_async(struct btrfs_fs_info *fs_info);
 int btrfs_recover_balance(struct btrfs_fs_info *fs_info);
 int btrfs_pause_balance(struct btrfs_fs_info *fs_info);
@@ -462,6 +470,8 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
 int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
                             u64 chunk_offset, u64 chunk_size);
 int btrfs_remove_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset);
+struct extent_map *btrfs_get_chunk_map(struct btrfs_fs_info *fs_info,
+                                      u64 logical, u64 length);
 
 static inline void btrfs_dev_stat_inc(struct btrfs_device *dev,
                                      int index)