Re: g_mass_storage module with large drives?

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

 



On Thu, Sep 02, 2021 at 02:02:14PM +0300, Felipe Balbi wrote:
> 
> Hi Kim,
> 
> (please keep linux-usb@xxxxxxxxxxxxxxx in Cc)
> 
> Kim Bak <kim.bak@xxxxxxxxxxxxxx> writes:
> 
> > Hi Felipe
> >
> > I'm not sure who or where to ask this question so i write directly to
> > you.
> 
> we should include the mailing list ;-)
> 
> > I'm trying to get g_mass_storage to work with a large backing file or
> > device, but it seems to be capped at 2Tb.
> >
> > This is probably limited by the 512 bytes block size.

The driver doesn't support block sizes larger than 512 bytes for regular 
files.  But when a block device is used as the backing store, the driver 
uses the device's own logical block size, whatever that is.

Also, the driver doesn't support READ(16), WRITE(16), or related commands.  
Consequently it is limited to using only the first 2^32 blocks of the 
backing store.

> > Is there any way to get the module to expose drives larger than 2Tb?

Partition the drive into regions smaller than 2 TB and expose the different 
partitions as different logical units.  Or use a block device that has a 
larger block size.  Or modify the driver to add support for larger-capacity 
backing store.

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux