[lkml]   [2010]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FUA bit
    On 07/14/2010 04:44 PM, ext Andy Shevchenko wrote:
    > 2010/7/14 Michał Nazarewicz<>:
    >> On Wed, 14 Jul 2010 11:05:31 +0200, Andy Shevchenko
    >> <> wrote:
    >>> MS Windows mounts removable storage in "Removal optimized mode" by
    >>> default. All the writes to the media are synchronous which is achieved
    >>> by setting FUA (Force Unit Access) bit in SCSI WRITE(10,12) commands.
    >>> This prevents I/O requests aggregation in block layer dramatically
    >>> decreasing performance.
    >>> diff --git a/drivers/usb/gadget/file_storage.c
    >>> b/drivers/usb/gadget/file_storage.c
    >>> index b49d86e..45f58d9 100644
    >>> --- a/drivers/usb/gadget/file_storage.c
    >>> +++ b/drivers/usb/gadget/file_storage.c
    >>> @@ -93,6 +93,8 @@
    >>> * removable Default false, boolean for removable media
    >>> * luns=N Default N = number of filenames, number of
    >>> * LUNs to support
    >>> + * fua=b[,b...] Default false, booleans for ignore FUA
    >>> flag
    >>> + * in SCSI WRITE(6,10,12) commands
    >> I wonder if it makes sense to make it per-LUN. I would imagine that it's
    >> great
    >> to ignore FUA if the device has its own power supply in which case after
    >> disconnect
    >> the data won't be lost. This is a per-device property not really per-LUN.
    >> As such
    >> I'd make this option global for the gadget.
    > Make sense only for removable media with one partition.
    > Otherwise. why we have sync option per partition f.e., not per device?
    by partition do you mean medium? They are different terms.
    A storage medium may have 1 or more logical partitions. It is left upto the
    Host/user to decide how he wants to partition the medium.

    file_storage driver does not deal with partitions. only mediums.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2010-07-14 15:59    [W:0.022 / U:74.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site