mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Shaohua Li <shli@kernel.org>,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	Jens Axboe <jaxboe@fusionio.com>,
	msnitzer@redhat.com
Subject: Re: [patch] blk-flush: fix flush policy calculation
Date: Tue, 09 Aug 2011 13:29:02 -0400	[thread overview]
Message-ID: <x49hb5qeboh.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20110809171349.GE6482@redhat.com> (Vivek Goyal's message of "Tue, 9 Aug 2011 13:13:49 -0400")

Vivek Goyal <vgoyal@redhat.com> writes:

> On Tue, Aug 02, 2011 at 03:46:49PM -0400, Jeff Moyer wrote:
>> Vivek Goyal <vgoyal@redhat.com> writes:
>> 
>> >> In testing, I did this:
>> >> 
>> >> @@ -1817,6 +1817,14 @@ int blk_insert_cloned_request(struct
>> >> request_queue *q, struct request *rq)
>> >>                 return -EIO;
>> >>  #endif
>> >>  
>> >> +       if ((rq->cmd_flags & (REQ_FLUSH|REQ_FUA)) && !q->flush_flags) {
>> >> +               rq->cmd_flags &= ~(REQ_FLUSH|REQ_FUA);
>> >> +               if (!blk_rq_bytes(rq)) {
>> >> +                       blk_end_request(rq, 0, 0);
>> >> +                       return 0;
>> >> +               }
>> >> +       }
>> >> +
>> >
>> > Will it make more sense to take care resetting flush/fua flags in
>> > blk_insert_flush()
>> 
>> Yes, that's much cleaner.
>> 
>> > and also the part which will end the request if request is empty.
>> 
>> Mmm-hmm.
>> 
>> I tried this, and it blew up in my face.  ;-)  Cloned requests from
>> device-mapper-land have rq->end_io filled in, which causes
>> blk_insert_flush to BUG here:
>> 
>>         BUG_ON(rq->end_io);
>
> So how does it work when underlying device supports FLUSH/FUA? That means
> that dm-multipath requets never go through flush machinery? So if a

Yes, they do.  They go through it *above* dm-multipath, and dm-multipath
just hands the requests down to the device via whatever path it selects.

Cheers,
Jeff

  reply	other threads:[~2011-08-09 17:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 20:32 Jeff Moyer
2011-08-02  1:20 ` Shaohua Li
2011-08-02 15:28   ` Jeff Moyer
2011-08-02 17:39   ` Jeff Moyer
2011-08-02 18:17     ` Vivek Goyal
2011-08-02 18:31       ` Jeff Moyer
2011-08-02 18:41         ` Vivek Goyal
2011-08-02 19:46           ` Jeff Moyer
2011-08-03  1:19             ` Shaohua Li
2011-08-09 17:13             ` Vivek Goyal
2011-08-09 17:29               ` Jeff Moyer [this message]
2011-08-02 18:40       ` Mike Snitzer
2011-08-04 10:20     ` Tejun Heo
2011-08-08 17:31       ` Jeff Moyer
2011-08-04 10:16 ` Tejun Heo

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=x49hb5qeboh.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msnitzer@redhat.com \
    --cc=shli@kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.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

all inboxes | Powered by JetHome®