Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-24 Thread Jeff Garzik
On 09/18/2012 04:31 AM, Aaron Lu wrote: I agree that it is better handled in libata's SALT, I tried to do this but didn't find a good way so I introduced this flag. The SALT is 1-1 mapping, I'm not sure how to handle this 1-2 mapping. That is the crux of the matter: it is rather difficult with

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 09:20:20AM +0100, James Bottomley wrote: > On Tue, 2012-09-18 at 16:09 +0800, Aaron Lu wrote: > > On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > > > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > > > When scsi device received stop command, it will

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread James Bottomley
On Tue, 2012-09-18 at 16:09 +0800, Aaron Lu wrote: > On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > > When scsi device received stop command, it will take care of its > > > internal cache before enters stopped power condit

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > When scsi device received stop command, it will take care of its > > internal cache before enters stopped power condition. This command is > > translated to standby immediate in

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread James Bottomley
On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > When scsi device received stop command, it will take care of its > internal cache before enters stopped power condition. This command is > translated to standby immediate in libata-scsi, but standby doesn't > imply flush cache for ATA device, so

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 09:30:11AM +0200, Oliver Neukum wrote: > On Tuesday 18 September 2012 15:00:28 Aaron Lu wrote: > > When scsi device received stop command, it will take care of its > > internal cache before enters stopped power condition. This command is > > translated to standby immediate i

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Oliver Neukum
On Tuesday 18 September 2012 15:00:28 Aaron Lu wrote: > When scsi device received stop command, it will take care of its > internal cache before enters stopped power condition. This command is > translated to standby immediate in libata-scsi, but standby doesn't > imply flush cache for ATA device,

[PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
When scsi device received stop command, it will take care of its internal cache before enters stopped power condition. This command is translated to standby immediate in libata-scsi, but standby doesn't imply flush cache for ATA device, so to issue stop command to ATA device, an additional flush ca