public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alex Elder <aelder@sgi.com>
Cc: Dave Chinner <dchinner@redhat.com>, xfs@oss.sgi.com
Subject: Re: [PATCH 10/25] xfs: factor extent allocation out of xfs_bmapi
Date: Sun, 11 Sep 2011 07:50:17 -0400	[thread overview]
Message-ID: <20110911115016.GA1226@infradead.org> (raw)
In-Reply-To: <1315599804.1999.54.camel@doink>

On Fri, Sep 09, 2011 at 03:23:24PM -0500, Alex Elder wrote:
> On Wed, 2011-08-24 at 02:04 -0400, Christoph Hellwig wrote:
> > To further improve the readability of xfs_bmapi(), factor the extent
> > allocation out into a separate function. This removes a large block
> > of logic from the xfs_bmapi() code loop and makes it easier to see
> > the operational logic flow for xfs_bmapi().
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> 
> OK, this looks very good.  I have a spot that I chased
> for a while to verify it produced the same functionality
> as before, but I just gave up because it was just taking
> much too much time.  I'll point it out below, just for
> the record, but I'm not too concerned about it.  Everything
> else looks good.
> 
> Reviewed-by: Alex Elder <aelder@sgi.com>
> 

> > +			bma.minleft = minleft;
> > +
> > +			error = xfs_bmapi_allocate(&bma, &lastx, &cur,
> > +					firstblock, flist, flags, &nallocs,
> > +					&tmp_logflags);
> 
> > +			if (error == ENOSPC || error == EDQUOT) {
> > +				if (n == 0) {
> > +					*nmap = 0;
> > +					ASSERT(cur == NULL);
> > +					return error;
> >  				}
> 
> Here is the spot I mentioned above.  I was trying to find out
> the circumstances under which ENOSPC or EDQUOT could get returned
> by xfs_bmapi_allocate() in order to confirm that this in fact
> produces the same effect as before.

It shouldn't be there, and never hit.  This is a leftover from Dave's
earlier version where we did the delalloc reservation from
xfs_bmapi_allocate.  I have removed it.

> I also had a little trouble because there were spots--such
> as calling xfs_bmap_isaeof()--that are now encapsulated within
> xfs_bmapi_allocate() that previously jumped to error0, but now
> will produce an error return from that function.  So now this
> doesn't execute the code at error0 in this case.  I didn't
> work through it but I trust that the code there would end
> up being a series of no-ops anyway.

We still got to error0 in that case, it's just below the code you
quoted:

			logflags |= tmp_logflags;
			if (error)
				goto error0;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-09-11 11:50 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24  6:04 [PATCH 00/25] xfs_bmapi split and cleanups Christoph Hellwig
2011-08-24  6:04 ` [PATCH 01/25] xfs: remove the first extent special case in xfs_bmap_add_extent Christoph Hellwig
2011-09-02 22:22   ` Alex Elder
2011-09-06 11:52     ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 02/25] xfs: remove impossible to read code in xfs_bmap_add_extent_delay_real Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 03/25] xfs: remove the nextents variable in xfs_bmapi Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 04/25] xfs: factor extent map manipulations out of xfs_bmapi Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-09-06 11:55     ` Christoph Hellwig
2011-09-07 17:21       ` Alex Elder
2011-09-07 17:23         ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 05/25] xfs: introduce xfs_bmapi_read() Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 06/25] xfs: remove xfs_bmapi_single() Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 07/25] xfs: factor delalloc reservations out of xfs_bmapi Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 08/25] xfs: introduce xfs_bmapi_delay() Christoph Hellwig
2011-09-02 22:23   ` Alex Elder
2011-09-06 15:27     ` Christoph Hellwig
2011-09-07 17:21       ` Alex Elder
2011-08-24  6:04 ` [PATCH 09/25] xfs: do not use xfs_bmap_add_extent for adding delalloc extents Christoph Hellwig
2011-09-09 20:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 10/25] xfs: factor extent allocation out of xfs_bmapi Christoph Hellwig
2011-09-09 20:23   ` Alex Elder
2011-09-11 11:50     ` Christoph Hellwig [this message]
2011-08-24  6:04 ` [PATCH 11/25] xfs: factor unwritten extent map manipulations " Christoph Hellwig
2011-09-09 20:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 12/25] xfs: rename xfs_bmapi to xfs_bmapi_write Christoph Hellwig
2011-09-09 20:23   ` Alex Elder
2011-08-24  6:04 ` [PATCH 13/25] xfs: introduce xfs_bmap_last_extent Christoph Hellwig
2011-09-09 20:23   ` Alex Elder
2011-09-10 18:45     ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 14/25] xfs: remove xfs_bmap_add_extent Christoph Hellwig
2011-09-09 23:55   ` Alex Elder
2011-09-10 18:49     ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 15/25] xfs: pass bmalloca structure to xfs_bmap_isaeof Christoph Hellwig
2011-09-09 23:55   ` Alex Elder
2011-09-10 18:52     ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 16/25] xfs: move extent records into bmalloca structure Christoph Hellwig
2011-09-09 23:55   ` Alex Elder
2011-08-24  6:04 ` [PATCH 17/25] xfs: move firstblock and bmap freelist cursor " Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-08-24  6:04 ` [PATCH 18/25] xfs: move allocation ranges inode " Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-09-10 18:57     ` Christoph Hellwig
2011-08-24  6:04 ` [PATCH 19/25] xfs: move btree cursor into bmalloca Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-08-24  6:04 ` [PATCH 20/25] xfs: move lastx and nallocs " Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-08-24  6:04 ` [PATCH 21/25] xfs: move logflags " Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-08-24  6:04 ` [PATCH 22/25] xfs: pass bmalloca to xfs_bmap_add_extent_delay_real Christoph Hellwig
2011-09-09 23:56   ` Alex Elder
2011-08-24  6:04 ` [PATCH 23/25] xfs: pass bmalloca to xfs_bmap_add_extent_hole_real Christoph Hellwig
2011-09-09 23:58   ` Alex Elder
2011-08-24  6:04 ` [PATCH 24/25] xfs: dont ignore error code from xfs_bmbt_update Christoph Hellwig
2011-09-09 23:58   ` Alex Elder
2011-08-24  6:04 ` [PATCH 25/25] xfs: cleanup xfs_bmap.h Christoph Hellwig
2011-09-09 23:58   ` Alex Elder
2011-08-24  6:42 ` [PATCH 00/25] xfs_bmapi split and cleanups Christoph Hellwig

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=20110911115016.GA1226@infradead.org \
    --to=hch@infradead.org \
    --cc=aelder@sgi.com \
    --cc=dchinner@redhat.com \
    --cc=xfs@oss.sgi.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