Re: [PATCH] libata: make user scan wait for scan to complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun Heo wrote:
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 <htejun@xxxxxxxxx>
Cc: Fajun Chen <fajunchen@xxxxxxxxx>

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 3986ec8..e1fe832 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -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);

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



-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux