diff options
Diffstat (limited to 'fs/bcachefs/vstructs.h')
-rw-r--r-- | fs/bcachefs/vstructs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/vstructs.h b/fs/bcachefs/vstructs.h index 2ad338e282da..446770ec3bd6 100644 --- a/fs/bcachefs/vstructs.h +++ b/fs/bcachefs/vstructs.h @@ -23,6 +23,9 @@ (size_t) (offsetof(_type, _data) + (_u64s) * sizeof(u64)); \ }) +#define vstruct_u64s(_s) \ + (offsetof(typeof(*(_s)), _data) / sizeof(u64) + __vstruct_u64s(_s)) + #define vstruct_bytes(_s) \ __vstruct_bytes(typeof(*(_s)), __vstruct_u64s(_s)) |