All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, bfoster@redhat.com
Subject: Re: [PATCH 3/3] xfs: measure all contiguous previous extents for prealloc size
Date: Thu, 21 May 2020 02:31:40 -0700	[thread overview]
Message-ID: <20200521093140.GA17015@infradead.org> (raw)
In-Reply-To: <20200520211716.GH17627@magnolia>

On Wed, May 20, 2020 at 02:17:16PM -0700, Darrick J. Wong wrote:
> On Tue, May 19, 2020 at 05:54:37AM -0700, Christoph Hellwig wrote:
> > The actual logic looks good, but I think the new helper and another
> > third set of comment explaining what is going on makes this area even
> > more confusing.  What about something like this instead?
> 
> This seems reasonable, but the callsite cleanups ought to be a separate
> patch from the behavior change.

Do you want me to send prep patches, or do you want to split it our
yourself?

> > +	if (eof && offset + count > XFS_ISIZE(ip)) {
> > +		/*
> > +		 * Determine the initial size of the preallocation.
> > + 		 * We clean up any extra preallocation when the file is closed.
> > +		 */
> > +		if (mp->m_flags & XFS_MOUNT_ALLOCSIZE)
> > +			prealloc_blocks = mp->m_allocsize_blocks;
> > +		else
> > +			prealloc_blocks = xfs_iomap_prealloc_size(ip, allocfork,
> > +						offset, count, &icur);
> 
> I'm not sure how much we're really gaining from moving the
> MOUNT_ALLOCSIZE check out to the caller, but I don't feel all that
> passionate about this.

From the pure code stats point of view it doensn't matter.  But from the
software architecture POV it does - now xfs_iomap_prealloc_size contains
the dynamic prealloc size algorithm, while the hard coded case is
handled in the caller.


  reply	other threads:[~2020-05-21  9:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  0:49 [PATCH 0/3] xfs: fix stale disk exposure after crash Darrick J. Wong
2020-05-19  0:49 ` [PATCH 1/3] xfs: force writes to delalloc regions to unwritten Darrick J. Wong
2020-05-19 12:45   ` Brian Foster
2020-05-19  0:49 ` [PATCH 2/3] xfs: don't fail unwritten extent conversion on writeback due to edquot Darrick J. Wong
2020-05-19  7:13   ` Christoph Hellwig
2020-05-19 12:46   ` Brian Foster
2020-05-19  0:49 ` [PATCH 3/3] xfs: measure all contiguous previous extents for prealloc size Darrick J. Wong
2020-05-19 12:48   ` Brian Foster
2020-05-20 13:23     ` Brian Foster
2020-05-20 19:48       ` Darrick J. Wong
2020-05-21 12:24         ` Brian Foster
2020-05-19 12:54   ` Christoph Hellwig
2020-05-20 21:17     ` Darrick J. Wong
2020-05-21  9:31       ` Christoph Hellwig [this message]
2020-05-21 17:19         ` 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=20200521093140.GA17015@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.