From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/8] xfs: don't log the inode in xfs_fs_map_blocks if it wasn't modified
Date: Wed, 30 Oct 2019 09:12:48 -0700 [thread overview]
Message-ID: <20191030161248.GI15222@magnolia> (raw)
In-Reply-To: <20191029075843.GD18999@lst.de>
On Tue, Oct 29, 2019 at 08:58:43AM +0100, Christoph Hellwig wrote:
> On Mon, Oct 28, 2019 at 09:12:45AM -0700, Darrick J. Wong wrote:
> > On Fri, Oct 25, 2019 at 05:03:32PM +0200, Christoph Hellwig wrote:
> > > Even if we are asked for a write layout there is no point in logging
> > > the inode unless we actually modified it in some way.
> > >
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > > ---
> > > fs/xfs/xfs_pnfs.c | 43 +++++++++++++++++++------------------------
> > > 1 file changed, 19 insertions(+), 24 deletions(-)
> > >
> > > diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
> > > index 9c96493be9e0..fa90c6334c7c 100644
> > > --- a/fs/xfs/xfs_pnfs.c
> > > +++ b/fs/xfs/xfs_pnfs.c
> > > @@ -147,32 +147,27 @@ xfs_fs_map_blocks(
> > > if (error)
> > > goto out_unlock;
> > >
> > > - if (write) {
> > > - enum xfs_prealloc_flags flags = 0;
> > > -
> > > + if (write &&
> > > + (!nimaps || imap.br_startblock == HOLESTARTBLOCK)) {
> > > ASSERT(imap.br_startblock != DELAYSTARTBLOCK);
> >
> > The change in code flow makes this assert rather useless, I think, since
> > we only end up in this branch if we have a write and a hole. If the
> > condition that it checks is important (and it seems to be?) then it
> > ought to be hoisted up a level and turned into:
> >
> > ASSERT(!write || !nimaps || imap.br_startblock != DELAYSTARTBLOCK);
> >
> > Right?
>
> Actually even for !write we should not see delalloc blocks here.
> So I'll fix up the assert in a separate prep patch.
<shrug> I could just fix it, unless you're about to resend the whole series?
--D
next prev parent reply other threads:[~2019-10-30 16:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 15:03 a few iomap / bmap cleanups Christoph Hellwig
2019-10-25 15:03 ` [PATCH 1/8] xfs: simplify xfs_iomap_eof_align_last_fsb Christoph Hellwig
2019-10-28 15:55 ` Darrick J. Wong
2019-10-25 15:03 ` [PATCH 2/8] xfs: mark xfs_eof_alignment static Christoph Hellwig
2019-10-28 15:55 ` Darrick J. Wong
2019-10-25 15:03 ` [PATCH 3/8] xfs: remove the extsize argument to xfs_eof_alignment Christoph Hellwig
2019-10-28 16:06 ` Darrick J. Wong
2019-10-29 7:57 ` Christoph Hellwig
2019-10-25 15:03 ` [PATCH 4/8] xfs: don't log the inode in xfs_fs_map_blocks if it wasn't modified Christoph Hellwig
2019-10-28 16:12 ` Darrick J. Wong
2019-10-29 7:58 ` Christoph Hellwig
2019-10-30 16:12 ` Darrick J. Wong [this message]
2019-10-30 17:56 ` Christoph Hellwig
2019-10-25 15:03 ` [PATCH 5/8] xfs: simplify the xfs_iomap_write_direct calling conventions Christoph Hellwig
2019-10-28 16:25 ` Darrick J. Wong
2019-10-25 15:03 ` [PATCH 6/8] xfs: refactor xfs_bmapi_allocate Christoph Hellwig
2019-10-28 16:29 ` Darrick J. Wong
2019-10-25 15:03 ` [PATCH 7/8] xfs: move extent zeroing to xfs_bmapi_allocate Christoph Hellwig
2019-10-28 16:31 ` Darrick J. Wong
2019-10-25 15:03 ` [PATCH 8/8] xfs: cleanup use of the XFS_ALLOC_ flags Christoph Hellwig
2019-10-28 16:32 ` 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=20191030161248.GI15222@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/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