Skip to content
  • Jaegeuk Kim's avatar
    f2fs: expose main_blkaddr in sysfs · a4db59ac
    Jaegeuk Kim authored
    
    
    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: default avatarRamon Pantin <pantin@google.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    a4db59ac