Skip to content

Commit 18db9ac

Browse files
jeffmahoneykdave
authored andcommitted
btrfs: uapi/linux/btrfs.h migration, move feature flags
The compat/compat_ro/incompat feature flags are used by the feature set/get ioctls. Signed-off-by: Jeff Mahoney <[email protected]> Reviewed-by: Liu Bo <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 884f6ec commit 18db9ac

File tree

2 files changed

+31
-25
lines changed

2 files changed

+31
-25
lines changed

fs/btrfs/ctree.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -506,31 +506,6 @@ struct btrfs_super_block {
506506
* Compat flags that we support. If any incompat flags are set other than the
507507
* ones specified below then we will fail to mount
508508
*/
509-
#define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0)
510-
511-
#define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0)
512-
#define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1)
513-
#define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2)
514-
#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3)
515-
/*
516-
* some patches floated around with a second compression method
517-
* lets save that incompat here for when they do get in
518-
* Note we don't actually support it, we're just reserving the
519-
* number
520-
*/
521-
#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4)
522-
523-
/*
524-
* older kernels tried to do bigger metadata blocks, but the
525-
* code was pretty buggy. Lets not let them try anymore.
526-
*/
527-
#define BTRFS_FEATURE_INCOMPAT_BIG_METADATA (1ULL << 5)
528-
529-
#define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF (1ULL << 6)
530-
#define BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7)
531-
#define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8)
532-
#define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9)
533-
534509
#define BTRFS_FEATURE_COMPAT_SUPP 0ULL
535510
#define BTRFS_FEATURE_COMPAT_SAFE_SET 0ULL
536511
#define BTRFS_FEATURE_COMPAT_SAFE_CLEAR 0ULL

include/uapi/linux/btrfs.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,37 @@ struct btrfs_ioctl_fs_info_args {
222222
__u64 reserved[122]; /* pad to 1k */
223223
};
224224

225+
/*
226+
* feature flags
227+
*
228+
* Used by:
229+
* struct btrfs_ioctl_feature_flags
230+
*/
231+
#define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0)
232+
233+
#define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0)
234+
#define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1)
235+
#define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2)
236+
#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3)
237+
/*
238+
* some patches floated around with a second compression method
239+
* lets save that incompat here for when they do get in
240+
* Note we don't actually support it, we're just reserving the
241+
* number
242+
*/
243+
#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4)
244+
245+
/*
246+
* older kernels tried to do bigger metadata blocks, but the
247+
* code was pretty buggy. Lets not let them try anymore.
248+
*/
249+
#define BTRFS_FEATURE_INCOMPAT_BIG_METADATA (1ULL << 5)
250+
251+
#define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF (1ULL << 6)
252+
#define BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7)
253+
#define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8)
254+
#define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9)
255+
225256
struct btrfs_ioctl_feature_flags {
226257
__u64 compat_flags;
227258
__u64 compat_ro_flags;

0 commit comments

Comments
 (0)