linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix return code for ioctl( BLKRRPART ) if device is down
@ 2015-03-24 10:16 Fam Zheng
  2015-03-24 10:16 ` [PATCH 1/3] block: Return error in rescan_partitions if revalidating disk failed Fam Zheng
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Fam Zheng @ 2015-03-24 10:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jens Axboe, James E.J. Bottomley, linux-scsi, famz

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(-)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-22  4:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24 10:16 [PATCH 0/3] Fix return code for ioctl( BLKRRPART ) if device is down Fam Zheng
2015-03-24 10:16 ` [PATCH 1/3] block: Return error in rescan_partitions if revalidating disk failed Fam Zheng
2015-04-22  2:58   ` James Bottomley
2015-04-22  4:13     ` Fam Zheng
2015-03-24 10:16 ` [PATCH 2/3] sd: Return error in sd_revalidate_disk if read capacity failed Fam Zheng
2015-03-24 10:16 ` [PATCH 3/3] sd: Return -EIO " Fam Zheng
2015-03-24 10:34 ` [PATCH 0/3] Fix return code for ioctl( BLKRRPART ) if device is down Paolo Bonzini
2015-03-24 10:42   ` Fam Zheng
2015-04-16  5:05   ` Fam Zheng

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).