Re: Confused about RAW devices ...

Stephen C. Tweedie (sct@redhat.com)
Mon, 25 Oct 1999 11:00:27 +0100 (BST)


Hi,

On Sat, 23 Oct 1999 13:31:20 +0100 (MET), DAVID BALAZIC
<david.balazic@uni-mb.si> said:

> How does it test the disk change ?

With a TEST_UNIT_READY low-level command.

> My program is :
> open//dev/cdrom)
> seek to 12000345
> read one byte
> close

> If I call this program from shell twice , each will spin up the
> drive.

If the block device is unused (as will be the case between your calls to
the program), and you open the device, it will check disk change. If
the disk has not been changed, then the cache will remain valid.
Whether your cdrom chooses to spin up the drive or not on a
TEST_UNIT_READY command is not a kernel matter!

--Stephen

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