lkml.org 
[lkml]   [2007]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Block layer: separate out queue-oriented ioctls
On Mon, 19 Feb 2007, Douglas Gilbert wrote:

> > Come to think of it, the reserved_size value used when a new sg device is
> > created should also be capped at max_sectors * 512. Agreed? I can't see
> > any reason for ever having a larger buffer -- it would be impossible to
> > make use of the extra space.
>
> Alan,
> That depends whether or not max_sectors can be changed
> (via sysfs) subsequent to a sg device being created.
> And I think it can.
>
> # ls -l /sys/block/sdc/queue/
> total 0
> drwxr-xr-x 2 root root 0 Feb 19 18:29 iosched
> -r--r--r-- 1 root root 4096 Feb 19 23:41 max_hw_sectors_kb
> -rw-r--r-- 1 root root 4096 Feb 19 23:41 max_sectors_kb
> -rw-r--r-- 1 root root 4096 Feb 19 23:41 nr_requests
> -rw-r--r-- 1 root root 4096 Feb 19 23:41 read_ahead_kb
> -rw-r--r-- 1 root root 4096 Feb 19 23:41 scheduler

Yes, it definitely can be changed.

> # cat max_hw_sectors_kb > max_sectors_kb
>
> ... is the real maximum if the LLD that set max_hw_sectors_kb
> is to be believed (actually it is often a finger in
> the wind).

That's why my patch computes the minimum value every time the
GET_RESERVED_SIZE ioctl runs -- in case max_sectors has changed.

If the user decides to increase max_sectors, then the reserved_size can be
increased immediately afterward. This shouldn't cause any problems.

I will submit a revised patch shortly, on the linux-scsi list.

Alan Stern

-
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: 2007-02-20 16:59    [W:0.048 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site