Re: [PATCH #upstream-fixes UPDATED] libata: fix last_reset timestamp handling

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

 



Tejun Heo wrote:
ehc->last_reset is used to ensure that resets are not issued too close
to each other.  It's initialized to jiffies minus one minute on EH
entry.  However, when new links are initialized after PMP is probed,
new links have zero for this timestamp resulting in long wait
depending on the current jiffies.

This patch makes last_set considered iff ATA_EHI_DID_RESET is set, in
which case last_reset is always initialized.  As an added precaution,
WARN_ON() is added so that warning is printed if last_reset is in
future.

This problem is spotted and debugged by Shane Huang.

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
Cc: Shane Huang <Shane.Huang@xxxxxxx>
---
This one also should go into 2.6.27-x.  Thanks.

Minor update.  Kill ehc->last_reset update right after
ata_eh_about_to_do().  This does no harm but is unnecessary with the
patch applied.

 drivers/ata/libata-eh.c |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

applied

--
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