All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Felipe Balbi <balbi@kernel.org>
Cc: Kim Bak <kim.bak@gamereactor.dk>, linux-usb@vger.kernel.org
Subject: Re: g_mass_storage module with large drives?
Date: Thu, 2 Sep 2021 10:39:59 -0400	[thread overview]
Message-ID: <20210902143959.GC432266@rowland.harvard.edu> (raw)
In-Reply-To: <875yvjck5t.fsf@kernel.org>

On Thu, Sep 02, 2021 at 02:02:14PM +0300, Felipe Balbi wrote:
> 
> Hi Kim,
> 
> (please keep linux-usb@vger.kernel.org in Cc)
> 
> Kim Bak <kim.bak@gamereactor.dk> 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

      reply	other threads:[~2021-09-02 14:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b558fccf-653a-878e-ef09-6f591fa1cf37@gamereactor.dk>
2021-09-02 11:02 ` g_mass_storage module with large drives? Felipe Balbi
2021-09-02 14:39   ` Alan Stern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210902143959.GC432266@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=balbi@kernel.org \
    --cc=kim.bak@gamereactor.dk \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.