linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <chengming.zhou@linux.dev>
To: Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>
Cc: axboe@kernel.dk, ming.lei@redhat.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhouchengming@bytedance.com
Subject: Re: [PATCH v2 1/4] blk-flush: flush_rq should inherit first_rq's cmd_flags
Date: Thu, 3 Aug 2023 23:35:34 +0800	[thread overview]
Message-ID: <405ef35e-5998-789f-8577-897b4cdf7e71@linux.dev> (raw)
In-Reply-To: <20230801110607.GB2781@lst.de>

On 2023/8/1 19:06, Christoph Hellwig wrote:
> On Tue, Aug 01, 2023 at 01:04:32PM +0200, Christoph Hellwig wrote:
>> On Mon, Jul 31, 2023 at 06:28:01PM +0200, Hannes Reinecke wrote:
>>> The flush machinery is sending flushes before and/or after the original 
>>> request (preflush/postflush). For blocked transports (ie during FC RSCN 
>>> handling) the transport will error out commands depending on the FAILFAST 
>>> setting. If FAILFAST is set the SCSI layer gets an STS_TRANSPORT error 
>>> (causing the I/O to be retried), but STS_ERROR if not set (causing I/O to 
>>> failed).
>>>
>>> So if the FAILFAST setting is _not_ aligned between flush_rq and the 
>>> original we'll get an error on the flush rq and a retry on the original rq, 
>>> causing the entire command to fail.
>>>
>>> I guess we need to align them.
>>
>> But you can't, because multiple pre/postflushes are coalesced into a
>> single outstanding flush request.  They can and will not match quite
>> commonly.
> 
> And if you mean the REQ_FAILFAST_TRANSPORT added by dm - this will
> never even see the flush state machine, as that is run in dm-mpath
> which then inserts the fully built flush request into the lower request
> queue.  At least for request based multipath, bio could hit it.

Yes, multiple pre/postflushes are coalesced into a single flush request.
So we can't figure out which request to use.

From the above explanation, can we just drop this inherit logic? It seems
strange or wrong here.

Thanks.

  reply	other threads:[~2023-08-03 15:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 13:00 [PATCH v2 0/4] blk-flush: optimize non-postflush requests chengming.zhou
2023-07-25 13:00 ` [PATCH v2 1/4] blk-flush: flush_rq should inherit first_rq's cmd_flags chengming.zhou
2023-07-31  6:09   ` Christoph Hellwig
2023-07-31 14:02     ` Chengming Zhou
2023-07-31 14:09       ` Christoph Hellwig
2023-07-31 16:28     ` Hannes Reinecke
2023-08-01 11:04       ` Christoph Hellwig
2023-08-01 11:06         ` Christoph Hellwig
2023-08-03 15:35           ` Chengming Zhou [this message]
2023-07-25 13:01 ` [PATCH v2 2/4] blk-flush: split queues for preflush and postflush requests chengming.zhou
2023-07-31  6:15   ` Christoph Hellwig
2023-07-31 14:15     ` Chengming Zhou
2023-07-25 13:01 ` [PATCH v2 3/4] blk-flush: kill the flush state machine chengming.zhou
2023-07-31  6:19   ` Christoph Hellwig
2023-07-31 14:27     ` Chengming Zhou
2023-07-25 13:01 ` [PATCH v2 4/4] blk-flush: don't need to end rq twice for non postflush chengming.zhou
2023-07-31  6:20   ` Christoph Hellwig
2023-08-10 14:25   ` kernel test robot

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=405ef35e-5998-789f-8577-897b4cdf7e71@linux.dev \
    --to=chengming.zhou@linux.dev \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=zhouchengming@bytedance.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;
as well as URLs for NNTP newsgroup(s).