mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-28 11:56:38 +00:00
scoutfs-utils: fix last data blkno
The calculation of the last valid data blkno was off by one. It was calculating the total number of small blocks that fit in the device size. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+1
-1
@@ -335,7 +335,7 @@ static int write_new_fs(char *path, int fd, u8 quorum_count)
|
||||
last_meta = next_meta + ((size / 5) >> SCOUTFS_BLOCK_LG_SHIFT);
|
||||
/* The rest of the device is data blocks */
|
||||
first_data = (last_meta + 1) << SCOUTFS_BLOCK_SM_LG_SHIFT;
|
||||
last_data = size >> SCOUTFS_BLOCK_SM_SHIFT;
|
||||
last_data = (size >> SCOUTFS_BLOCK_SM_SHIFT) - 1;
|
||||
|
||||
/* partially initialize the super so we can use it to init others */
|
||||
memset(super, 0, SCOUTFS_BLOCK_SM_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user