From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 6/6] xfs: make discard operations asynchronous
Date: Mon, 28 Mar 2011 08:44:05 -0400 [thread overview]
Message-ID: <20110328124405.GA11909@infradead.org> (raw)
In-Reply-To: <20110323004323.GH15270@dastard>
On Wed, Mar 23, 2011 at 11:43:23AM +1100, Dave Chinner wrote:
> > + struct xfs_cil_ctx *ctx = bio->bi_private;
> > +
> > + if (err && err != -EOPNOTSUPP) {
> > + xfs_info(ctx->cil->xc_log->l_mp,
> > + "I/O error during discard\n");
> > + }
>
> Same comment about the bno/len in the error message as the previous
> patch.
We don't have the len information available anymore at this point,
but I've added the startblock.
> > + max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9);
> > + if (q->limits.discard_granularity) {
> > + unsigned int disc_sects = q->limits.discard_granularity >> 9;
> > +
> > + max_discard_sectors &= ~(disc_sects - 1);
> > + }
>
> This is asking for a helper function....
Yes, but that helper needs to be shared with the block layer discard
code, so I'll send it through Jens' tree later.
> > + if (keep_alive)
> > + xfs_cil_discard_done(ctx);
> > + else
> > + kmem_free(ctx);
>
> You could probably just call xfs_cil_discard_done(ctx) here as the
> busy extent list will be empty in the !keep_alive case and so it
> will simply do the kmem_free(ctx) call there.
This means we clear the busy list a little later in the non-discard
case, but it cleans up the code nicely. I've added it to the series
as a separate patch.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-03-28 12:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 19:55 [PATCH 0/6] [PATCH 0/6] more efficient busy extent handling and discard support Christoph Hellwig
2011-03-22 19:55 ` [PATCH 1/6] xfs: optimize AGFL refills Christoph Hellwig
2011-03-22 22:30 ` Alex Elder
2011-03-23 12:16 ` Christoph Hellwig
2011-03-25 21:03 ` Alex Elder
2011-03-28 12:07 ` Christoph Hellwig
2011-03-22 23:30 ` Dave Chinner
2011-03-23 12:16 ` Christoph Hellwig
2011-03-22 19:55 ` [PATCH 2/6] xfs: do not immediately reuse busy extent ranges Christoph Hellwig
2011-03-22 22:30 ` Alex Elder
2011-03-23 12:17 ` Christoph Hellwig
2011-03-25 21:03 ` Alex Elder
2011-03-28 12:07 ` Christoph Hellwig
2011-03-22 19:55 ` [PATCH 3/6] xfs: exact busy extent tracking Christoph Hellwig
2011-03-22 23:47 ` Dave Chinner
2011-03-23 12:24 ` Christoph Hellwig
2011-03-25 21:04 ` Alex Elder
2011-03-28 12:10 ` Christoph Hellwig
2011-03-22 19:55 ` [PATCH 4/6] xfs: allow reusing busy extents where safe Christoph Hellwig
2011-03-23 0:20 ` Dave Chinner
2011-03-23 12:26 ` Christoph Hellwig
2011-03-25 21:04 ` Alex Elder
2011-03-22 19:55 ` [PATCH 5/6] xfs: add online discard support Christoph Hellwig
2011-03-23 0:30 ` Dave Chinner
2011-03-23 12:31 ` Christoph Hellwig
2011-03-25 21:04 ` Alex Elder
2011-03-28 12:35 ` Christoph Hellwig
2011-03-22 19:55 ` [PATCH 6/6] xfs: make discard operations asynchronous Christoph Hellwig
2011-03-23 0:43 ` Dave Chinner
2011-03-28 12:44 ` Christoph Hellwig [this message]
2011-03-25 21:04 ` Alex Elder
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=20110328124405.GA11909@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.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 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.