From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.136]:40794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751203AbcJGRmy (ORCPT ); Fri, 7 Oct 2016 13:42:54 -0400 Date: Fri, 7 Oct 2016 10:42:49 -0700 From: Shaohua Li To: Sitsofe Wheeler Cc: Shaohua Li , linux-raid@vger.kernel.org, Kernel-team@fb.com, "v3.6" Subject: Re: [PATCH 1/2] RAID1: ignore discard error Message-ID: <20161007174249.GB37192@kernel.org> References: <36b0390e404e6021f2aec98ee87c074eef6dc6bb.1475788662.git.shli@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Fri, Oct 07, 2016 at 11:53:07AM +0100, Sitsofe Wheeler wrote: > On 6 October 2016 at 22:20, Shaohua Li wrote: > > Sitsofe, > > could you try if this patch fixes the issue too please? > > As with with the previous patch the BUG_ON/crash is fixed and as > before dmesg only says this now: > [ 17.884175] sd 0:0:1:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK > driverbyte=DRIVER_SENSE > [ 17.884180] sd 0:0:1:0: [sdb] tag#0 Sense Key : Illegal Request [current] > [ 17.884185] sd 0:0:1:0: [sdb] tag#0 Add. Sense: Invalid command > operation code > [ 17.884190] sd 0:0:1:0: [sdb] tag#0 CDB: Write same(16) 93 08 00 00 > 00 00 00 00 40 80 00 00 08 00 00 00 > [ 17.884196] blk_update_request: critical target error, dev sdb, sector 16512 > [ 17.884205] sd 0:0:2:0: [sdc] tag#1 FAILED Result: hostbyte=DID_OK > driverbyte=DRIVER_SENSE > [ 17.884208] sd 0:0:2:0: [sdc] tag#1 Sense Key : Illegal Request [current] > [ 17.884211] sd 0:0:2:0: [sdc] tag#1 Add. Sense: Invalid command > operation code > [ 17.884215] sd 0:0:2:0: [sdc] tag#1 CDB: Write same(16) 93 08 00 00 > 00 00 00 00 40 80 00 00 08 00 00 00 > [ 17.884217] blk_update_request: critical target error, dev sdc, sector 16512 > [ 17.924716] Buffer I/O error on dev dm-0, logical block 0, async page read > > (sd[bc] are the devices the RAID is using) > > However this time around blkdiscard doesn't return an error (despite > the discard not being done) and is quiet. It's hard to say if this is > desirable given that the underlying devices switch to saying they > don't support discard but perhaps that's part of a different > discussion. Yep, I think the spec doesn't require discard IO returns error. We probably can make this smarter later in MD > Tested-by: Sitsofe Wheeler Thanks for the testing, I'll queue the two patches. Thanks, Shaohua