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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 20 2005, Linus Torvalds wrote:
> 
> 
> 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. 

I still think that is weird and not something that should be merged. The
0x01 bit means load the tray and read TOC.

> 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. 

It has no logical implications other than from what pool it allocates,
and we've always used the WRITE pool for these requests. There's no
protection implications.

WRITEs cannot have length 0, and READs cannot as well. Since it's just
one bit for direction, those are the rules.

-- 
Jens Axboe

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux