mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bodo Eggert <7eggert@gmx.de>
To: Tejun Heo <htejun@gmail.com>, David Greaves <david@dgreaves.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	IDE Linux <linux-ide@vger.kernel.org>,
	ballen@gravity.phys.uwm.edu
Subject: Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
Date: Sat, 02 Jun 2007 23:27:40 +0200	[thread overview]
Message-ID: <E1Hub8O-0000rF-Hb@be1.lrz> (raw)
In-Reply-To: <8rA7H-1B4-1@gated-at.bofh.it>

Tejun Heo <htejun@gmail.com> wrote:
> David Greaves wrote:

>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
>> disabled when I resume.

<snip>

Maybe it's disabled by the BIOS?

> According to the ATA standard, the device (drive) itself is responsible
> for preserving SMART enabled status over power cycles.  It seems your
> drive doesn't wanna do that.  I don't think mangling with SMART setup in
> the kernel is wise thing to do.  Bruce, any ideas?  Maybe hook smartd
> such that it gets suspend/resume events?

1) Enabling smart is a single command
2) The command should not fail, and if it fails, it's probably because
   it's not supported. There is nothing userspace can do better or worse.
3) There should be no bad effect from enabling smart, except if the BIOS
   insists on not booting because of a bad RAID disk. (That's why I like
   to disable it in the BIOS)
4) Not enabling smart is a common failure in many setups. Usurally the admin
   will have to enumerate the attached disks and patch the smartctl startup
   scripts.
5) Sometimes there is no smartd (or udev) running, and you'll still not want
   to re-enable smart each time you suspend.
6) A simple udev rule or smartd hook should be bigger than the code required
   in-kernel.

Therefore I suggest setting the smart-enabled-bit in the kernel, in spite of
not being the kernel's duty. It would be a 99,99% DTRT.

OTOH: What would happen if the drive's command queue is full?
What happens for DMA handling (can we hitch-hike)?
Is it possible to just enqueue "enable_smart($DEV)"?

-- 
Top 100 things you don't want the sysadmin to say:
48. Tell me again what that '-r' option to rm does

Friß, Spammer: VmngZze7@fc.7eggert.dyndns.org EPlKiav@7eggert.dyndns.org

       reply	other threads:[~2007-06-02 21:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8rnax-6XX-11@gated-at.bofh.it>
     [not found] ` <8rA7H-1B4-1@gated-at.bofh.it>
2007-06-02 21:27   ` Bodo Eggert [this message]
2007-06-02 22:18     ` Jeff Garzik
2007-06-02 22:22     ` Alan Cox
2007-06-01 21:41 David Greaves
2007-06-02  9:45 ` Tejun Heo
2007-06-02 21:53   ` David Greaves
2007-06-04 16:29     ` Mark Lord
2007-06-04 17:22       ` David Greaves
2007-06-05  4:17         ` Mark Lord
2007-06-05  9:03           ` David Greaves
2007-06-05 15:33             ` Mark Lord

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=E1Hub8O-0000rF-Hb@be1.lrz \
    --to=7eggert@gmx.de \
    --cc=ballen@gravity.phys.uwm.edu \
    --cc=david@dgreaves.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®