lkml.org 
[lkml]   [2005]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH rc6] block: Fix CDROMEJECT to work in more cases
On Tue, 2005-12-20 at 21:53 +0100, Jens Axboe wrote:
> On Tue, Dec 20 2005, Ben Collins wrote:
> > However, I don't see the issue with using READ. We know this isn't a
> > write operation, we are sending a single command with no data. I know
> > you say reads are precious, but 3 requests for something that isn't
> > going to happen very often doesn't seem that bad.
>
> It's not a READ either!
>
> Yes I'm being stubborn, but my point stands. I'm not changing something
> that is perfectly valid, "just because". If it finds a bug (you
> mentioned ide-cd, I still want the details on that when you have the
> time), then it's all for the better since it would bite us for other
> paths as well.
>
> In summary - it's not a bug, it doesn't need fixing.

Then for the sake of nothing other than consistency, fix sg_io() to use
WRITE for cases where data_len==0? That means it would use READ only
when data is actually being read, and WRITE for everything else,
including all zero data commands (sounds sort of backwards to me,
though). Currently, it does the opposite. The main point being that
sending these commands from SG_IO ioctl should be the same as they get
sent from CDROMEJECT ioctl.

I wonder how many bugs will pop up if you do that. Probably less now
that the scsi code is fixed.

--
Ben Collins <ben.collins@ubuntu.com>
Developer
Ubuntu Linux

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

\
 
 \ /
  Last update: 2005-12-20 22:49    [W:0.073 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site