Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm: favour __packed versus "__attribute__ ((packed))"

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Heinz Mauelshagen and committed by
Mike Snitzer
ae99111e f8922a48

+6 -6
+2 -2
drivers/md/persistent-data/dm-btree-internal.h
··· 35 35 __le32 max_entries; 36 36 __le32 value_size; 37 37 __le32 padding; 38 - } __attribute__ ((packed)) __aligned(8); 38 + } __packed __aligned(8); 39 39 40 40 struct btree_node { 41 41 struct node_header header; 42 42 __le64 keys[]; 43 - } __attribute__ ((packed)) __aligned(8); 43 + } __packed __aligned(8); 44 44 45 45 46 46 /*
+4 -4
drivers/md/persistent-data/dm-space-map-common.h
··· 34 34 __le64 blocknr; 35 35 __le32 nr_free; 36 36 __le32 none_free_before; 37 - } __attribute__ ((packed)) __aligned(8); 37 + } __packed __aligned(8); 38 38 39 39 40 40 #define MAX_METADATA_BITMAPS 255 ··· 44 44 __le64 blocknr; 45 45 46 46 struct disk_index_entry index[MAX_METADATA_BITMAPS]; 47 - } __attribute__ ((packed)) __aligned(8); 47 + } __packed __aligned(8); 48 48 49 49 struct ll_disk; 50 50 ··· 103 103 __le64 nr_allocated; 104 104 __le64 bitmap_root; 105 105 __le64 ref_count_root; 106 - } __attribute__ ((packed)) __aligned(8); 106 + } __packed __aligned(8); 107 107 108 108 #define ENTRIES_PER_BYTE 4 109 109 ··· 111 111 __le32 csum; 112 112 __le32 not_used; 113 113 __le64 blocknr; 114 - } __attribute__ ((packed)) __aligned(8); 114 + } __packed __aligned(8); 115 115 116 116 /*----------------------------------------------------------------*/ 117 117