The patch looks fine in itself, but it adds a lot of duplication
of code which is always a bad thing. I've done some work recently
to eliminate ATAPI/SCSI redundancy and put most of this in the
Uniform layer. I don't see why changers couldn't be handled
like that, too.
With regards to the cdrom.[ch] parts of the patch - they look
fine, I've put them in my tree here.
> Finally (sorry for the long post!), I have a related question.
> Is there a problem with having large local variables in a kernel
> function? In a few places I have a local (stack based) buffer of 248
> bytes. I see in some places in sr.c `scsi_malloc' is used even
> though the buffer is freed in the same routine. I would have thought
> this adds unnecessary overhead, but am wondering if there is some
> limit to the stack usage in the kernel.
There is a limit of about 8KB-some available kernel stack. I've
recently taken out some of the mallocs in sr*.c which spinlocked
and malloced for as little as 32 bytes which is just silly. If
you came across similar places I'd like to know (it is very
possible that I didn't get them all, I just fixed the ones
I bumped into).
-- * Jens Axboe <axboe@image.dk> * Linux CD-ROM Maintainer * http://www.kernel.dk- 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/