Re: [PATCH rc6] block: Fix CDROMEJECT to work in more cases

From: Linus Torvalds
Date: Tue Dec 20 2005 - 12:33:16 EST




On Mon, 19 Dec 2005, Ben Collins wrote:
>
> This changes the request to a READ instead of WRITE. Also adds and calls
> blk_send_allow_medium_removal() for CDROMEJECT case.

Can you tell why it also does that START_STOP/1 thing? That looks a bit
strange.

Also, can somebody go through the READ/WRITE difference for me for a
zero-length command? If the _only_ difference is a protection one (WRITE
commands need write permissions), then I'm ok with this (I think it's
very reasonable that somebody who can read a cd-rom can also eject it),
but if there's some SCSI layer logic that says "writes cannot have length
0", then I think that's a bug.

Linus
-
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/