[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de6ba52c-0f14-670f-7262-93f2aced926a@suse.de>
Date: Mon, 31 Jul 2023 18:28:01 +0200
From: Hannes Reinecke <hare@...e.de>
To: Christoph Hellwig <hch@....de>, chengming.zhou@...ux.dev
Cc: axboe@...nel.dk, ming.lei@...hat.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, zhouchengming@...edance.com
Subject: Re: [PATCH v2 1/4] blk-flush: flush_rq should inherit first_rq's
cmd_flags
On 7/31/23 08:09, Christoph Hellwig wrote:
> On Tue, Jul 25, 2023 at 09:00:59PM +0800, chengming.zhou@...ux.dev wrote:
>> From: Chengming Zhou <zhouchengming@...edance.com>
>>
>> The cmd_flags in blk_kick_flush() should inherit the original request's
>> cmd_flags, but the current code looks buggy to me:
>
> Should it? I know the code is kinda trying to do it, but does it really
> make sense? Adding Hannes who originally added this inheritance and
> discussing the details below:
>
Yeah, it does.
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.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
Powered by blists - more mailing lists