Re: [PATCH v2 2/3] generic/436: round up bufsz to nearest filesystem blksz

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



"Pankaj Raghav (Samsung)" <kernel@xxxxxxxxxxxxxxxx> writes:

> From: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
>
> SEEK_HOLE and SEEK_DATA work in filesystem block size granularity. So
> while filling up the buffer for test 13 - 16, round up the bufsz to the
> closest filesystem blksz.
>
> As we only allowed blocksizes lower than the pagesize, this was never an
> issue and it always aligned. Once we have blocksize > pagesize, this
> assumption will break.
>
> Fixes the test for LBS configuration.
>
> Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
> ---
>  src/seek_sanity_test.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

The change looks logical to me to align the bufsz to blocksize rather
than pagesize for bs > ps. roundup() will not have any effect on bs ==
ps or bs < ps.

Also IIUC for LBS, even the page cache will have large folios. So
essentially the folio's folio_size() that we have in the pagecache
matches it's FS blocksize. (So blocksize = folio_size() is anyway true
for LBS). I was curious about this because SEEK_HOLE/SEEK_DATA can query
the pagecache if the filesystem has unwritten extents.

So this make sense that rather than aligning bufsz with base pagesize,
it should be rounded up to FS blocksize to make SEEK_HOLE/SEEK_DATA work
with LBS.

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx>




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux