Re: Disk spindown on rmmod sd_mod

From: Tejun Heo
Date: Fri Oct 26 2007 - 06:26:09 EST


Jan Engelhardt wrote:
> I am using 2.6.23-rc9 with pata_sis. `modprobe -r sd_mod`, which I ran
> from initramfs, caused all my disks to spindown - sd even told me so.
>
> I recall there has been talk a while back about whether to spin down
> disks on shutdown or not, but I do not think it touched the removal of
> sd_mod, did it? So either way, can someone fill me in why the spindown
> is done?

The problem is that it's difficult to tell why a disk is going down from
sd_shutdown(), so it issues STOP unless system state is SYSTEM_RESTART.
Maybe we need to issue STOP only for SYSTEM_HALT, SYSTEM_POWER_OFF and
SYSTEM_SUSPEND_DISK.

Thanks.

--
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/