Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-04-04 Thread Douglas Gilbert
Alan Stern wrote: > This patch (as857) modifies the SG_GET_RESERVED_SIZE and > SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at > the device's request_queue's max_sectors value. This will permit > cdrecord to obtain a legal value for the maximum transfer length, > fixing Bugzill

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-03-05 Thread Alan Stern
Doug: I haven't gotten any feedback on this patch: http://marc.theaimsgroup.com/?l=linux-scsi&m=117198739722640&w=2 Pending Mike's efforts to get a completely realistic estimate for the maximum allowable size of a transfer request, is there any reason not to accept the patch in its original form

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Mike Christie
Mike Christie wrote: > Yeah you are right getting memory is not a problem I replied about that > in the other mail. You do not have to use it, but the min of the > reserved buffer and max_sectors or max_hw_sectors could still be off for > drivers that do not support clustering or if there is a weir

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Alan Stern
On Tue, 20 Feb 2007, Mike Christie wrote: > Yeah you are right getting memory is not a problem I replied about that > in the other mail. You do not have to use it, but the min of the > reserved buffer and max_sectors or max_hw_sectors could still be off for > drivers that do not support clustering

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Mike Christie
Alan Stern wrote: > On Tue, 20 Feb 2007, Mike Christie wrote: > >> I think you actually want max_hw_sectors. Well, you might and you might >> not :) > > I think we do not. We don't care about the maximum transfer length the > driver can theoretically support; we care about the maximum transfer >

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Alan Stern
On Tue, 20 Feb 2007, Mike Christie wrote: > I think you actually want max_hw_sectors. Well, you might and you might > not :) I think we do not. We don't care about the maximum transfer length the driver can theoretically support; we care about the maximum transfer length the system will allow.

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Mike Christie
Mike Christie wrote: > > The problem is that we assume we will get nice large segments. When > using sg it will try to allocate multiple pages and make large segments. > We could hit a bad case where we cannot allocate enough large segments, > so a worst case would result in a max_segment_size of

Re: [PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Mike Christie
Alan Stern wrote: > This patch (as857) modifies the SG_GET_RESERVED_SIZE and > SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at > the device's request_queue's max_sectors value. This will permit > cdrecord to obtain a legal value for the maximum transfer length, > fixing Bugzill

[PATCH] SG: cap reserved_size values at max_sectors

2007-02-20 Thread Alan Stern
This patch (as857) modifies the SG_GET_RESERVED_SIZE and SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at the device's request_queue's max_sectors value. This will permit cdrecord to obtain a legal value for the maximum transfer length, fixing Bugzilla #7026. The patch also cap