From: Pavel Machek <pavel@suse.cz>
To: Hui Cheng <hcheng@cse.unl.edu>
Cc: Alejandro Bonilla <abonilla@linuxwireless.org>,
Pavel Machek <pavel@suse.cz>,
kernelnewbies@nl.linux.org, linux-kernel@vger.kernel.org
Subject: Re: How to quickly detect the mode change of a hard disk?
Date: Sat, 19 Nov 2005 23:44:50 +0000 [thread overview]
Message-ID: <20051119234450.GB1952@spitz.ucw.cz> (raw)
In-Reply-To: <Pine.GSO.4.44.0511181333540.20511-100000@cse.unl.edu>
Hi!
> > > > I am currently doing a kernel module involves detecting/changing
> > > > disk mode among STANDBY and ACTIVE/IDLE. I used ide_cmd_wait() to issue
> > > > commands like WIN_IDLEIMMEDIATELY and WIN_STANDBYNOW1. The problem is, a
> > > > drive in standby mode will automatically awake whenever a disk operation
> > > > is requested and I need to know the mode change as soon as possible. (So I
> > >
> > > AFAIK there's no nice way to get that info, but it is useful, so
> > > patch would be welcome.
> >
> > I would check the hdparm man page again. Still, it sounds interesting.
> >
> > Additionally, it could be cool if someone could finish up or make the option
> > for the HD freeze to use it with the HDAPS driver. ;-)
> >
> > .Alejandro
> >
>
> Thanks for reply :) What I did to handle this problem is a little stupid
> : Suppose the disk is now in a standby mode. In case that there is a
> request sent to the disk drive, a kernel thread is awake to detect/update
> the current disk power mode. The disk power mode is stored in the
> ide_drive_t structure and be protected by lock. It seems to work fine in
> my simple tests. But again, there should be better solutions.
Can we get the patch?
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
next prev parent reply other threads:[~2005-11-20 21:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-10 22:34 [PATCH] getrusage sucks Claudio Scordino
2005-11-11 5:06 ` David Wagner
2005-11-11 19:09 ` Lee Revell
2005-11-11 19:13 ` David Wagner
2005-11-12 17:45 ` How to quickly detect the mode change of a hard disk? Hui Cheng
2005-11-13 15:10 ` Pavel Machek
2005-11-16 18:58 ` Alejandro Bonilla
2005-11-18 19:41 ` Hui Cheng
2005-11-19 23:44 ` Pavel Machek [this message]
2005-11-22 15:39 ` Hui Cheng
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=20051119234450.GB1952@spitz.ucw.cz \
--to=pavel@suse.cz \
--cc=abonilla@linuxwireless.org \
--cc=hcheng@cse.unl.edu \
--cc=kernelnewbies@nl.linux.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®