Re: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FUA bit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michał Nazarewicz
Date: Wednesday, July 14, 2010 - 7:24 am

On Wed, 14 Jul 2010 15:44:58 +0200, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:


Ah, OK, I see why this is per LUN.  You want to be able not to ignore
FUA if the backing storage is a removable media, right?





This still stands.  The “rc” is not needed.




OK.  I'd use simpre_strol() myself.  Maybe even patched fsg_store_ro().




But there can be a case of switching from async to async when syncing
is not necessary.  That's why I proposed the &&.  With fua = 1 meaning
ignore the flag my proposal would be:

+       if (!i && curlun->fua)
+               fsg_lun_fsync_sub(curlun);


ignore_fua would be better name then I think.  This also stands for
module parameter.

-- 
Best regards,                                        _     _
| Humble Liege of Serenely Enlightened Majesty of  o' \,=./ `o
| Computer Science,  Michał "mina86" Nazarewicz       (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv2] usb: gadget: storage: optional SCSI WRITE FUA bit, Andy Shevchenko, (Wed Jul 14, 2:05 am)
Re: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FU ..., Michał Nazarewicz, (Wed Jul 14, 5:38 am)
Re: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FU ..., Michał Nazarewicz, (Wed Jul 14, 7:24 am)
Re: [PATCHv2] usb: gadget: storage: optional SCSI WRITE FU ..., Michał Nazarewicz, (Wed Jul 14, 10:12 am)