[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#934331: linux: backport "dm: disable DISCARD if the underlying storage no longer supports it"?



Control: forwarded 934331 https://lore.kernel.org/stable/20190818155941.GA26766@eldamar.local/

Hi Chris,

On Fri, Aug 09, 2019 at 11:12:36PM +0200, Chris Hofstaedtler wrote:
> Package: linux
> Version: 4.9.168-1+deb9u4
> Severity: normal
> 
> Hi!
> 
> Today I ran into an issue that matches the description of upstream
> commit bcb44433bba5eaff293888ef22ffa07f1f0347d6:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bcb44433bba5eaff293888ef22ffa07f1f0347d6
> 
> > dm: disable DISCARD if the underlying storage no longer supports it
> >
> > Storage devices which report supporting discard commands like
> > WRITE_SAME_16 with unmap, but reject discard commands sent to the
> > storage device.  This is a clear storage firmware bug but it doesn't
> > change the fact that should a program cause discards to be sent to a
> > multipath device layered on this buggy storage, all paths can end up
> > failed at the same time from the discards, causing possible I/O loss.
> >
> > The first discard to a path will fail with Illegal Request, Invalid
> > field in cdb, e.g.:
> >  kernel: sd 8:0:8:19: [sdfn] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> >  kernel: sd 8:0:8:19: [sdfn] tag#0 Sense Key : Illegal Request [current]
> >  kernel: sd 8:0:8:19: [sdfn] tag#0 Add. Sense: Invalid field in cdb
> >  kernel: sd 8:0:8:19: [sdfn] tag#0 CDB: Write same(16) 93 08 00 00 00 00 00 a0 08 00 00 00 80 00 00 00
> >  kernel: blk_update_request: critical target error, dev sdfn, sector 10487808
> 
> The patch was CC'ed to stable but doesn't seem to appear in 4.19.y.
> 
> Unfortunately this appears to be a transient bug in the storage
> firmware, so I don't know how to reproduce it -- deleting and rescanning
> the sdX device has cleared the repeated error condition for now.
> 
> However I'd really like to avoid corrupting the involved file systems,
> so if bcb44433bba5eaff293888ef22ffa07f1f0347d6 could make it into either
> the 4.9 branch or the 4.19 branch, that'd be lovely.
> 
> I've also asked the storage vendor what they think about this, but I'm
> not going to hold my breath.

I have sent
https://lore.kernel.org/stable/20190818155941.GA26766@eldamar.local/
let's see what happends. 4.19 should be easier than 4.9, but given Ben
has backported the change to 3.16.72 this should be possible for both
4.9 and 4.19.

Regards,
Salvatore


Reply to: