Re: [PATCH 03/12] libata-pmp: implement ATA_LFLAG_DISABLED

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

 



Jeff Garzik wrote:
Tejun Heo wrote:
Implement ATA_LFLAG_DISABLED. The flag indicates the link is disabled due to EH recovery failure. While a link is disabled, no EH action is taken on the link and suspend/resume become noop too. For host port, this doesn't introduce any behavior change other than not invoking hotplug sequence on failed ports on resume and this behavior change is intended.

why?

libata should notice new devices, when resuming.

It will do so on links which are operating normally. ATA_LFLAG_DISABLED is set only when libata EH fails to recover the link (link hardreset failure) which takes quite some retries and is more severe than device recovery failure. This is the red marking screaming "stay away from this link!". For example, let's say a notebook has a broken SATA link to drive bay and EH failed it. Without the above behavior, libata EH will try to recover the link on every resume which is both inconvenient and incorrect.

The thing is that resume from sleep is a link-resuming operation but not
a hotplug event, just as PMP slave link resets following host link reset
are link-resuming but not hotplugging.  IOW, resume doesn't positively
indicate that the attached device could have been changed.

libata EH doesn't need hotplug events to do hotplugging. If it detects such events during EH, it will perform the needed operations, but there are things which are appropriate only when hotplug event is positively indicated like detaching disabled (failed) devices or re-enabling failed links.

--
tejun


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