Skip to content
LogFS Programs: used to create LogFS file system
Find file
New pull request
Latest commit 45b72c8 @prasad-joshi Use segment size for calculating the second superblock location
When a file system is created on a block device. We missed to use the
segment size to calculate the location of the second superblock. Which
resulted in attempt to write beyond the disk size.

$ mklogfs --non-interactive -s 17 -w 16 /dev/vda: FAILED
write failed: No space left on device
Will create filesystem with the following details:
              hex:   decimal:
	      fssize=   40000000 1073741824
	      segsize=     20000     131072
	      blocksize=    1000       4096
	      writesize=   10000      65536

	      mklogfs: could not create superblock

The patch fixes the problem by using segment size and the last segment
number while calculating the location of the secondary superblock.

Signed-off-by: Prasad Joshi <>
Something went wrong with that request. Please try again.