FS/XFS testing framework
 help / color / mirror / Atom feed
From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: "Pankaj Raghav (Samsung)" <kernel@pankajraghav.com>,
	fstests@vger.kernel.org
Cc: kernel@pankajraghav.com, gost.dev@samsung.com, mcgrof@kernel.org,
	djwong@kernel.org, zlang@redhat.com,
	Pankaj Raghav <p.raghav@samsung.com>
Subject: Re: [PATCH v2 2/3] generic/436: round up bufsz to nearest filesystem blksz
Date: Thu, 23 May 2024 02:18:21 +0530	[thread overview]
Message-ID: <87wmnlshd6.fsf@gmail.com> (raw)
In-Reply-To: <20240513131254.92412-3-kernel@pankajraghav.com>

"Pankaj Raghav (Samsung)" <kernel@pankajraghav.com> writes:

> From: Pankaj Raghav <p.raghav@samsung.com>
>
> 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@samsung.com>
> ---
>  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@gmail.com>

  parent reply	other threads:[~2024-05-22 21:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 13:12 [PATCH v2 0/3] more lbs test fixes Pankaj Raghav (Samsung)
2024-05-13 13:12 ` [PATCH v2 1/3] xfs/161: adapt the test case for 64k FS blocksize Pankaj Raghav (Samsung)
2024-05-14 12:19   ` Ritesh Harjani
2024-05-13 13:12 ` [PATCH v2 2/3] generic/436: round up bufsz to nearest filesystem blksz Pankaj Raghav (Samsung)
2024-05-17 15:54   ` Darrick J. Wong
2024-05-22 20:48   ` Ritesh Harjani [this message]
2024-05-13 13:12 ` [PATCH v2 3/3] xfs/008: use block size instead of the pagesize Pankaj Raghav (Samsung)
2024-05-23  4:25   ` Ritesh Harjani
2024-05-27 11:42     ` Pankaj Raghav (Samsung)
2024-05-25  5:48 ` [PATCH v2 0/3] more lbs test fixes Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmnlshd6.fsf@gmail.com \
    --to=ritesh.list@gmail.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=kernel@pankajraghav.com \
    --cc=mcgrof@kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox