path: root/xlators/storage/posix/src/posix-metadata.h
diff options
authorPurna Pavan Chandra Aekkaladevi <>2019-10-30 12:42:16 +0530
committerSunny Kumar <>2020-03-09 14:31:38 +0000
commitc12a7d9bdc3887c4ed43f76a3c7886727a62d0bc (patch)
tree23c9ad286feae9cdc9bda0b8973f7a0d13d31477 /xlators/storage/posix/src/posix-metadata.h
parent547fa5bbe5b3438d981de50ac5b2497683a4d9e2 (diff)
Posix: structs re-aligned and manual padding added
All the structs present inside xlators/storage/posix have been re-aligned into memory efficient way. Manual padding has been added to remove compile time padding. This manual padding is for development and debugging benefits. It lets to use -Wpadded option and raise warnings from the remaining structs where compile time padding happens. Change-Id: Ie72c02810803eae29fca435c71aa131a1315b8a8 Updates: bz#1754448 Signed-off-by: Purna Pavan Chandra Aekkaladevi <>
Diffstat (limited to 'xlators/storage/posix/src/posix-metadata.h')
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix-metadata.h b/xlators/storage/posix/src/posix-metadata.h
index 63e8771..d37014a 100644
--- a/xlators/storage/posix/src/posix-metadata.h
+++ b/xlators/storage/posix/src/posix-metadata.h
@@ -15,13 +15,15 @@
/* In memory representation posix metadata xattr */
typedef struct {
- /* version of structure, bumped up if any new member is added */
- uint8_t version;
/* flags indicates valid fields in the structure */
uint64_t flags;
struct timespec ctime;
struct timespec mtime;
struct timespec atime;
+ /* version of structure, bumped up if any new member is added */
+ uint8_t version;
+ char _pad[7]; /* manual padding */
} posix_mdata_t;
typedef struct {