mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] md: Call blk_queue_flush() to establish flush/fua support
Date: Mon, 22 Nov 2010 17:28:36 -0800	[thread overview]
Message-ID: <20101123012836.GV14383@tux1.beaverton.ibm.com> (raw)
In-Reply-To: <20101123105000.331b40f8@notabene.brown>

On Tue, Nov 23, 2010 at 10:50:00AM +1100, Neil Brown wrote:
> On Mon, 22 Nov 2010 15:22:08 -0800
> "Darrick J. Wong" <djwong@us.ibm.com> wrote:
> 
> > Before 2.6.37, the md layer had a mechanism for catching I/Os with the barrier
> > flag set, and translating the barrier into barriers for all the underlying
> > devices.  With 2.6.37, I/O barriers have become plain old flushes, and the md
> > code was updated to reflect this.  However, one piece was left out -- the md
> > layer does not tell the block layer that it supports flushes or FUA access at
> > all, which results in md silently dropping flush requests.
> > 
> > Since the support already seems there, just add this one piece of bookkeeping
> > to restore the ability to flush writes through md.
> 
> I would rather just unconditionally call
>    blk_queue_flush(mddev->queue, REQ_FLUSH | REQ_FUA);
> 
> I don't think there is much to be gained by trying to track exactly what the
> underlying devices support, and as the devices can change, that is racy
> anyway.
> 
> Thoughts?

I don't think there's anything that would get confused by an md that advertises
flush/fua support when any of the underlying devices don't support it, but that
was the only reason why I didn't just code it up your way to start with. :)

None of the in-kernel code checks queue->flush_flags except the block layer
itself, and the block layer silently strips off REQ_FLUSH/REQ_FUA if the device
doesn't support it.  I'm not sure I like /that/ behavior, but at the moment I
have no objection.  dm hardcodes the flags on as well.

--D

  reply	other threads:[~2010-11-23  1:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 23:22 Darrick J. Wong
2010-11-22 23:50 ` Neil Brown
2010-11-23  1:28   ` Darrick J. Wong [this message]
2010-11-23 19:01   ` [PATCH v2] " Darrick J. Wong
2010-11-24  5:18     ` Neil Brown

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=20101123012836.GV14383@tux1.beaverton.ibm.com \
    --to=djwong@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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®