From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: 'LKML' <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512)
Date: Tue, 13 Aug 2019 03:47:09 +0000 [thread overview]
Message-ID: <BYAPR04MB5816F39A6F073D77499B8D85E7D20@BYAPR04MB5816.namprd04.prod.outlook.com> (raw)
In-Reply-To: yq1r25p7qzp.fsf@oracle.com
On 2019/08/12 19:12, Martin K. Petersen wrote:
>
> Justin,
>
>>> Attached 2 x brand new Western Digital 8TB USB 3.0 drives awhile back
>>> and ran some file copy tests and was getting these warnings-- is
>>> there any way to avoid these warnings? I did confirm with parted
>>> that the partition was aligned but this appears to be something
>>> related to the firmware on the device according to [1] and [2]?
>
>> sg_vpd_bdc.txt
>> Block device characteristics VPD page (SBC):
>> Nominal rotation rate: 5400 rpm
>> Product type: Not specified
>> WABEREQ=0
>> WACEREQ=0
>> Nominal form factor: 3.5 inch
>> ZONED=0
>
> Damien: What can we do to limit the messages in cases like this? Would
> it make sense to make the residual warning conditional on sd_is_zoned()?
>
These WD drives are regular disks, not SMR. Making the warning conditional on
sd_is_zoned() will not reduce the amount of messages. REPORT ZONES is the only
command that could result in a resid not being aligned to the block size since
by definition the command reply is composed of 64B zone descriptors. But that
command is now processed through a device method and is not a REQ_OP_XXX
anymore, so as an internal req, it does not go through sd_done() for completion
right ? All other zone commands either have no buffer, or the exact same
requirement as regular disks, expecting a block aligned resid. So I think that
using sd_is_zoned() is not relevant to this problem.
Bottom line: this USB adapter is weird and likely triggers all the unaligned
resid. I do get regularly reports of similar problem with SAS HBAs, all always
fixed with HBA FW updates. Not sure if there is a FW available for these drives.
I will ask internally.
In the mean time, rate limiting or removing the sd_printk() call may be the only
option. Failing all commands with an invalid resid would be safer I guess, but
will at best likely cause a lot of retry on these buggy devices, and break the
drive operation/perfomance completely in the worst case.
Or the usb mass storage device driver could add some silent forced resid
alignment too.
Best regards.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2019-08-13 3:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-03 9:10 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512) Justin Piszcz
2019-08-03 11:36 ` Markus Reichelt
2019-08-03 19:00 ` Alan Stern
2019-08-03 19:37 ` Justin Piszcz
2019-08-08 2:03 ` Martin K. Petersen
2019-08-08 8:27 ` Justin Piszcz
2019-08-13 2:12 ` Martin K. Petersen
2019-08-13 3:47 ` Damien Le Moal [this message]
2019-08-13 10:48 ` Damien Le Moal
2019-08-13 20:58 ` Justin Piszcz
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=BYAPR04MB5816F39A6F073D77499B8D85E7D20@BYAPR04MB5816.namprd04.prod.outlook.com \
--to=damien.lemoal@wdc.com \
--cc=jpiszcz@lucidpixels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.petersen@oracle.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).