Re: [PATCH] barrier patch set
From: Jeff Garzik
Date: Fri Mar 19 2004 - 11:36:42 EST
Jens Axboe wrote:
Cosmetic stuff that will get ironed out. You can find the patches here:
ftp://ftp.kernel.org/pub/linux/kernel/people/axboe/patches/v2.6/2.6.5-rc1-mm2/
ide-barrier-2.6.5-rc1-mm2-1
ide/core part
WRT ATA and flush-cache... before the IDE pieces of this patch are
merged, IMO it is a requirement that the entire flush-cache stuff gets a
review. ide_get_error_location() is one of the important pieces
(great!). Another important piece is to make sure that a drive's
flush-cache capability is correctly deduced and set up from the
identify-device. The steps look like
- check identify-device word 83, bits 12 (flush cache) and 13 (flush
cache ext)
- issue set-features command to get flush-cache into proper state
(enabled or disabled, as the user desires), if identify-device word 86
indicates it is not already in the state you seek.
- re-read identify [packet] device page from device, make sure
flush-cache[-ext] is enabled. A slacker could just make sure the
set-features command completed successfully, but to be 100% correct you
need to re-read the identify-device page. :/
NOTE 1: these steps are specific to the flush-cache command, and are
only vaguely related to write caching (which must be tested-for and
enabled separately). It is important to go through these steps
separately for write-caching and flush-cache[-ext].
Write-caching and flush-cache-command state should always be considered
separately, even though the two are often used together. I want to
avoid the LG cdrom debacle, where not properly checking for, and setting
up, flush-cache resulted in turning cdroms into bricks.
NOTE 2: Don't forget to check for 0x0000 or 0xffff in word 86, of
__only__ identify-packet-device. These special case meanings do not
appear for ATA devices, only ATAPI devices.
NOTE 3: flush-cache-ext should always be used on lba48 devices, even if
the request was inside the lba28 limit.
NOTE 4: flush-cache-ext does not exist on ATAPI devices.
Jeff
-
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/