Initial support for different inode sizes

We're about to increase the inode size and increment the format version.
Inode reading and writing has to handle different valid inode sizes as
allowed by the format version.   This is the initial skeletal work that
later patches which really increase the inode size will further refine
to add the specific known sizes and format versions.

Signed-off-by: Bryant G. Duffy-Ly <bduffyly@versity.com>
[zab@versity.com: reworded description, reworked to use _within]
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Bryant G. Duffy-Ly
2024-06-28 14:53:49 -07:00
committed by Zach Brown
parent 6931cb7b0e
commit 90cfaf17d1
3 changed files with 66 additions and 16 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ static int do_mkfs(struct mkfs_args *args)
inode.mtime.nsec = inode.atime.nsec;
inode.crtime.sec = inode.atime.sec;
inode.crtime.nsec = inode.atime.nsec;
btree_append_item(bt, &key, &inode, sizeof(inode));
btree_append_item(bt, &key, &inode, scoutfs_inode_vers_bytes(args->fmt_vers));
ret = write_block(meta_fd, SCOUTFS_BLOCK_MAGIC_BTREE, fsid, 1, blkno,
SCOUTFS_BLOCK_LG_SHIFT, &bt->hdr);