On Mon, 2014-08-25 at 16:21 -0400, Alan Stern wrote:
> On Mon, 25 Aug 2014, Alfredo Dal Ava Junior wrote:
> 
> > Well, it is causing problems anyway... from user perspective, it's a
> > Linux compatibility issue, as it works "fine" on Windows. I'm not an
> > expert, but I'm wondering that if usb-storage could set capacity as
> > "UNDETERMINED"/ Zero (or keep using the readcapacity_10 as it as
> with
> > some flag signalizing it as inaccurate), EFI partition check would
> be
> > able to ignore size and look for secondary GPT where it really is.
> 
> Part of the problem is that usb-storage has no way to know that
> anything strange is going on.  It's normal for READ CAPACITY(16) to
> fail (this depend on the SCSI level), and it's normal for the READ
> CAPACITY(10) to report a value less than 2 TB.

Just set US_FL_NEEDS_CAP16. If READ CAPACITY(16) fails in that case,
it is clear that something is wrong. It must be set or READ CAPACITY(10)
alone would be taken as giving a valid answer.

At that time we are sure that the drive will be unusable unless we
determine the correct capacity, so we don't make matters worse if we
crash it.

Is there an easy way for Alfredo to determine what happens if we
read beyond the end?

        Regards
                Oliver


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

Reply via email to