Commit fd0c7679 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Convert to __packed and __aligned

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e5baf3da
This diff is collapsed.
...@@ -208,7 +208,7 @@ struct bch_ioctl_data { ...@@ -208,7 +208,7 @@ struct bch_ioctl_data {
__u64 pad[8]; __u64 pad[8];
}; };
}; };
} __attribute__((packed, aligned(8))); } __packed __aligned(8);
enum bch_data_event { enum bch_data_event {
BCH_DATA_EVENT_PROGRESS = 0, BCH_DATA_EVENT_PROGRESS = 0,
...@@ -224,7 +224,7 @@ struct bch_ioctl_data_progress { ...@@ -224,7 +224,7 @@ struct bch_ioctl_data_progress {
__u64 sectors_done; __u64 sectors_done;
__u64 sectors_total; __u64 sectors_total;
} __attribute__((packed, aligned(8))); } __packed __aligned(8);
struct bch_ioctl_data_event { struct bch_ioctl_data_event {
__u8 type; __u8 type;
...@@ -233,12 +233,12 @@ struct bch_ioctl_data_event { ...@@ -233,12 +233,12 @@ struct bch_ioctl_data_event {
struct bch_ioctl_data_progress p; struct bch_ioctl_data_progress p;
__u64 pad2[15]; __u64 pad2[15];
}; };
} __attribute__((packed, aligned(8))); } __packed __aligned(8);
struct bch_replicas_usage { struct bch_replicas_usage {
__u64 sectors; __u64 sectors;
struct bch_replicas_entry r; struct bch_replicas_entry r;
} __attribute__((packed)); } __packed;
static inline struct bch_replicas_usage * static inline struct bch_replicas_usage *
replicas_usage_next(struct bch_replicas_usage *u) replicas_usage_next(struct bch_replicas_usage *u)
......
...@@ -313,7 +313,7 @@ struct btree_key_cache { ...@@ -313,7 +313,7 @@ struct btree_key_cache {
struct bkey_cached_key { struct bkey_cached_key {
u32 btree_id; u32 btree_id;
struct bpos pos; struct bpos pos;
} __attribute__((packed, aligned(4))); } __packed __aligned(4);
#define BKEY_CACHED_ACCESSED 0 #define BKEY_CACHED_ACCESSED 0
#define BKEY_CACHED_DIRTY 1 #define BKEY_CACHED_DIRTY 1
......
...@@ -66,7 +66,7 @@ struct bkey_inode_buf { ...@@ -66,7 +66,7 @@ struct bkey_inode_buf {
#define x(_name, _bits) + 8 + _bits / 8 #define x(_name, _bits) + 8 + _bits / 8
u8 _pad[0 + BCH_INODE_FIELDS()]; u8 _pad[0 + BCH_INODE_FIELDS()];
#undef x #undef x
} __attribute__((packed, aligned(8))); } __packed __aligned(8);
void bch2_inode_pack(struct bch_fs *, struct bkey_inode_buf *, void bch2_inode_pack(struct bch_fs *, struct bkey_inode_buf *,
const struct bch_inode_unpacked *); const struct bch_inode_unpacked *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment