]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
f2fs: expose main_blkaddr in sysfs
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 22 Nov 2019 19:53:10 +0000 (11:53 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 25 Nov 2019 18:01:27 +0000 (10:01 -0800)
commita4db59ac9058207cea77df7d7893aab5c3009f87
tree397b5725b70a4871410b6ad216c9e6eb7ecaaefa
parent909110c060f22e65756659ec6fa957ae75777e00
f2fs: expose main_blkaddr in sysfs

Expose in /sys/fs/f2fs/<blockdev>/main_blkaddr the block address where the
main area starts. This allows user mode programs to determine:

- That pinned files that are made exclusively of fully allocated 2MB
  segments will never be unpinned by the file system.

- Where the main area starts. This is required by programs that want to
  verify if a file is made exclusively of 2MB f2fs segments, the alignment
  boundary for segments starts at this address. Testing for 2MB alignment
  relative to the start of the device is incorrect, because for some
  filesystems main_blkaddr is not at a 2MB boundary relative to the start
  of the device.

The entry will be used when validating reliable pinning file feature proposed
by "f2fs: support aligned pinned file".

Signed-off-by: Ramon Pantin <pantin@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
Documentation/filesystems/f2fs.txt
fs/f2fs/sysfs.c