[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240618084706.GB843635@p1gen4-pw042f0m.fritz.box>
Date: Tue, 18 Jun 2024 10:47:06 +0200
From: Benjamin Block <bblock@...ux.ibm.com>
To: Li Feng <fengli@...rtx.com>
Cc: "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH] scsi: sd: Keep the discard mode stable
On Tue, Jun 18, 2024 at 11:06:13AM +0800, Li Feng wrote:
> > 2024年6月18日 00:26,Benjamin Block <bblock@...ux.ibm.com> 写道:
> > On Sat, Jun 15, 2024 at 12:03:47AM +0800, Li Feng wrote:
> >> There is a scenario where a large number of discard commands
> >> are issued when the iscsi initiator connects to the target
> >> and then performs a session rescan operation.
> >
> > Is this with just one specific target implementation? This sounds like a
> > broken/buggy target, or is there a reason why this happens in general?
> >
> > And broken target sounds like device quirk, rather than impacting every
> > possible target.
>
> This is a common problem. Before sending a rescan, discard has been
> negotiated to UNMAP. After the rescan, there will be a short window for
> it to become WS16, and then it will immediately become UNMAP.
> However, during this period, a small amount of discard commands
> may become WS16, resulting in a strange problem.
Ok, interesting. Do you know why this short window happens?
> >> There is a time
> >> window, most of the commands are in UNMAP mode, and some
> >> discard commands become WRITE SAME with UNMAP.
> >>
> >> The discard mode has been negotiated during the SCSI probe. If
> >> the mode is temporarily changed from UNMAP to WRITE SAME with
> >> UNMAP, IO ERROR may occur because the target may not implement
> >> WRITE SAME with UNMAP. Keep the discard mode stable to fix this
> >> issue.
> >>
> >> Signed-off-by: Li Feng <fengli@...rtx.com>
> >> ---
--
Best Regards, Benjamin Block / Linux on IBM Z Kernel Development
IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy
Vors. Aufs.-R.: Wolfgang Wendt / Geschäftsführung: David Faller
Sitz der Ges.: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294
Powered by blists - more mailing lists