Add an incompat flag for the new remap-tree feature, and the constants and definitions needed to support it.
Showing the changes to include/uapi (2 of 8 files). Show all
Unified · Split
| @@ -336,6 +336,7 @@ struct btrfs_ioctl_fs_info_args { · 335 unmodified lines | ||
| 336 | 336 | #define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13) |
| 337 | 337 | #define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE (1ULL << 14) |
| 338 | 338 | #define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA (1ULL << 16) |
| 339 | +#define BTRFS_FEATURE_INCOMPAT_REMAP_TREE (1ULL << 17) | |
| 339 | 340 | |
| 340 | 341 | struct btrfs_ioctl_feature_flags { |
| 341 | 342 | __u64 compat_flags; |
| @@ -76,6 +76,9 @@ · 75 unmodified lines | ||
| 76 | 76 | /* Tracks RAID stripes in block groups. */ |
| 77 | 77 | #define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL |
| 78 | 78 | |
| 79 | +/* Holds details of remapped addresses after relocation. */ | |
| 80 | +#define BTRFS_REMAP_TREE_OBJECTID 13ULL | |
| 81 | + | |
| 79 | 82 | /* device stats in the device tree */ |
| 80 | 83 | #define BTRFS_DEV_STATS_OBJECTID 0ULL |
| 81 | 84 | |
| @@ -282,6 +285,10 @@ · 200 unmodified lines | ||
| 282 | 285 | |
| 283 | 286 | #define BTRFS_RAID_STRIPE_KEY 230 |
| 284 | 287 | |
| 288 | +#define BTRFS_IDENTITY_REMAP_KEY 234 | |
| 289 | +#define BTRFS_REMAP_KEY 235 | |
| 290 | +#define BTRFS_REMAP_BACKREF_KEY 236 | |
| 291 | + | |
| 285 | 292 | /* |
| 286 | 293 | * Records the overall state of the qgroups. |
| 287 | 294 | * There's only one instance of this key present, |
| @@ -1161,6 +1168,7 @@ struct btrfs_dev_replace_item { · 873 unmodified lines | ||
| 1161 | 1168 | #define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) |
| 1162 | 1169 | #define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9) |
| 1163 | 1170 | #define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10) |
| 1171 | +#define BTRFS_BLOCK_GROUP_REMAPPED (1ULL << 11) | |
| 1164 | 1172 | #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \ |
| 1165 | 1173 | BTRFS_SPACE_INFO_GLOBAL_RSV) |
| 1166 | 1174 | |
| @@ -1323,4 +1331,13 @@ struct btrfs_verity_descriptor_item { · 156 unmodified lines | ||
| 1323 | 1331 | __u8 encryption; |
| 1324 | 1332 | } __attribute__ ((__packed__)); |
| 1325 | 1333 | |
| 1334 | +/* | |
| 1335 | + * For a range identified by a BTRFS_REMAP_KEY item in the remap tree, gives | |
| 1336 | + * the address that the start of the range will get remapped to. This | |
| 1337 | + * structure is also shared by BTRFS_REMAP_BACKREF_KEY. | |
| 1338 | + */ | |
| 1339 | +struct btrfs_remap_item { | |
| 1340 | + __le64 address; | |
| 1341 | +} __attribute__ ((__packed__)); | |
| 1342 | + | |
| 1326 | 1343 | #endif /* _BTRFS_CTREE_H_ */ |