libata: make user scan wait for scan to complete
PATCH 1/1 libata: make user scan wait for scan to complete
Make user scan wait for scan to complete. This way user can wait for warm plug request to complete and is prevented from causing EH event storm by repetitively issuing scan request while EH is in progress.
drivers/ata/libata-scsi.c +5 -3
@@ -3138,10 +3138,12 @@ static int ata_scsi_user_scan(struct Scs rc = -EINVAL ; } -if (rc ==0 ) +if (rc ==0 ) {ata_port_schedule_eh (ap); - -spin_unlock_irqrestore (ap->lock, flags); +spin_unlock_irqrestore (ap->lock, flags); +ata_port_wait_eh (ap); + }else +spin_unlock_irqrestore (ap->lock, flags);return rc; }
Quoted 14 lines · Tejun Heo
Make user scan wait for scan to complete. This way user can wait for warm plug request to complete and is prevented from causing EH event storm by repetitively issuing scan request while EH is in progress.
Signed-off-by Tejun Heo <[email protected]>Cc Fajun Chen <[email protected]>drivers/ata/libata-scsi.c +0
-0@@ -3138,10 +3138,12 @@ static int ata_scsi_user_scan(struct Scs rc = -EINVAL ; }
drivers/ata/libata-scsi.c static int ata_scsi_user_scan(struct Scs · line 3146
Quoted 10 lines
drivers/ata/libata-scsi.c +5
-3-if (rc ==0 ) +if (rc ==0 ) {ata_port_schedule_eh (ap); - -spin_unlock_irqrestore (ap->lock, flags); +spin_unlock_irqrestore (ap->lock, flags); +ata_port_wait_eh (ap); + }else +spin_unlock_irqrestore (ap->lock, flags);
Given that we are now 2.6.19-rc1, would you say this applies to #upstream-fixes or #upstream?
I'm OK with it either way.
Jeff
Quoted 28 lines · Jeff Garzik
Quoted 14 lines · Tejun Heo
Make user scan wait for scan to complete. This way user can wait for warm plug request to complete and is prevented from causing EH event storm by repetitively issuing scan request while EH is in progress.
Signed-off-by Tejun Heo <[email protected]>Cc Fajun Chen <[email protected]>drivers/ata/libata-scsi.c +0
-0@@ -3138,10 +3138,12 @@ static int ata_scsi_user_scan(struct Scs rc = -EINVAL ; }drivers/ata/libata-scsi.c static int ata_scsi_user_scan(struct Scs · line 3146
Quoted 10 lines
drivers/ata/libata-scsi.c +5
-3-if (rc ==0 ) +if (rc ==0 ) {ata_port_schedule_eh (ap); - -spin_unlock_irqrestore (ap->lock, flags); +spin_unlock_irqrestore (ap->lock, flags); +ata_port_wait_eh (ap); + }else +spin_unlock_irqrestore (ap->lock, flags);Given that we are now 2.6.19-rc1, would you say this applies to #upstream-fixes or #upstream?
Quoted 1 line
I'm OK with it either way.
I don't think this patch is urgent. Let's queue it in #upstream.
Signature · 1 line
tejun
Jeff Garzik
AppliedQuoted 6 lines · Tejun Heo
Make user scan wait for scan to complete. This way user can wait for warm plug request to complete and is prevented from causing EH event storm by repetitively issuing scan request while EH is in progress.
Signed-off-by Tejun Heo <[email protected]>Cc Fajun Chen <[email protected]>
applied