From: Tejun Heo <htejun@gmail.com>
To: Elias Oltmanns <eo@nebensachen.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeff Garzik <jeff@garzik.org>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Pavel Machek <pavel@ucw.cz>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] libata: Implement disk shock protection support
Date: Tue, 05 Aug 2008 08:26:49 +0900 [thread overview]
Message-ID: <48979039.4000000@gmail.com> (raw)
In-Reply-To: <87d4kooh4k.fsf@denkblock.local>
Elias Oltmanns wrote:
>>> I'm rather afraid this approach is impractical or unfavourable at the
>>> very least. Depending on the configured thresholds, a head unload
>>> request might well be issued unintentionally, e.g. by accidentally
>>> knocking against the table. It is quite alright for the HD to stop I/O
>>> for a moment but if the secondary device on the interface happens to be
>>> a CD writer, it will be very annoying to have CD writing operations fail
>>> due to minor percussions.
>> Why would it fail?
>
> To be quite honest, I don't know very much about the way CD writing
> works. I just assumed that delaying queue processing for a CD writer for
> several seconds would have very much the same effect as the input buffer
> of cdrecord getting empty prematurely. Do you mean to say that CD
> writing (or any other time expensive operation I haven't thought of)
> won't be affected irrecoverably by interrupted command processing?
Any modern cd/dvd writer can happily recover from buffer underruns. I
think the physical shock itself has better chance of screwing up the
recording. The only thing to make sure is that no command is issued to
ATAPI devices. Other than that, there should be no problem.
>>> Also, if there are two devices on the same
>>> port that support the UNLOAD FEATURE and you issue a head unload request
>>> to both of them in close succession, the IDLE IMMEDIATE to the second
>>> device will be blocked until the timeout for the first has expired.
>> Unload can be implemented as port-wide operation so that it issues IDLE
>> IMMEDIATE to all drives on the port but given that this is mostly for
>> laptop, this discussion is a bit peripheral.
>
> We can't rule out that the HD is connected as master and CDRW as slave
> to the same controller in a PATA setup. I'm not familiar with the SATA
> configurations in modern laptops though.
On most, they occupy different channels and even when they reside on the
same channel, it just doesn't really matter these days. And even on
those cases, it would be better to use EH as that will make the IDLE
IMMEDIATE command always win the bus as soon as possible while IDLE
IMMEDIATE queued at the head of the drive queue could lose to an ATAPI
command.
Thanks.
--
tejun
next prev parent reply other threads:[~2008-08-04 23:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-26 6:20 [RFC] Disk shock protection in GNU/Linux Elias Oltmanns
2008-07-26 6:23 ` [PATCH 1/5] Make sure that ata_force_tbl is freed in case of an error Elias Oltmanns
2008-07-26 6:24 ` [PATCH 2/5] Introduce ata_id_has_unload() Elias Oltmanns
2008-07-26 16:01 ` Alan Cox
2008-07-26 6:25 ` [PATCH 3/5] libata: Implement disk shock protection support Elias Oltmanns
2008-08-01 7:19 ` Tejun Heo
2008-08-01 22:34 ` Alan Cox
2008-08-03 3:19 ` Tejun Heo
2008-08-03 13:05 ` Alan Cox
2008-08-03 13:58 ` Tejun Heo
2008-08-04 13:43 ` Elias Oltmanns
2008-08-04 13:26 ` Elias Oltmanns
2008-08-04 14:12 ` Tejun Heo
2008-08-04 16:54 ` Elias Oltmanns
2008-08-04 23:26 ` Tejun Heo [this message]
2008-08-04 14:28 ` Gabor Gombas
2008-08-04 14:13 ` Alan Cox
2008-08-04 14:35 ` Tejun Heo
2008-07-26 6:27 ` [PATCH 4/5] ide: " Elias Oltmanns
2008-08-04 6:39 ` Pavel Machek
2008-08-04 14:15 ` Elias Oltmanns
2008-07-26 6:29 ` [PATCH 5/5] Add documentation for hard disk shock protection interface Elias Oltmanns
2008-07-26 9:18 ` Sergei Shtylyov
[not found] <fa.nx0yFPJm+aNXPHgykUrOzZXvvIs@ifi.uio.no>
[not found] ` <fa.NfEr7Ik6e8oextyWICW/jR5emeE@ifi.uio.no>
[not found] ` <fa.zGvATZImeUo0tHJe4hzlk5+mTiM@ifi.uio.no>
[not found] ` <fa.SRVleMItV5QEF7/tgCjSHz0ScJA@ifi.uio.no>
[not found] ` <fa.YKbhgq8XUxH/Qg1ArE+73YsDlpE@ifi.uio.no>
2008-08-05 4:05 ` [PATCH 3/5] libata: Implement disk shock protection support Robert Hancock
2008-08-05 13:14 ` Theodore Tso
2008-08-05 14:29 ` Henrique de Moraes Holschuh
2008-08-05 15:14 ` Eric Piel
2008-08-05 19:59 ` Pavel Machek
2008-08-05 22:57 ` Elias Oltmanns
[not found] ` <48986E3A.5020707@tremplin-utc.net>
2008-08-05 20:00 ` Pavel Machek
2008-08-05 4:16 ` Robert Hancock
2008-08-05 7:49 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48979039.4000000@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=eo@nebensachen.de \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).