Re: [usb-storage] [PATCH] SCSI: add check_capacity flag and sd_read_last_sector()

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

 



On Wed, Apr 22, 2009 at 10:42:36AM -0400, Alan Stern wrote:
> This patch (as1196) adds a new scsi_device flag to tell sd.c that it
> should verify the results of READ CAPACITY by trying the read the last
> sector.

Hi Alan,

I can see why you want to do this, but allow me to mutter a bit nevertheless.
Many devices are flaky and get into strange states requiring error-recovery
or reboot when you try an I/O that they do not like.
For this reason, and also for aesthetical reasons, I would prefer never to
do I/O to a device unless user space asks for it.

(So - this would be much more work, but I would prefer a capacity value
that says "it reported this, but we have not checked yet - try an actual
I/O if you really want to know", and leave it at that until the value is
needed. Typically one needs the value (i) to check against it if one
wants to do I/O, or (ii) when user space asks for it because some fdisk type
program is invoked. In case (i) an additional read is superfluous.
In case (ii) user space asked and we try to make sure.)

Comments?

Andries

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux