From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752359AbbCXKex (ORCPT ); Tue, 24 Mar 2015 06:34:53 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:34276 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbbCXKev (ORCPT ); Tue, 24 Mar 2015 06:34:51 -0400 Message-ID: <55113DC7.7080002@redhat.com> Date: Tue, 24 Mar 2015 11:34:47 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Fam Zheng , linux-kernel@vger.kernel.org CC: Jens Axboe , "James E.J. Bottomley" , linux-scsi@vger.kernel.org Subject: Re: [PATCH 0/3] Fix return code for ioctl( BLKRRPART ) if device is down References: <1427192175-23802-1-git-send-email-famz@redhat.com> In-Reply-To: <1427192175-23802-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/03/2015 11:16, Fam Zheng wrote: > If issued right after link down, "blockdev --rereadpt" will be stuck for a > while and then return normally. Although the underlying capacity and partition > table are not correctly updated. And it means that userspace can't detect the > error at all. > > Fix this by propargating the error of "read capacity" command through the > stack, so that the ioctl could fail with -EIO. > > Fam Zheng (3): > block: Return error in rescan_partitions if revalidating disk failed > sd: Return error in sd_revalidate_disk if read capacity failed > sd: Return -EIO if read capacity failed > > block/partition-generic.c | 6 +++--- > drivers/scsi/sd.c | 22 +++++++++++++--------- > 2 files changed, 16 insertions(+), 12 deletions(-) > Reviewed-by: Paolo Bonzini Though patch 3 could be seen as a change in userspace ABI, so I'm less sure about it. Paolo