Skip to content

Commit 14b05c5

Browse files
jeffmahoneykdave
authored andcommitted
btrfs: uapi/linux/btrfs_tree.h, use __u8 and __u64
u8 and u64 aren't exported to userspace, while __u8 and __u64 are. 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 db67116 commit 14b05c5

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

include/uapi/linux/btrfs_tree.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,14 @@
334334
*/
335335
struct btrfs_disk_key {
336336
__le64 objectid;
337-
u8 type;
337+
__u8 type;
338338
__le64 offset;
339339
} __attribute__ ((__packed__));
340340

341341
struct btrfs_key {
342-
u64 objectid;
343-
u8 type;
344-
u64 offset;
342+
__u64 objectid;
343+
__u8 type;
344+
__u64 offset;
345345
} __attribute__ ((__packed__));
346346

347347
struct btrfs_dev_item {
@@ -379,22 +379,22 @@ struct btrfs_dev_item {
379379
__le32 dev_group;
380380

381381
/* seek speed 0-100 where 100 is fastest */
382-
u8 seek_speed;
382+
__u8 seek_speed;
383383

384384
/* bandwidth 0-100 where 100 is fastest */
385-
u8 bandwidth;
385+
__u8 bandwidth;
386386

387387
/* btrfs generated uuid for this device */
388-
u8 uuid[BTRFS_UUID_SIZE];
388+
__u8 uuid[BTRFS_UUID_SIZE];
389389

390390
/* uuid of FS who owns this device */
391-
u8 fsid[BTRFS_UUID_SIZE];
391+
__u8 fsid[BTRFS_UUID_SIZE];
392392
} __attribute__ ((__packed__));
393393

394394
struct btrfs_stripe {
395395
__le64 devid;
396396
__le64 offset;
397-
u8 dev_uuid[BTRFS_UUID_SIZE];
397+
__u8 dev_uuid[BTRFS_UUID_SIZE];
398398
} __attribute__ ((__packed__));
399399

400400
struct btrfs_chunk {
@@ -433,7 +433,7 @@ struct btrfs_chunk {
433433
struct btrfs_free_space_entry {
434434
__le64 offset;
435435
__le64 bytes;
436-
u8 type;
436+
__u8 type;
437437
} __attribute__ ((__packed__));
438438

439439
struct btrfs_free_space_header {
@@ -486,7 +486,7 @@ struct btrfs_extent_item_v0 {
486486

487487
struct btrfs_tree_block_info {
488488
struct btrfs_disk_key key;
489-
u8 level;
489+
__u8 level;
490490
} __attribute__ ((__packed__));
491491

492492
struct btrfs_extent_data_ref {
@@ -501,7 +501,7 @@ struct btrfs_shared_data_ref {
501501
} __attribute__ ((__packed__));
502502

503503
struct btrfs_extent_inline_ref {
504-
u8 type;
504+
__u8 type;
505505
__le64 offset;
506506
} __attribute__ ((__packed__));
507507

@@ -523,7 +523,7 @@ struct btrfs_dev_extent {
523523
__le64 chunk_objectid;
524524
__le64 chunk_offset;
525525
__le64 length;
526-
u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
526+
__u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
527527
} __attribute__ ((__packed__));
528528

529529
struct btrfs_inode_ref {
@@ -583,7 +583,7 @@ struct btrfs_dir_item {
583583
__le64 transid;
584584
__le16 data_len;
585585
__le16 name_len;
586-
u8 type;
586+
__u8 type;
587587
} __attribute__ ((__packed__));
588588

589589
#define BTRFS_ROOT_SUBVOL_RDONLY (1ULL << 0)
@@ -605,8 +605,8 @@ struct btrfs_root_item {
605605
__le64 flags;
606606
__le32 refs;
607607
struct btrfs_disk_key drop_progress;
608-
u8 drop_level;
609-
u8 level;
608+
__u8 drop_level;
609+
__u8 level;
610610

611611
/*
612612
* The following fields appear after subvol_uuids+subvol_times
@@ -625,9 +625,9 @@ struct btrfs_root_item {
625625
* when invalidating the fields.
626626
*/
627627
__le64 generation_v2;
628-
u8 uuid[BTRFS_UUID_SIZE];
629-
u8 parent_uuid[BTRFS_UUID_SIZE];
630-
u8 received_uuid[BTRFS_UUID_SIZE];
628+
__u8 uuid[BTRFS_UUID_SIZE];
629+
__u8 parent_uuid[BTRFS_UUID_SIZE];
630+
__u8 received_uuid[BTRFS_UUID_SIZE];
631631
__le64 ctransid; /* updated when an inode changes */
632632
__le64 otransid; /* trans when created */
633633
__le64 stransid; /* trans when sent. non-zero for received subvol */
@@ -751,12 +751,12 @@ struct btrfs_file_extent_item {
751751
* it is treated like an incompat flag for reading and writing,
752752
* but not for stat.
753753
*/
754-
u8 compression;
755-
u8 encryption;
754+
__u8 compression;
755+
__u8 encryption;
756756
__le16 other_encoding; /* spare for later use */
757757

758758
/* are we inline data or a real extent? */
759-
u8 type;
759+
__u8 type;
760760

761761
/*
762762
* disk space consumed by the extent, checksum blocks are included
@@ -783,7 +783,7 @@ struct btrfs_file_extent_item {
783783
} __attribute__ ((__packed__));
784784

785785
struct btrfs_csum_item {
786-
u8 csum;
786+
__u8 csum;
787787
} __attribute__ ((__packed__));
788788

789789
struct btrfs_dev_stats_item {
@@ -874,14 +874,14 @@ enum btrfs_raid_types {
874874
#define BTRFS_EXTENDED_PROFILE_MASK (BTRFS_BLOCK_GROUP_PROFILE_MASK | \
875875
BTRFS_AVAIL_ALLOC_BIT_SINGLE)
876876

877-
static inline u64 chunk_to_extended(u64 flags)
877+
static inline __u64 chunk_to_extended(__u64 flags)
878878
{
879879
if ((flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) == 0)
880880
flags |= BTRFS_AVAIL_ALLOC_BIT_SINGLE;
881881

882882
return flags;
883883
}
884-
static inline u64 extended_to_chunk(u64 flags)
884+
static inline __u64 extended_to_chunk(__u64 flags)
885885
{
886886
return flags & ~BTRFS_AVAIL_ALLOC_BIT_SINGLE;
887887
}
@@ -900,7 +900,7 @@ struct btrfs_free_space_info {
900900
#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)
901901

902902
#define BTRFS_QGROUP_LEVEL_SHIFT 48
903-
static inline u64 btrfs_qgroup_level(u64 qgroupid)
903+
static inline __u64 btrfs_qgroup_level(__u64 qgroupid)
904904
{
905905
return qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT;
906906
}

0 commit comments

Comments
 (0)