From: Hannes Reinecke <hare@suse.de>
To: Jinpu Wang <jinpu.wang@profitbricks.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
linux-scsi@vger.kernel.org,
Sebastian Parschauer <s.parschauer@gmx.de>,
Bart Van Assche <bart.vanassche@sandisk.com>
Subject: Re: [PATCHv2]sd: Don't treat succeeded SYNC as error
Date: Mon, 2 May 2016 12:05:34 +0200 [thread overview]
Message-ID: <5727266E.7040905@suse.de> (raw)
In-Reply-To: <CAMGffE=C8mr_G=X8quAO44_0+1u_YNHDULwpBEJzSJnU4A4q9Q@mail.gmail.com>
On 04/29/2016 02:49 PM, Jinpu Wang wrote:
> Hi, all
>
> We hit IO error on fsync, it turns out was because sd treat succeeded
> SYNC as error. From what I checked in SBC spec there is no indication
> we should fail IO in this case, so we create this patch.
>
>
> Best Regards,
>
> Jack Wang
>
> v2:
> No change on patch itself, only resend in body as suggested by Bart,
> still keep the attachment in case mail client break the format.
>
> From 5d1f72d9643ce61cd9f3d312377378c43f171d0c Mon Sep 17 00:00:00 2001
> From: Jack Wang <jinpu.wang@profitbricks.com>
> Date: Mon, 25 Apr 2016 12:05:22 +0200
> Subject: [PATCH] sd: Don't treat succeeded SYNC as error
>
> We hit IO error in our production on multipath devices during resize
> device on target side, the problem turns out sd driver passes up as IO
> error when sense data is UNIT_ATTENTION and ASC && ASCQ indicate
> Capacity data has changed, even storage side sync the data properly.
>
> In order to fix this check in sd_done, report success if condition
> matches.
>
> Sebastian Parschauer report/analyze the bug here:
> https://sourceforge.net/p/scst/mailman/message/34953416/
>
> Signed-off-by: Sebastian Parschauer <s.parschauer@gmx.de>
> Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
> ---
> drivers/scsi/sd.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
Well.
Is there anything which guarantees us that 'capacity data has
changed' will be the only sense code which we'll be seeing as a
response to SYNCHRONIZE CACHE?
I sincerely doubt so.
So why don't you fall back to the default action (ie retry the
command) whenever you hit an UNIT ATTENTION?
This way we would cove any resulting sense code, _and_ would get rid
of the rather ugly special case here.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-02 10:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 12:49 [PATCHv2]sd: Don't treat succeeded SYNC as error Jinpu Wang
2016-05-02 10:05 ` Hannes Reinecke [this message]
2016-05-02 13:44 ` James Bottomley
2016-05-02 13:57 ` James Bottomley
2016-05-04 17:02 ` Jinpu Wang
2016-05-09 16:41 ` Jinpu Wang
2016-05-10 14:48 ` Jinpu Wang
2016-05-10 15:08 ` James Bottomley
2016-05-10 15:46 ` Jinpu Wang
2016-05-10 16:00 ` James Bottomley
2016-05-11 8:21 ` Jinpu Wang
2016-05-11 6:21 ` Hannes Reinecke
2016-05-11 6:43 ` James Bottomley
2016-05-11 15:05 ` James Bottomley
2016-05-12 13:22 ` Jinpu Wang
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=5727266E.7040905@suse.de \
--to=hare@suse.de \
--cc=bart.vanassche@sandisk.com \
--cc=hch@infradead.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=jinpu.wang@profitbricks.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=s.parschauer@gmx.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