lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Feb 2007 10:55:45 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Douglas Gilbert <dougg@...que.net>
cc:	Joerg Schilling <Joerg.Schilling@...us.fraunhofer.de>,
	<linux-kernel@...r.kernel.org>, <jens.axboe@...cle.com>,
	<James.Bottomley@...eleye.com>
Subject: Re: [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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ