All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <roger.quadros@nokia.com>
To: ext Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Michał Nazarewicz" <m.nazarewicz@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Shevchenko Andriy (EXT-Teleca/Helsinki)"
	<ext-andriy.shevchenko@nokia.com>,
	"Karpov Denis.2 (EXT-Teleca/Helsinki)"
	<ext-denis.2.karpov@nokia.com>,
	"Hunter Adrian (Nokia-MS/Helsinki)" <adrian.hunter@nokia.com>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"David Brownell" <dbrownell@users.sourceforge.net>,
	"Greg Kroah-Hartman" <gregkh@suse.de>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FUA bit
Date: Wed, 14 Jul 2010 16:55:33 +0300	[thread overview]
Message-ID: <4C3DC1D5.4060406@nokia.com> (raw)
In-Reply-To: <AANLkTil1eG5yzBxvryf-TZINYjeGph-rNz8eELQtm5tj@mail.gmail.com>

On 07/14/2010 04:44 PM, ext Andy Shevchenko wrote:
> 2010/7/14 Michał Nazarewicz<m.nazarewicz@samsung.com>:
>> On Wed, 14 Jul 2010 11:05:31 +0200, Andy Shevchenko
>> <andy.shevchenko@gmail.com>  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.

regards,
-roger

  reply	other threads:[~2010-07-14 13:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13  8:36 [PATCH] usb: gadget: storage: optional SCSI WRITE FUA bit Andy Shevchenko
2010-07-13 14:09 ` Alan Stern
2010-07-14  9:05   ` [PATCHv2] " Andy Shevchenko
2010-07-14 12:38     ` Michał Nazarewicz
2010-07-14 13:44       ` Andy Shevchenko
2010-07-14 13:55         ` Roger Quadros [this message]
2010-07-16  7:54           ` Felipe Balbi
2010-07-16  8:38             ` Roger Quadros
2010-07-14 14:24         ` Michał Nazarewicz
2010-07-14 15:05           ` Andy Shevchenko
2010-07-14 17:12             ` Michał Nazarewicz
2010-07-15  9:07           ` [PATCHv3 1/2] usb: gadget: storage: strict coversion of 'ro' parameter Andy Shevchenko
2010-07-15  9:07             ` [PATCHv3 2/2] usb: gadget: storage: optional SCSI WRITE FUA bit Andy Shevchenko
2010-07-21 19:17               ` Greg KH
2010-07-22  8:58                 ` [PATCHv4 1/2] usb: gadget: storage: strict coversion of 'ro' parameter Andy Shevchenko
2010-07-22  8:58                   ` [PATCHv4 2/2] usb: gadget: storage: optional SCSI WRITE FUA bit Andy Shevchenko
2010-07-22 14:13                     ` Alan Stern
2010-07-22 14:27                       ` Andy Shevchenko
2010-07-22 14:53                       ` [PATCHv5] " Andy Shevchenko
2010-07-22 14:07                   ` [PATCHv4 1/2] usb: gadget: storage: strict coversion of 'ro' parameter Alan Stern
2010-07-22 14:17                     ` Michał Nazarewicz
2010-07-21 19:17             ` [PATCHv3 " Greg KH

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=4C3DC1D5.4060406@nokia.com \
    --to=roger.quadros@nokia.com \
    --cc=adrian.hunter@nokia.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=ext-andriy.shevchenko@nokia.com \
    --cc=ext-denis.2.karpov@nokia.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.nazarewicz@samsung.com \
    --cc=stern@rowland.harvard.edu \
    /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.