From: Jens Axboe <jens.axboe@oracle.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ric Wheeler <ricwheeler@gmail.com>,
linux-fsdevel@vger.kernel.org, gilad@codefidence.com
Subject: Re: [PATCH 1/5] [BLOCK] Add 'discard' request handling
Date: Fri, 8 Aug 2008 12:30:41 +0200 [thread overview]
Message-ID: <20080808103041.GM20055@kernel.dk> (raw)
In-Reply-To: <1218187995.12232.95.camel@pmac.infradead.org>
On Fri, Aug 08 2008, David Woodhouse wrote:
> On Thu, 2008-08-07 at 20:41 +0200, Jens Axboe wrote:
> > I've queued this up for some testing, I'll add the merge support as
> > well.
>
> Thanks. Did you pull from my tree? If so I'll provide an incremental
> patch. Otherwise I'll go back and recommit it with your suggested
> changes.
I did not, the final version will be different from the 1st one, so no
point in carrying that history. What I did this morning was add the
bio_has_data() support bits, here:
http://git.kernel.dk/?p=linux-2.6-block.git;a=shortlog;h=refs/heads/for-2.6.28
> > > diff --git a/block/blk-barrier.c b/block/blk-barrier.c
> > > index a09ead1..29e60ff 100644
> > > --- a/block/blk-barrier.c
> > > +++ b/block/blk-barrier.c
> >
> > Not sure why you are placing it here, it should probably just go into
> > blk-core.c
>
> Yeah, I vacillated about that for a while -- and even got as far as
> moving it there, and back again. It's not really _core_ code either.
> Since it started off almost identical to blkdev_issue_flush() I figured
> it might as well sit next to it. But I'm happy to move it too.
It doesn't matter a whole lot, so lets just keep it there. None of the
files are a perfect fit, and it would be silly to start a new one for
this.
> > > diff --git a/block/elevator.c b/block/elevator.c
> > > index ed6f8f3..bb26424 100644
> > > --- a/block/elevator.c
> > > +++ b/block/elevator.c
> > > @@ -675,7 +675,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where,
> > > if (q->ordcolor)
> > > rq->cmd_flags |= REQ_ORDERED_COLOR;
> > >
> > > - if (rq->cmd_flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) {
> > > + if (rq->cmd_flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER | REQ_DISCARD)) {
> > > /*
> > > * toggle ordered color
> > > */
> >
> > Just make REQ_DISCARD set REQ_SOFTBARRIER? Do you care if this acts as a
> > barrier or not?
>
> Er, didn't you object to me setting REQ_SOFTBARRIER for discard
> requests, a few lines up? Admittedly, I shouldn't need to do _both_, but
> I think I need one or the other.
Not at all, please re-read that part. I objected to adding a strategy
hook just for setting cmd type and flags for discard. Basically I think
this boils down to the fact that we only really pass fs requests through
submit_bio(). Other types of requests are typically inserted directly
into the queue, if they aren't "normal" file system requests. Since we
want to do merging on discard requests, that isn't a good idea here.
The question here is whether you want discard to be a barrier or not.
Either you mark it as such when the rq is inited or you don't, don't
check for it explicitly in __elv_add_request().
> In the long term no, I don't care if it acts as a barrier. I just did
> that until we implement the merge support for discard requests.
OK
--
Jens Axboe
next prev parent reply other threads:[~2008-08-08 10:30 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <488B7281.4020007@gmail.com>
[not found] ` <20080726130200.f541e604.akpm@linux-foundation.org>
2008-08-05 1:45 ` [RFC] 'discard sectors' block request David Woodhouse
2008-08-05 1:59 ` Andrew Morton
2008-08-05 9:01 ` David Woodhouse
2008-08-05 11:42 ` Jens Axboe
2008-08-05 13:32 ` David Woodhouse
2008-08-05 14:21 ` Ric Wheeler
2008-08-05 16:29 ` David Woodhouse
2008-08-05 17:25 ` David Woodhouse
2008-08-06 9:25 ` [PATCH 1/5] [BLOCK] Add 'discard' request handling David Woodhouse
2008-08-06 16:19 ` OGAWA Hirofumi
2008-08-06 18:18 ` David Woodhouse
2008-08-06 19:28 ` OGAWA Hirofumi
2008-08-07 16:32 ` [PATCH 1/5, v2] " David Woodhouse
2008-08-07 18:41 ` [PATCH 1/5] " Jens Axboe
2008-08-08 9:33 ` David Woodhouse
2008-08-08 10:30 ` Jens Axboe [this message]
2008-08-08 10:49 ` Jens Axboe
2008-08-08 11:04 ` David Woodhouse
2008-08-08 11:20 ` Jens Axboe
2008-08-08 10:52 ` David Woodhouse
2008-08-08 11:09 ` Jens Axboe
2008-08-08 11:18 ` Jens Axboe
2008-08-08 11:29 ` David Woodhouse
2008-08-08 11:44 ` Jens Axboe
2008-08-08 11:47 ` Jens Axboe
2008-08-08 12:05 ` David Woodhouse
2008-08-08 12:13 ` Jens Axboe
2008-08-08 12:32 ` David Woodhouse
2008-08-08 12:37 ` Jens Axboe
2008-08-08 12:49 ` David Woodhouse
2008-08-10 1:05 ` Jamie Lokier
2008-08-08 15:32 ` David Woodhouse
2008-08-08 14:22 ` Matthew Wilcox
2008-08-08 14:27 ` David Woodhouse
2008-08-08 14:34 ` Matthew Wilcox
2008-08-06 9:25 ` [PATCH 2/5] [FAT] Let the block device know when sectors can be discarded David Woodhouse
2008-08-06 16:40 ` OGAWA Hirofumi
2008-08-06 17:14 ` OGAWA Hirofumi
2008-08-06 18:11 ` David Woodhouse
2008-08-06 19:10 ` OGAWA Hirofumi
2008-08-06 19:50 ` OGAWA Hirofumi
2008-08-06 20:10 ` OGAWA Hirofumi
2008-08-06 21:37 ` David Woodhouse
2008-08-07 16:09 ` David Woodhouse
2008-08-07 16:33 ` [PATCH 2/5, v2] " David Woodhouse
2008-08-06 9:25 ` [PATCH 3/5] [MTD] Support 'discard sectors' operation in translation layer support core David Woodhouse
2008-08-06 9:25 ` [PATCH 4/5] [MTD] [FTL] Support 'discard sectors' operation David Woodhouse
2008-08-06 9:25 ` [PATCH 5/5] [BLOCK] Fix up comments about matching flags between bio and rq David Woodhouse
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=20080808103041.GM20055@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=gilad@codefidence.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ricwheeler@gmail.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.