Re: sg driver and Fedora Core 2

Jens Axboe
2004-05-28T14:28:18Z

On Fri, May 28 2004, Jens Axboe wrote:
> > There seems to be mixed signals coming from the Fedora camp
> > on this change. A "policy" change was one response and this
> > url ( http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=123876 )
> > has Alan Cox stating that this change is a bug.
>
> That's not the identical issue, it's due to usb storage setting 120KB as
> the max size causing sg_set_reserved_size() to fail.

>From what I read of the documentation on sgv3, the reserved size is some
old relic that isn't even of interesting to the block layer sg
"implementation" (we don't keep memory reserved for requests, it's
mapped from the user).

Douglas, can I expect applications to break with this patch? They are
allowed to set a reserved size of eg 512KB, even if we'll later reject a
256KB command if it's sent to an ATAPI drive.

===== drivers/block/scsi_ioctl.c 1.42 vs edited =====
--- 1.42/drivers/block/scsi_ioctl.c 2004-04-27 15:20:34 +02:00
+++ edited/drivers/block/scsi_ioctl.c 2004-05-28 16:26:10 +02:00
@@ -89,8 +89,6 @@

if (size < 0)
return -EINVAL;
- if (size > (q->max_sectors << 9))
- return -EINVAL;

q->sg_reserved_size = size;
return 0;

--
Jens Axboe