From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs_io: don't count fsmaps before querying fsmaps
Date: Mon, 5 Jul 2021 16:25:27 +0100 [thread overview]
Message-ID: <YOMkZyxoSJpG+rur@infradead.org> (raw)
In-Reply-To: <162528110051.38807.5958877066692397152.stgit@locust>
On Fri, Jul 02, 2021 at 07:58:20PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> There's a bunch of code in fsmap.c that tries to count the GETFSMAP
> records so that it can size the fsmap array appropriately for the
> GETFSMAP call. It's pointless to iterate the entire result set /twice/
> (unlike the bmap command where the extent count is actually stored in
> the fs metadata), so get rid of the duplicate walk.
In otherwords: just keep iterating over the records using the default
chunk size instead of doing one call to find the size and then do
a giant allocation and GETFSMAP call.
I find the current commit log a little confusing, but the change itself
looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2021-07-05 15:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-03 2:58 [PATCHSET 0/2] xfs_io: small fixes to fsmap command Darrick J. Wong
2021-07-03 2:58 ` [PATCH 1/2] xfs_io: only print the header once when dumping fsmap in csv format Darrick J. Wong
2021-07-05 15:21 ` Christoph Hellwig
2021-07-03 2:58 ` [PATCH 2/2] xfs_io: don't count fsmaps before querying fsmaps Darrick J. Wong
2021-07-05 15:25 ` Christoph Hellwig [this message]
2021-07-06 18:30 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2021-07-28 21:16 [PATCHSET 0/2] xfs_io: small fixes to fsmap command Darrick J. Wong
2021-07-28 21:16 ` [PATCH 2/2] xfs_io: don't count fsmaps before querying fsmaps Darrick J. Wong
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=YOMkZyxoSJpG+rur@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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;
as well as URLs for NNTP newsgroup(s).