Date: Tue, 26 Jan 2010 20:17:23 +0100 (CET) From: Alexander Best <alexbestms@wwu.de> To: <freebsd-hackers@FreeBSD.org> Subject: Re: Spin down HDD after disk sync or before power off Message-ID: <permail-20100126191723f7e55a9d00001a52-a_best01@message-id.uni-muenster.de>
next in thread | raw e-mail | index | archive | help
This is a MIME encoded multipart message. --+permail-20100126191723f7e55a9d00001a52-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi there, because of kern/140752 i looked through a discussion back in 2009 (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is being used although the hitachi hdd specs referenced in the pr say that this will not cause proper load/unload and thus an emergency unload will occur which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs. 600.000 shutdowns). unfortunately the discussion back then didn't come up with any sort of decision/patch. attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE instead of ATA_FLUSHCACHE during hdd spin down. could somebody with hdd knowledge comment on this? this matter seems quite important since there may be a chance that the current spin down mechanism in freebsd damages hdds! cheers. alex --+permail-20100126191723f7e55a9d00001a52-a_best01+ Content-Type: text/x-patch Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="atadisk.c.patch" SW5kZXg6IHN5cy9kZXYvYXRhL2F0YS1kaXNrLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9hdGEv YXRhLWRpc2suYyAgICAgIChyZXZpc2lvbiAyMDI4NDgpCisrKyBzeXMvZGV2L2F0YS9hdGEtZGlz ay5jICAgICAgKHdvcmtpbmcgY29weSkKQEAgLTE5MSw4ICsxOTEsOSBAQAogewogICAgIHN0cnVj dCBhdGFfZGV2aWNlICphdGFkZXYgPSBkZXZpY2VfZ2V0X3NvZnRjKGRldik7CiAKLSAgICBpZiAo YXRhZGV2LT5wYXJhbS5zdXBwb3J0LmNvbW1hbmQyICYgQVRBX1NVUFBPUlRfRkxVU0hDQUNIRSkK LSAgICAgICBhdGFfY29udHJvbGNtZChkZXYsIEFUQV9GTFVTSENBQ0hFLCAwLCAwLCAwKTsKKyAg ICBpZiAoYXRhZGV2LT5wYXJhbS5zdXBwb3J0LmNvbW1hbmQyICYgQVRBX1NVUFBPUlRfU1RBTkRC WSkKKyAgICAgICBhdGFfY29udHJvbGNtZChkZXYsIEFUQV9TVEFOREJZX0lNTUVESUFURSwgMCwg MCwgMCk7CisKICAgICByZXR1cm4gMDsKIH0KCg== --+permail-20100126191723f7e55a9d00001a52-a_best01+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-20100126191723f7e55a9d00001a52-a_best01>