public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Linux-2.4.15-pre9
@ 2001-11-22  6:44 Linus Torvalds
  2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
  2001-11-22  8:41 ` [PATCH] fix SCSI non-blocksize reads Erik Andersen
  0 siblings, 2 replies; 16+ messages in thread
From: Linus Torvalds @ 2001-11-22  6:44 UTC (permalink / raw)
  To: Kernel Mailing List


David Mosberger noticed that SCHED_FIFO has been broken for a while, and
obviously very few people really cared, but it should be fixed now.

The USB update that I had originally documented as being part of pre8 was
actually in my in-file, and is _really_ there in pre9, along with a bonus
usbnet update.

I think I'm ready to hand this over to Marcelo.

		Linus

-----

pre9:
 - David Brownell: usbnet update
 - Greg KH: USB and PCI hotplug update
 - Ingo/me: fix SCHED_FIFO for UP/SMP for good (flw).
 - Add back direct_IO now that it works again.

pre8:
 - Richard Henderson: alpha update
 - Andrew Morton: fix ext3/minix/sysv fsync behaviour.

pre7:
 - Jeff Garzik: network driver updates
 - Christoph Hellwig: UFS filesystem byteorder cleanups
 - me: modified Andrea VM page allocator tuning

pre6:
 - Russell King: /proc/cpuinfo for ARM
 - Paul Mackerras: PPC update (cpuinfo etc)
 - Nicolas Aspert: fix Intel 8xx agptlb flush
 - Marko Myllynen: "Lindent" doesn't really need bash ;)
 - Alexander Viro: /proc/cpuinfo for s390/s390x/sh, /proc/pci cleanup
 - Alexander Viro: make lseek work on seqfiles

pre5:
 - Greg KH: enable hotplug driver support
 - Andrea Arcangeli: remove bogus sanity check
 - David Mosberger: /proc/cpuinfo and scsi scatter-gather for ia64
 - David Hinds: 16-bit pcmcia network driver updates/cleanups
 - Hugh Dickins: remove some stale code from VM
 - David Miller: /proc/cpuinfo for sparc, sparc fork bug fix, network
   fixes, warning fixes
 - Peter Braam: intermezzo update
 - Greg KH: USB updates
 - Ivan Kokshaysky: /proc/cpuinfo for alpha
 - David Woodhouse: jffs2 - remove dead code, remove gcc3 warning
 - Hugh Dickins: fix kiobuf page allocation/deallocation

pre4:
 - Mikael Pettersson: make proc_misc happy without modules
 - Arjan van de Ven: clean up acpitable implementation ("micro-acpi")
 - Anton Altaparmakov: LDM partition code update
 - Alan Cox: final (yeah, sure) small missing pieces
 - Andrey Savochkin/Andrew Morton: eepro100 config space save/restore over suspend
 - Arjan van de Ven: remove power from pcmcia socket on card remove
 - Greg KH: USB updates
 - Neil Brown: multipath updates
 - Martin Dalecki: fix up some "asmlinkage" routine markings

pre3:
 - Alan Cox: more driver merging
 - Al Viro: make ext2 group allocation more readable

pre2:
 - Ivan Kokshaysky: fix alpha dec_and_lock with modules, for alpha config entry
 - Kai Germaschewski: ISDN updates
 - Jeff Garzik: network driver updates, sysv fs update
 - Kai Mäkisara: SCSI tape update
 - Alan Cox: large drivers merge
 - Nikita Danilov: reiserfs procfs information
 - Andrew Morton: ext3 merge
 - Christoph Hellwig: vxfs livelock fix
 - Trond Myklebust: NFS updates
 - Jens Axboe: cpqarray + cciss dequeue fix
 - Tim Waugh: parport_serial base_baud setting
 - Matthew Dharm: usb-storage Freecom driver fixes
 - Dave McCracken: wait4() thread group race fix

pre1:
 - me: fix page flags race condition Andrea found
 - David Miller: sparc and network updates
 - various: fix loop driver that thought it was part of the VM system
 - me: teach DRM about VM_RESERVED
 - Alan Cox: more merging


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22  6:44 Linux-2.4.15-pre9 Linus Torvalds
@ 2001-11-22  7:47 ` Anuradha Ratnaweera
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
                     ` (2 more replies)
  2001-11-22  8:41 ` [PATCH] fix SCSI non-blocksize reads Erik Andersen
  1 sibling, 3 replies; 16+ messages in thread
From: Anuradha Ratnaweera @ 2001-11-22  7:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel Mailing List

On Wed, Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
> 
> I think I'm ready to hand this over to Marcelo.

Aren't you going to include Tim Schmielau's patch to handle uptime larger than
497 days?  It is a cool feature we always liked to have.

Cheers,

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.13)

Unix is a Registered Bell of AT&T Trademark Laboratories.
		-- Donn Seeley


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] fix SCSI non-blocksize reads
  2001-11-22  6:44 Linux-2.4.15-pre9 Linus Torvalds
  2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
@ 2001-11-22  8:41 ` Erik Andersen
  2001-11-22 17:09   ` Linus Torvalds
  1 sibling, 1 reply; 16+ messages in thread
From: Erik Andersen @ 2001-11-22  8:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel Mailing List

On Wed Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
> 
> David Mosberger noticed that SCHED_FIFO has been broken for a while, and
> obviously very few people really cared, but it should be fixed now.
> 
> The USB update that I had originally documented as being part of pre8 was
> actually in my in-file, and is _really_ there in pre9, along with a bonus
> usbnet update.
> 
> I think I'm ready to hand this over to Marcelo.

Several SCSI drivers blindly do reads of size 1024 when trying to read
the partition table.   This fails on Magneto Optical drives and similar
odd devices with 2048 byte native sector sizes.  This patch fixes that
so I can have partitions on my MO drive again (it lives on an Adaptec 
card at present and has 2048 byte sectors),

Please apply,

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--


diff -urN linux/drivers/scsi.orig/BusLogic.c linux/drivers/scsi/BusLogic.c
--- linux/drivers/scsi.orig/BusLogic.c	Sun Sep 30 13:26:07 2001
+++ linux/drivers/scsi/BusLogic.c	Thu Nov 22 01:32:56 2001
@@ -4103,10 +4103,16 @@
 int BusLogic_BIOSDiskParameters(SCSI_Disk_T *Disk, KernelDevice_T Device,
 				int *Parameters)
 {
-  BusLogic_HostAdapter_T *HostAdapter =
-    (BusLogic_HostAdapter_T *) Disk->device->host->hostdata;
+  BusLogic_HostAdapter_T *HostAdapter = (BusLogic_HostAdapter_T *) Disk->device->host->hostdata;
   BIOS_DiskParameters_T *DiskParameters = (BIOS_DiskParameters_T *) Parameters;
   struct buffer_head *BufferHead;
+  int ma = MAJOR(Device);
+  int mi = (MINOR(Device) & ~0xf);
+  int block = 1024; 
+
+  if(blksize_size[ma])
+      block = blksize_size[ma][mi];
+
   if (HostAdapter->ExtendedTranslationEnabled &&
       Disk->capacity >= 2*1024*1024 /* 1 GB in 512 byte sectors */)
     {
@@ -4131,8 +4137,9 @@
   /*
     Attempt to read the first 1024 bytes from the disk device.
   */
-  BufferHead = bread(MKDEV(MAJOR(Device), MINOR(Device) & ~0x0F), 0, 1024);
-  if (BufferHead == NULL) return 0;
+  if (!(BufferHead = bread(MKDEV(ma,mi), 0, block)))
+      return 0;
+
   /*
     If the boot sector partition table flag is valid, search for a partition
     table entry whose end_head matches one of the standard BusLogic geometry
diff -urN linux/drivers/scsi.orig/aic7xxx/aic7xxx_linux.c linux/drivers/scsi/aic7xxx/aic7xxx_linux.c
--- linux/drivers/scsi.orig/aic7xxx/aic7xxx_linux.c	Thu Oct 25 14:53:49 2001
+++ linux/drivers/scsi/aic7xxx/aic7xxx_linux.c	Thu Nov 22 01:29:02 2001
@@ -2740,13 +2740,17 @@
 	int	extended;
 	struct	ahc_softc *ahc;
 	struct	buffer_head *bh;
-
+	int ma = MAJOR(dev);
+	int mi = (MINOR(dev) & ~0xf);
+	int block = 1024; 
 	ahc = *((struct ahc_softc **)disk->device->host->hostdata);
-	bh = bread(MKDEV(MAJOR(dev), MINOR(dev) & ~0xf), 0, 1024);
 
+	if(blksize_size[ma])
+		block = blksize_size[ma][mi];
+		
+	bh = bread(MKDEV(ma,mi), 0, block);
 	if (bh) {
-		ret = scsi_partsize(bh, disk->capacity,
-				    &geom[2], &geom[0], &geom[1]);
+		ret = scsi_partsize(bh, disk->capacity, &geom[2], &geom[0], &geom[1]);
 		brelse(bh);
 		if (ret != -1)
 			return (ret);
diff -urN linux/drivers/scsi.orig/aic7xxx_old.c linux/drivers/scsi/aic7xxx_old.c
--- linux/drivers/scsi.orig/aic7xxx_old.c	Thu Oct 11 10:43:30 2001
+++ linux/drivers/scsi/aic7xxx_old.c	Thu Nov 22 01:30:24 2001
@@ -11737,10 +11737,15 @@
   int heads, sectors, cylinders, ret;
   struct aic7xxx_host *p;
   struct buffer_head *bh;
-
+  int ma = MAJOR(dev);
+  int mi = (MINOR(dev) & ~0xf);
+  int block = 1024; 
   p = (struct aic7xxx_host *) disk->device->host->hostdata;
-  bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024);
 
+  if(blksize_size[ma])
+      block = blksize_size[ma][mi];
+
+  bh = bread(MKDEV(ma,mi), 0, block);
   if ( bh )
   {
     ret = scsi_partsize(bh, disk->capacity, &geom[2], &geom[0], &geom[1]);
diff -urN linux/drivers/scsi.orig/tmscsim.c linux/drivers/scsi/tmscsim.c
--- linux/drivers/scsi.orig/tmscsim.c	Sun Sep 30 13:26:08 2001
+++ linux/drivers/scsi/tmscsim.c	Thu Nov 22 01:31:56 2001
@@ -1449,8 +1449,15 @@
     struct buffer_head *bh;
     int ret_code = -1;
     int size = disk->capacity;
+    int ma = MAJOR(devno);
+    int mi = (MINOR(devno) & ~0xf);
+    int block = 1024; 
 
-    if ((bh = bread(MKDEV(MAJOR(devno), MINOR(devno)&~0xf), 0, 1024)))
+    if(blksize_size[ma])
+	block = blksize_size[ma][mi];
+
+    bh = bread(MKDEV(ma,mi), 0, block);
+    if (bh)
     {
 	/* try to infer mapping from partition table */
 	ret_code = partsize (bh, (unsigned long) size, (unsigned int *) geom + 2,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix SCSI non-blocksize reads
  2001-11-22  8:41 ` [PATCH] fix SCSI non-blocksize reads Erik Andersen
@ 2001-11-22 17:09   ` Linus Torvalds
  2001-11-22 17:20     ` Erik Andersen
  0 siblings, 1 reply; 16+ messages in thread
From: Linus Torvalds @ 2001-11-22 17:09 UTC (permalink / raw)
  To: Erik Andersen; +Cc: Kernel Mailing List


On Thu, 22 Nov 2001, Erik Andersen wrote:
>
> Several SCSI drivers blindly do reads of size 1024 when trying to read
> the partition table.   This fails on Magneto Optical drives and similar
> odd devices with 2048 byte native sector sizes.  This patch fixes that
> so I can have partitions on my MO drive again (it lives on an Adaptec
> card at present and has 2048 byte sectors),

Please use the "block_size()" function instead of doing it by hand..

		Linus


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix SCSI non-blocksize reads
  2001-11-22 17:09   ` Linus Torvalds
@ 2001-11-22 17:20     ` Erik Andersen
  2001-11-22 18:40       ` Linus Torvalds
  0 siblings, 1 reply; 16+ messages in thread
From: Erik Andersen @ 2001-11-22 17:20 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel Mailing List

On Thu Nov 22, 2001 at 09:09:23AM -0800, Linus Torvalds wrote:
> 
> On Thu, 22 Nov 2001, Erik Andersen wrote:
> >
> > Several SCSI drivers blindly do reads of size 1024 when trying to read
> > the partition table.   This fails on Magneto Optical drives and similar
> > odd devices with 2048 byte native sector sizes.  This patch fixes that
> > so I can have partitions on my MO drive again (it lives on an Adaptec
> > card at present and has 2048 byte sectors),
> 
> Please use the "block_size()" function instead of doing it by hand..

Ok.  I just did it the same way most of the other SCSI drivers
do this...

Would you like a patch that also fixes all the other SCSI drivers 
to use block_size() then, so they will be consistent?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix SCSI non-blocksize reads
  2001-11-22 17:20     ` Erik Andersen
@ 2001-11-22 18:40       ` Linus Torvalds
  2001-11-24  0:04         ` Erik Andersen
  0 siblings, 1 reply; 16+ messages in thread
From: Linus Torvalds @ 2001-11-22 18:40 UTC (permalink / raw)
  To: Erik Andersen; +Cc: Kernel Mailing List


On Thu, 22 Nov 2001, Erik Andersen wrote:
>
> Would you like a patch that also fixes all the other SCSI drivers
> to use block_size() then, so they will be consistent?

Eventually yes, although right now I'd like to have the minimal fix.

		Linus


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
@ 2001-11-22 18:52   ` Linus Torvalds
  2001-11-22 19:34     ` Linux-2.4.15-pre9 Alexander Viro
                       ` (2 more replies)
  2001-11-22 19:16   ` Linux-2.4.15-pre9 Tim Schmielau
  2001-11-26 15:18   ` Linux-2.4.15-pre9 bill davidsen
  2 siblings, 3 replies; 16+ messages in thread
From: Linus Torvalds @ 2001-11-22 18:52 UTC (permalink / raw)
  To: Anuradha Ratnaweera; +Cc: Kernel Mailing List


On Thu, 22 Nov 2001, Anuradha Ratnaweera wrote:
>
> On Wed, Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
> >
> > I think I'm ready to hand this over to Marcelo.
>
> Aren't you going to include Tim Schmielau's patch to handle uptime larger than
> 497 days?  It is a cool feature we always liked to have.

Quite frankly, right now I'm in "handle only bugs that can crash the
system mode". Anything that takes 497 days to see is fairly low on my
priority list. My highest priority, in fact, is to get 2.4.15 out without
any embarrassment.

Because it's not as if time stops when Marcelo takes over. I've suggested
to him that he wait for a while just to see what the real problem spots
are, but he'll have a full-time job integrating patches.

Note that I'll probably do the same thing: when I release 2.4.15, I'll at
the same time release a 2.5.0 that is identical except for version number
(that makes synchronization easier later on). And I'll probably _not_
start accepting all the big waiting patches immediately, I'd rather wait
for at least a week or two to see that there aren't any other issues.

It's much easier doing some of the IO patches in particular knowing that
the base you start out from is stable.

		Linus


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
@ 2001-11-22 19:16   ` Tim Schmielau
  2001-11-26 15:18   ` Linux-2.4.15-pre9 bill davidsen
  2 siblings, 0 replies; 16+ messages in thread
From: Tim Schmielau @ 2001-11-22 19:16 UTC (permalink / raw)
  To: Anuradha Ratnaweera; +Cc: Kernel Mailing List

On Thu, 22 Nov 2001, Anuradha Ratnaweera wrote:

> On Wed, Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
> >
> > I think I'm ready to hand this over to Marcelo.
>
> Aren't you going to include Tim Schmielau's patch to handle uptime larger than
> 497 days?  It is a cool feature we always liked to have.
>

Seeing the differences between pre-patches getting smaller and smaller, I
guess I finished the patch just too late in the release cycle.

I will keep an eye on it and eventually resubmit it to Marcelo when it
needs rediffing.

Tim


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
@ 2001-11-22 19:34     ` Alexander Viro
  2001-11-22 19:46       ` Linux-2.4.15-pre9 Tom Rini
  2001-11-23 16:20     ` Linux-2.4.15-pre9 Michael H. Warfield
  2001-11-26 11:52     ` PATCH 2.5.0 kill read_ahead array Martin Dalecki
  2 siblings, 1 reply; 16+ messages in thread
From: Alexander Viro @ 2001-11-22 19:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Anuradha Ratnaweera, Kernel Mailing List



On Thu, 22 Nov 2001, Linus Torvalds wrote:

> Quite frankly, right now I'm in "handle only bugs that can crash the
> system mode". Anything that takes 497 days to see is fairly low on my
> priority list. My highest priority, in fact, is to get 2.4.15 out without
> any embarrassment.

Umm...
	a) /proc/interrupts has buffer overflows.
	b) I have a patch that should fix them (conversion to seq_file,
done for all architectures)
	c) while completely straightforward, it's large (every subarchitecture
of m68k and mips seems to have its own get_irq_list()) and may contain typos
in architectures I've no access to.
	d) holes had been there for quite a while and it's either
"cat /proc/interrupts always causes memory corruption" or "everything OK"

I'm not quite sure where it is - if we were in -pre<small> I'd definitely
say that it's worth merging, so that trivial typos could be caught before
the release; the hole obviously deserves fixing.  OTOH, merging that in -final
means that we are risking "2.4.15 doesn't compile on <architecture>"...

Comments?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22 19:34     ` Linux-2.4.15-pre9 Alexander Viro
@ 2001-11-22 19:46       ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2001-11-22 19:46 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Linus Torvalds, Anuradha Ratnaweera, Kernel Mailing List

On Thu, Nov 22, 2001 at 02:34:46PM -0500, Alexander Viro wrote:
> 
> 
> On Thu, 22 Nov 2001, Linus Torvalds wrote:
> 
> > Quite frankly, right now I'm in "handle only bugs that can crash the
> > system mode". Anything that takes 497 days to see is fairly low on my
> > priority list. My highest priority, in fact, is to get 2.4.15 out without
> > any embarrassment.
> 
> Umm...
> 	a) /proc/interrupts has buffer overflows.
> 	b) I have a patch that should fix them (conversion to seq_file,
> done for all architectures)
> 	c) while completely straightforward, it's large (every subarchitecture
> of m68k and mips seems to have its own get_irq_list()) and may contain typos
> in architectures I've no access to.
> 	d) holes had been there for quite a while and it's either
> "cat /proc/interrupts always causes memory corruption" or "everything OK"
> 
> I'm not quite sure where it is - if we were in -pre<small> I'd definitely
> say that it's worth merging, so that trivial typos could be caught before
> the release; the hole obviously deserves fixing.  OTOH, merging that in -final
> means that we are risking "2.4.15 doesn't compile on <architecture>"...

If I understand things right, at least a few arches (PPC, MIPS, m68k,
others) needs to implement show_trace_task anyhow, so we're already at
2.4.15 doesn't compile on <architecture>.  I'd vote for a quick typo
check and submit. :)

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
  2001-11-22 19:34     ` Linux-2.4.15-pre9 Alexander Viro
@ 2001-11-23 16:20     ` Michael H. Warfield
  2001-11-26 11:52     ` PATCH 2.5.0 kill read_ahead array Martin Dalecki
  2 siblings, 0 replies; 16+ messages in thread
From: Michael H. Warfield @ 2001-11-23 16:20 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Anuradha Ratnaweera, Kernel Mailing List

On Thu, Nov 22, 2001 at 10:52:03AM -0800, Linus Torvalds wrote:

> On Thu, 22 Nov 2001, Anuradha Ratnaweera wrote:
> >
> > On Wed, Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
> > >
> > > I think I'm ready to hand this over to Marcelo.
> >
> > Aren't you going to include Tim Schmielau's patch to handle uptime larger than
> > 497 days?  It is a cool feature we always liked to have.

> Quite frankly, right now I'm in "handle only bugs that can crash the
> system mode". Anything that takes 497 days to see is fairly low on my
> priority list. My highest priority, in fact, is to get 2.4.15 out without
> any embarrassment.

	Embarrasments like having the modules install into directories
like /lib/modules/2.4.15-greased-turkey or vmlinuz installed to an
image /boot/vmlinuz-2.4.15-greased-turkey?  Those sorts of embarrasments?
Or was that just a last shot to see if we were still awake in 2.4?

	[...]

> 		Linus

	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  /\/\|=mhw=|\/\/       |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] fix SCSI non-blocksize reads
  2001-11-22 18:40       ` Linus Torvalds
@ 2001-11-24  0:04         ` Erik Andersen
  0 siblings, 0 replies; 16+ messages in thread
From: Erik Andersen @ 2001-11-24  0:04 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel Mailing List, Marcelo Tosatti

On Thu Nov 22, 2001 at 10:40:14AM -0800, Linus Torvalds wrote:
> 
> On Thu, 22 Nov 2001, Erik Andersen wrote:
> >
> > Would you like a patch that also fixes all the other SCSI drivers
> > to use block_size() then, so they will be consistent?
> 
> Eventually yes, although right now I'd like to have the minimal fix.
> 

Thanks for getting the aic7xx fix into 2.4.125-greased-turkey.
Here is the rest of the SCSI non-blocksize read clean up patch to
fix up the other SCSI drivers so they also do the right thing.  I
think this one easily passes the "obviously correct" test.
Please apply (to 2.4.x and to 2.5.x),

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--


diff -urN linux/drivers/scsi.virgin/BusLogic.c linux/drivers/scsi/BusLogic.c
--- linux/drivers/scsi.virgin/BusLogic.c	Sun Sep 30 13:26:07 2001
+++ linux/drivers/scsi/BusLogic.c	Fri Nov 23 16:43:52 2001
@@ -4131,7 +4131,7 @@
   /*
     Attempt to read the first 1024 bytes from the disk device.
   */
-  BufferHead = bread(MKDEV(MAJOR(Device), MINOR(Device) & ~0x0F), 0, 1024);
+  BufferHead = bread(MKDEV(MAJOR(Device), MINOR(Device) & ~0x0F), 0, block_size(Device));
   if (BufferHead == NULL) return 0;
   /*
     If the boot sector partition table flag is valid, search for a partition
diff -urN linux/drivers/scsi.virgin/megaraid.c linux/drivers/scsi/megaraid.c
--- linux/drivers/scsi.virgin/megaraid.c	Thu Oct 25 14:53:51 2001
+++ linux/drivers/scsi/megaraid.c	Fri Nov 23 16:47:08 2001
@@ -4296,15 +4296,7 @@
 	int heads, cyls, sectors;
 	int capacity = disk->capacity;
 
-	int ma = MAJOR(dev);
-	int mi = (MINOR(dev) & ~0xf);
-
-	int block = 1024; 
-
-	if(blksize_size[ma])
-		block = blksize_size[ma][mi];
-		
-	if(!(bh = bread(MKDEV(ma,mi), 0, block)))
+	if(!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, block_size(dev))))
 		return -1;
 
 	if( *(unsigned short *)(bh->b_data + 510) == 0xAA55 ) {
diff -urN linux/drivers/scsi.virgin/scsicam.c linux/drivers/scsi/scsicam.c
--- linux/drivers/scsi.virgin/scsicam.c	Thu Nov 18 20:09:14 1999
+++ linux/drivers/scsi/scsicam.c	Fri Nov 23 16:47:33 2001
@@ -47,15 +47,7 @@
 	int size = disk->capacity;
 	unsigned long temp_cyl;
 
-	int ma = MAJOR(dev);
-	int mi = (MINOR(dev) & ~0xf);
-
-	int block = 1024; 
-
-	if(blksize_size[ma])
-		block = blksize_size[ma][mi];
-		
-	if (!(bh = bread(MKDEV(ma,mi), 0, block)))
+	if (!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, block_size(dev))))
 		return -1;
 
 	/* try to infer mapping from partition table */
diff -urN linux/drivers/scsi.virgin/tmscsim.c linux/drivers/scsi/tmscsim.c
--- linux/drivers/scsi.virgin/tmscsim.c	Sun Sep 30 13:26:08 2001
+++ linux/drivers/scsi/tmscsim.c	Fri Nov 23 16:48:28 2001
@@ -1450,7 +1450,7 @@
     int ret_code = -1;
     int size = disk->capacity;
 
-    if ((bh = bread(MKDEV(MAJOR(devno), MINOR(devno)&~0xf), 0, 1024)))
+    if ((bh = bread(MKDEV(MAJOR(devno), MINOR(devno)&~0xf), 0, block_size(devno))))
     {
 	/* try to infer mapping from partition table */
 	ret_code = partsize (bh, (unsigned long) size, (unsigned int *) geom + 2,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* PATCH 2.5.0 kill  read_ahead array.
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
  2001-11-22 19:34     ` Linux-2.4.15-pre9 Alexander Viro
  2001-11-23 16:20     ` Linux-2.4.15-pre9 Michael H. Warfield
@ 2001-11-26 11:52     ` Martin Dalecki
  2001-11-26 16:34       ` Andreas Dilger
  2 siblings, 1 reply; 16+ messages in thread
From: Martin Dalecki @ 2001-11-26 11:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

The subject says it all...

This is removing the "write only" read_ahead sparse array from all
the places where it's "used" by now. 
This is just saving some memmory.

[-- Attachment #2: kill-read_ahead.patch --]
[-- Type: text/plain, Size: 27100 bytes --]

diff -urN linux/drivers/acorn/block/mfmhd.c linux-new/drivers/acorn/block/mfmhd.c
--- linux/drivers/acorn/block/mfmhd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/acorn/block/mfmhd.c	Mon Nov 26 03:06:16 2001
@@ -1444,7 +1444,6 @@
 	hdc63463_irqpollmask	= irqmask;
 
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB?) read ahread */
 
 	add_gendisk(&mfm_gendisk);
 
diff -urN linux/drivers/block/DAC960.c linux-new/drivers/block/DAC960.c
--- linux/drivers/block/DAC960.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/block/DAC960.c	Mon Nov 26 02:49:45 2001
@@ -2033,10 +2033,6 @@
   blksize_size[MajorNumber] = Controller->BlockSizes;
   max_sectors[MajorNumber] = Controller->MaxSectorsPerRequest;
   /*
-    Initialize Read Ahead to 128 sectors.
-  */
-  read_ahead[MajorNumber] = 128;
-  /*
     Complete initialization of the Generic Disk Information structure.
   */
   Controller->GenericDiskInfo.major = MajorNumber;
@@ -5481,8 +5477,6 @@
 				       .part[MINOR(Inode->i_rdev)]
 				       .nr_sects << 9,
 		      (u64 *) Argument);
-    case BLKRAGET:
-    case BLKRASET:
     case BLKFLSBUF:
     case BLKBSZGET:
     case BLKBSZSET:
diff -urN linux/drivers/block/acsi.c linux-new/drivers/block/acsi.c
--- linux/drivers/block/acsi.c	Fri Nov  9 22:58:03 2001
+++ linux-new/drivers/block/acsi.c	Mon Nov 26 03:03:41 2001
@@ -1786,7 +1786,6 @@
 	STramMask = ATARIHW_PRESENT(EXTD_DMA) ? 0x00000000 : 0xff000000;
 	
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;		/* 8 sector (4kB) read-ahead */
 	add_gendisk(&acsi_gendisk);
 
 #ifdef CONFIG_ATARI_SLM
diff -urN linux/drivers/block/blkpg.c linux-new/drivers/block/blkpg.c
--- linux/drivers/block/blkpg.c	Sun Nov 11 19:20:21 2001
+++ linux-new/drivers/block/blkpg.c	Mon Nov 26 02:27:33 2001
@@ -210,22 +210,11 @@
 				return -EFAULT;
 			set_device_ro(dev, intval);
 			return 0;
+
 		case BLKROGET:
 			intval = (is_read_only(dev) != 0);
 			return put_user(intval, (int *)(arg));
 
-		case BLKRASET:
-			if(!capable(CAP_SYS_ADMIN))
-				return -EACCES;
-			if(arg > 0xff)
-				return -EINVAL;
-			read_ahead[MAJOR(dev)] = arg;
-			return 0;
-		case BLKRAGET:
-			if (!arg)
-				return -EINVAL;
-			return put_user(read_ahead[MAJOR(dev)], (long *) arg);
-
 		case BLKFLSBUF:
 			if(!capable(CAP_SYS_ADMIN))
 				return -EACCES;
diff -urN linux/drivers/block/cciss.c linux-new/drivers/block/cciss.c
--- linux/drivers/block/cciss.c	Fri Nov  9 23:28:46 2001
+++ linux-new/drivers/block/cciss.c	Mon Nov 26 02:48:52 2001
@@ -412,8 +412,6 @@
 	case BLKBSZGET:
 	case BLKROSET:
 	case BLKROGET:
-	case BLKRASET:
-	case BLKRAGET:
 	case BLKPG:
 	case BLKELVGET:
 	case BLKELVSET:
@@ -1948,7 +1946,6 @@
 	/* fill in the other Kernel structs */
 	blksize_size[MAJOR_NR+i] = hba[i]->blocksizes;
         hardsect_size[MAJOR_NR+i] = hba[i]->hardsizes;
-        read_ahead[MAJOR_NR+i] = READ_AHEAD;
 
 	/* Set the pointers to queue functions */ 
 	q->back_merge_fn = cpq_back_merge_fn;
diff -urN linux/drivers/block/cpqarray.c linux-new/drivers/block/cpqarray.c
--- linux/drivers/block/cpqarray.c	Fri Nov  9 23:28:46 2001
+++ linux-new/drivers/block/cpqarray.c	Mon Nov 26 02:47:51 2001
@@ -527,7 +527,6 @@
 		blk_queue_headactive(q, 0);
 		blksize_size[MAJOR_NR+i] = ida_blocksizes + (i*256);
 		hardsect_size[MAJOR_NR+i] = ida_hardsizes + (i*256);
-		read_ahead[MAJOR_NR+i] = READ_AHEAD;
 
 		q->back_merge_fn = cpq_back_merge_fn;
 		q->front_merge_fn = cpq_front_merge_fn;
@@ -1249,8 +1248,6 @@
 	case BLKBSZGET:
 	case BLKROSET:
 	case BLKROGET:
-	case BLKRASET:
-	case BLKRAGET:
 	case BLKELVGET:
 	case BLKELVSET:
 	case BLKPG:
diff -urN linux/drivers/block/floppy.c linux-new/drivers/block/floppy.c
--- linux/drivers/block/floppy.c	Thu Oct 25 22:58:34 2001
+++ linux-new/drivers/block/floppy.c	Mon Nov 26 02:29:29 2001
@@ -3450,8 +3450,6 @@
 	switch (cmd) {
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKFLSBUF:
 			return blk_ioctl(device, cmd, param);
 	}
diff -urN linux/drivers/block/ll_rw_blk.c linux-new/drivers/block/ll_rw_blk.c
--- linux/drivers/block/ll_rw_blk.c	Mon Oct 29 21:11:17 2001
+++ linux-new/drivers/block/ll_rw_blk.c	Mon Nov 26 02:22:51 2001
@@ -64,10 +64,6 @@
  */
 spinlock_t io_request_lock = SPIN_LOCK_UNLOCKED;
 
-/* This specifies how many sectors to read ahead on the disk. */
-
-int read_ahead[MAX_BLKDEV];
-
 /* blk_dev_struct is:
  *	*request_fn
  *	*current_request
diff -urN linux/drivers/block/paride/pcd.c linux-new/drivers/block/paride/pcd.c
--- linux/drivers/block/paride/pcd.c	Sat Oct 27 11:03:47 2001
+++ linux-new/drivers/block/paride/pcd.c	Mon Nov 26 02:51:42 2001
@@ -356,7 +356,6 @@
 	}
 
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB) read ahead */
 
 	for (i=0;i<PCD_UNITS;i++) pcd_blocksizes[i] = 1024;
         blksize_size[MAJOR_NR] = pcd_blocksizes;
diff -urN linux/drivers/block/paride/pd.c linux-new/drivers/block/paride/pd.c
--- linux/drivers/block/paride/pd.c	Fri Nov  9 22:58:03 2001
+++ linux-new/drivers/block/paride/pd.c	Mon Nov 26 02:50:50 2001
@@ -397,8 +397,7 @@
         }
 	q = BLK_DEFAULT_QUEUE(MAJOR_NR);
 	blk_init_queue(q, DEVICE_REQUEST);
-        read_ahead[MAJOR_NR] = 8;       /* 8 sector (4kB) read ahead */
-        
+
 	pd_gendisk.major = major;
 	pd_gendisk.major_name = name;
 	add_gendisk(&pd_gendisk);
@@ -483,8 +482,6 @@
 	    case BLKGETSIZE64:
 	    case BLKROSET:
 	    case BLKROGET:
-	    case BLKRASET:
-	    case BLKRAGET:
 	    case BLKFLSBUF:
 	    case BLKPG:
 		return blk_ioctl(inode->i_rdev, cmd, arg);
diff -urN linux/drivers/block/paride/pf.c linux-new/drivers/block/paride/pf.c
--- linux/drivers/block/paride/pf.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/block/paride/pf.c	Mon Nov 26 02:52:19 2001
@@ -412,8 +412,7 @@
 	q->back_merge_fn = pf_back_merge_fn;
 	q->front_merge_fn = pf_front_merge_fn;
 	q->merge_requests_fn = pf_merge_requests_fn;
-        read_ahead[MAJOR_NR] = 8;       /* 8 sector (4kB) read ahead */
-        
+
 	for (i=0;i<PF_UNITS;i++) pf_blocksizes[i] = 1024;
 	blksize_size[MAJOR_NR] = pf_blocksizes;
 	for (i=0;i<PF_UNITS;i++)
@@ -482,8 +481,6 @@
                 return put_user((u64)PF.capacity << 9,(u64 *)arg);
 	    case BLKROSET:
 	    case BLKROGET:
-	    case BLKRASET:
-	    case BLKRAGET:
 	    case BLKFLSBUF:
 		return blk_ioctl(inode->i_rdev, cmd, arg);
             default:
diff -urN linux/drivers/block/ps2esdi.c linux-new/drivers/block/ps2esdi.c
--- linux/drivers/block/ps2esdi.c	Fri Nov  9 23:01:21 2001
+++ linux-new/drivers/block/ps2esdi.c	Mon Nov 26 03:04:08 2001
@@ -181,7 +181,6 @@
 	}
 	/* set up some global information - indicating device specific info */
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB) read ahead */
 
 	/* some minor housekeeping - setup the global gendisk structure */
 	add_gendisk(&ps2esdi_gendisk);
@@ -1116,8 +1115,6 @@
 		case BLKGETSIZE64:
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKFLSBUF:
 		case BLKBSZGET:
 		case BLKBSZSET:
diff -urN linux/drivers/block/xd.c linux-new/drivers/block/xd.c
--- linux/drivers/block/xd.c	Fri Nov  9 23:01:21 2001
+++ linux-new/drivers/block/xd.c	Mon Nov 26 02:46:22 2001
@@ -172,7 +172,6 @@
 	}
 	devfs_handle = devfs_mk_dir (NULL, xd_gendisk.major_name, NULL);
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB) read ahead */
 	add_gendisk(&xd_gendisk);
 	xd_geninit();
 
@@ -355,8 +354,6 @@
 		case BLKFLSBUF:
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKPG:
 			return blk_ioctl(inode->i_rdev, cmd, arg);
 
@@ -1109,7 +1106,6 @@
 	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
 	blk_size[MAJOR_NR] = NULL;
 	hardsect_size[MAJOR_NR] = NULL;
-	read_ahead[MAJOR_NR] = 0;
 	del_gendisk(&xd_gendisk);
 	release_region(xd_iobase,4);
 }
diff -urN linux/drivers/cdrom/aztcd.c linux-new/drivers/cdrom/aztcd.c
--- linux/drivers/cdrom/aztcd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/aztcd.c	Mon Nov 26 02:53:02 2001
@@ -1929,7 +1929,6 @@
 	}
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
 	blksize_size[MAJOR_NR] = aztcd_blocksizes;
-	read_ahead[MAJOR_NR] = 4;
 	register_disk(NULL, MKDEV(MAJOR_NR, 0), 1, &azt_fops, 0);
 
 	if ((azt_port == 0x1f0) || (azt_port == 0x170))
diff -urN linux/drivers/cdrom/cdu31a.c linux-new/drivers/cdrom/cdu31a.c
--- linux/drivers/cdrom/cdu31a.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/cdu31a.c	Mon Nov 26 02:54:01 2001
@@ -3454,7 +3454,6 @@
 
 		blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR),
 			       DEVICE_REQUEST);
-		read_ahead[MAJOR_NR] = CDU31A_READAHEAD;
 		cdu31a_block_size = 1024;	/* 1kB default block size */
 		/* use 'mount -o block=2048' */
 		blksize_size[MAJOR_NR] = &cdu31a_block_size;
diff -urN linux/drivers/cdrom/cm206.c linux-new/drivers/cdrom/cm206.c
--- linux/drivers/cdrom/cm206.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/cm206.c	Mon Nov 26 02:54:31 2001
@@ -1501,7 +1501,6 @@
 	devfs_plain_cdrom(&cm206_info, &cm206_bdops);
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
 	blksize_size[MAJOR_NR] = cm206_blocksizes;
-	read_ahead[MAJOR_NR] = 16;	/* reads ahead what? */
 	init_bh(CM206_BH, cm206_bh);
 
 	memset(cd, 0, sizeof(*cd));	/* give'm some reasonable value */
diff -urN linux/drivers/cdrom/gscd.c linux-new/drivers/cdrom/gscd.c
--- linux/drivers/cdrom/gscd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/gscd.c	Mon Nov 26 02:54:54 2001
@@ -1021,7 +1021,6 @@
 
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
 	blksize_size[MAJOR_NR] = gscd_blocksizes;
-	read_ahead[MAJOR_NR] = 4;
 
 	disk_state = 0;
 	gscdPresent = 1;
diff -urN linux/drivers/cdrom/mcd.c linux-new/drivers/cdrom/mcd.c
--- linux/drivers/cdrom/mcd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/mcd.c	Mon Nov 26 02:55:28 2001
@@ -1077,7 +1077,6 @@
 
 	blksize_size[MAJOR_NR] = mcd_blocksizes;
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 4;
 
 	/* check for card */
 
diff -urN linux/drivers/cdrom/mcdx.c linux-new/drivers/cdrom/mcdx.c
--- linux/drivers/cdrom/mcdx.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/mcdx.c	Mon Nov 26 02:55:58 2001
@@ -1188,7 +1188,6 @@
 	}
 
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = READ_AHEAD;
 	blksize_size[MAJOR_NR] = mcdx_blocksizes;
 
 	xtrace(INIT, "init() subscribe irq and i/o\n");
diff -urN linux/drivers/cdrom/optcd.c linux-new/drivers/cdrom/optcd.c
--- linux/drivers/cdrom/optcd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/optcd.c	Mon Nov 26 02:59:31 2001
@@ -2066,7 +2066,6 @@
 	hardsect_size[MAJOR_NR] = &hsecsize;
 	blksize_size[MAJOR_NR] = &blksize;
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 4;
 	request_region(optcd_port, 4, "optcd");
 	register_disk(NULL, MKDEV(MAJOR_NR,0), 1, &opt_fops, 0);
 
diff -urN linux/drivers/cdrom/sbpcd.c linux-new/drivers/cdrom/sbpcd.c
--- linux/drivers/cdrom/sbpcd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/sbpcd.c	Mon Nov 26 03:01:11 2001
@@ -4531,12 +4531,6 @@
 		RETURN_UP(0);
 	} /* end of CDROMREADAUDIO */
 		
-	case BLKRASET:
-		if(!capable(CAP_SYS_ADMIN)) RETURN_UP(-EACCES);
-		if(!(cdi->dev)) RETURN_UP(-EINVAL);
-		if(arg > 0xff) RETURN_UP(-EINVAL);
-		read_ahead[MAJOR(cdi->dev)] = arg;
-		RETURN_UP(0);
 	default:
 		msg(DBG_IOC,"ioctl: unknown function request %04X\n", cmd);
 		RETURN_UP(-EINVAL);
@@ -5871,10 +5865,9 @@
 	(BLK_DEFAULT_QUEUE(MAJOR_NR))->merge_requests_fn = dont_merge_requests_fn;
 #endif
 	blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
-	read_ahead[MAJOR_NR] = buffers * (CD_FRAMESIZE / 512);
-	
+
 	request_region(CDo_command,4,major_name);
-	
+
 	devfs_handle = devfs_mk_dir (NULL, "sbp", NULL);
 	for (j=0;j<NR_SBPCD;j++)
 	{
diff -urN linux/drivers/cdrom/sjcd.c linux-new/drivers/cdrom/sjcd.c
--- linux/drivers/cdrom/sjcd.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/sjcd.c	Mon Nov 26 03:01:36 2001
@@ -1702,7 +1702,6 @@
 	}
 
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 4;
 	register_disk(NULL, MKDEV(MAJOR_NR, 0), 1, &sjcd_fops, 0);
 
 	if (check_region(sjcd_base, 4)) {
diff -urN linux/drivers/cdrom/sonycd535.c linux-new/drivers/cdrom/sonycd535.c
--- linux/drivers/cdrom/sonycd535.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/cdrom/sonycd535.c	Mon Nov 26 03:02:25 2001
@@ -1595,7 +1595,6 @@
 				}
 				blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
 				blksize_size[MAJOR_NR] = &sonycd535_block_size;
-				read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB) read-ahead */
 
 				sony_toc = (struct s535_sony_toc *)
 					kmalloc(sizeof *sony_toc, GFP_KERNEL);
diff -urN linux/drivers/ide/hd.c linux-new/drivers/ide/hd.c
--- linux/drivers/ide/hd.c	Mon Oct 15 22:27:42 2001
+++ linux-new/drivers/ide/hd.c	Mon Nov 26 03:04:37 2001
@@ -652,8 +652,6 @@
 
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKFLSBUF:
 		case BLKPG:
 			return blk_ioctl(inode->i_rdev, cmd, arg);
@@ -840,7 +838,6 @@
 		return -1;
 	}
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
-	read_ahead[MAJOR_NR] = 8;		/* 8 sector (4kB) read-ahead */
 	add_gendisk(&hd_gendisk);
 	init_timer(&device_timer);
 	device_timer.function = hd_times_out;
diff -urN linux/drivers/ide/ide-cd.c linux-new/drivers/ide/ide-cd.c
--- linux/drivers/ide/ide-cd.c	Thu Oct 25 08:53:51 2001
+++ linux-new/drivers/ide/ide-cd.c	Mon Nov 26 03:05:02 2001
@@ -2709,7 +2709,6 @@
 	int major = HWIF(drive)->major;
 	int minor = drive->select.b.unit << PARTN_BITS;
 
-	ide_add_setting(drive,	"breada_readahead",	SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 2, &read_ahead[major], NULL);
 	ide_add_setting(drive,	"file_readahead",	SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, INT_MAX, 1, 1024, &max_readahead[major][minor],	NULL);
 	ide_add_setting(drive,	"max_kb_per_request",	SETTING_RW, BLKSECTGET, BLKSECTSET, TYPE_INTA, 1, 255, 1, 2, &max_sectors[major][minor], NULL);
 	ide_add_setting(drive,	"dsc_overlap",		SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1,	1, &drive->dsc_overlap, NULL);
diff -urN linux/drivers/ide/ide-disk.c linux-new/drivers/ide/ide-disk.c
--- linux/drivers/ide/ide-disk.c	Wed Nov 21 06:35:28 2001
+++ linux-new/drivers/ide/ide-disk.c	Mon Nov 26 02:31:42 2001
@@ -689,7 +689,6 @@
 	ide_add_setting(drive,	"bswap",		SETTING_READ,					-1,			-1,			TYPE_BYTE,	0,	1,				1,	1,	&drive->bswap,			NULL);
 	ide_add_setting(drive,	"multcount",		id ? SETTING_RW : SETTING_READ,			HDIO_GET_MULTCOUNT,	HDIO_SET_MULTCOUNT,	TYPE_BYTE,	0,	id ? id->max_multsect : 0,	1,	2,	&drive->mult_count,		set_multcount);
 	ide_add_setting(drive,	"nowerr",		SETTING_RW,					HDIO_GET_NOWERR,	HDIO_SET_NOWERR,	TYPE_BYTE,	0,	1,				1,	1,	&drive->nowerr,			set_nowerr);
-	ide_add_setting(drive,	"breada_readahead",	SETTING_RW,					BLKRAGET,		BLKRASET,		TYPE_INT,	0,	255,				1,	2,	&read_ahead[major],		NULL);
 	ide_add_setting(drive,	"file_readahead",	SETTING_RW,					BLKFRAGET,		BLKFRASET,		TYPE_INTA,	0,	4096,			PAGE_SIZE,	1024,	&max_readahead[major][minor],	NULL);
 	ide_add_setting(drive,	"max_kb_per_request",	SETTING_RW,					BLKSECTGET,		BLKSECTSET,		TYPE_INTA,	1,	255,				1,	2,	&max_sectors[major][minor],	NULL);
 	ide_add_setting(drive,	"lun",			SETTING_RW,					-1,			-1,			TYPE_INT,	0,	7,				1,	1,	&drive->lun,			NULL);
diff -urN linux/drivers/ide/ide-floppy.c linux-new/drivers/ide/ide-floppy.c
--- linux/drivers/ide/ide-floppy.c	Thu Oct 11 18:14:32 2001
+++ linux-new/drivers/ide/ide-floppy.c	Mon Nov 26 02:32:14 2001
@@ -1918,7 +1918,6 @@
 	ide_add_setting(drive,	"bios_cyl",		SETTING_RW,					-1,			-1,			TYPE_INT,	0,	1023,				1,	1,	&drive->bios_cyl,		NULL);
 	ide_add_setting(drive,	"bios_head",		SETTING_RW,					-1,			-1,			TYPE_BYTE,	0,	255,				1,	1,	&drive->bios_head,		NULL);
 	ide_add_setting(drive,	"bios_sect",		SETTING_RW,					-1,			-1,			TYPE_BYTE,	0,	63,				1,	1,	&drive->bios_sect,		NULL);
-	ide_add_setting(drive,	"breada_readahead",	SETTING_RW,					BLKRAGET,		BLKRASET,		TYPE_INT,	0,	255,				1,	2,	&read_ahead[major],		NULL);
 	ide_add_setting(drive,	"file_readahead",	SETTING_RW,					BLKFRAGET,		BLKFRASET,		TYPE_INTA,	0,	INT_MAX,			1,	1024,	&max_readahead[major][minor],	NULL);
 	ide_add_setting(drive,	"max_kb_per_request",	SETTING_RW,					BLKSECTGET,		BLKSECTSET,		TYPE_INTA,	1,	255,				1,	2,	&max_sectors[major][minor],	NULL);
 
diff -urN linux/drivers/ide/ide-probe.c linux-new/drivers/ide/ide-probe.c
--- linux/drivers/ide/ide-probe.c	Thu Oct 11 18:14:32 2001
+++ linux-new/drivers/ide/ide-probe.c	Mon Nov 26 02:30:40 2001
@@ -863,11 +863,10 @@
 		printk("%s: probed IRQ %d failed, using default.\n",
 			hwif->name, hwif->irq);
 	}
-	
+
 	init_gendisk(hwif);
 	blk_dev[hwif->major].data = hwif;
 	blk_dev[hwif->major].queue = ide_get_queue;
-	read_ahead[hwif->major] = 8;	/* (4kB) */
 	hwif->present = 1;	/* success */
 
 #if (DEBUG_SPINLOCK > 0)
diff -urN linux/drivers/md/lvm.c linux-new/drivers/md/lvm.c
--- linux/drivers/md/lvm.c	Mon Nov 19 18:56:04 2001
+++ linux-new/drivers/md/lvm.c	Mon Nov 26 03:11:21 2001
@@ -885,29 +885,6 @@
 		invalidate_buffers(inode->i_rdev);
 		break;
 
-
-	case BLKRASET:
-		/* set read ahead for block device */
-		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-
-		P_IOCTL("BLKRASET: %ld sectors for %s\n",
-			(long) arg, kdevname(inode->i_rdev));
-
-		if ((long) arg < LVM_MIN_READ_AHEAD ||
-		    (long) arg > LVM_MAX_READ_AHEAD)
-			return -EINVAL;
-		lv_ptr->lv_read_ahead = (long) arg;
-		break;
-
-
-	case BLKRAGET:
-		/* get current read ahead setting */
-		P_IOCTL("BLKRAGET %d\n", lv_ptr->lv_read_ahead);
-		if (put_user(lv_ptr->lv_read_ahead, (long *)arg))
-			return -EFAULT;
-		break;
-
-
 	case HDIO_GETGEO:
 		/* get disk geometry */
 		P_IOCTL("%s -- lvm_blk_ioctl -- HDIO_GETGEO\n", lvm_name);
diff -urN linux/drivers/md/md.c linux-new/drivers/md/md.c
--- linux/drivers/md/md.c	Thu Oct 25 22:58:34 2001
+++ linux-new/drivers/md/md.c	Mon Nov 26 02:33:46 2001
@@ -1734,7 +1734,6 @@
 	register_disk(&md_gendisk, MKDEV(MAJOR_NR,mdidx(mddev)),
 			1, &md_fops, md_size[mdidx(mddev)]<<1);
 
-	read_ahead[MD_MAJOR] = 1024;
 	return (0);
 }
 
@@ -2619,8 +2618,6 @@
 						(u64 *) arg);
 			goto done;
 
-		case BLKRAGET:
-		case BLKRASET:
 		case BLKFLSBUF:
 		case BLKBSZGET:
 		case BLKBSZSET:
@@ -3167,13 +3164,6 @@
 
 	sz += sprintf(page+sz, "\n");
 
-
-	sz += sprintf(page+sz, "read_ahead ");
-	if (read_ahead[MD_MAJOR] == INT_MAX)
-		sz += sprintf(page+sz, "not set\n");
-	else
-		sz += sprintf(page+sz, "%d sectors\n", read_ahead[MD_MAJOR]);
-
 	ITERATE_MDDEV(mddev,tmp) {
 		sz += sprintf(page + sz, "md%d : %sactive", mdidx(mddev),
 						mddev->pers ? "" : "in");
@@ -3663,9 +3653,6 @@
 	/* forward all md request to md_make_request */
 	blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), md_make_request);
 
-
-	read_ahead[MAJOR_NR] = INT_MAX;
-
 	add_gendisk(&md_gendisk);
 
 	md_recovery_thread = md_register_thread(md_do_recovery, NULL, name);
diff -urN linux/drivers/message/i2o/i2o_block.c linux-new/drivers/message/i2o/i2o_block.c
--- linux/drivers/message/i2o/i2o_block.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/message/i2o/i2o_block.c	Mon Nov 26 03:09:04 2001
@@ -1170,11 +1170,9 @@
 		case BLKFLSBUF:
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKPG:
 			return blk_ioctl(inode->i_rdev, cmd, arg);
-			
+
 		default:
 			return -EINVAL;
 	}
diff -urN linux/drivers/s390/block/xpram.c linux-new/drivers/s390/block/xpram.c
--- linux/drivers/s390/block/xpram.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/s390/block/xpram.c	Mon Nov 26 03:07:23 2001
@@ -659,22 +659,6 @@
 		if ( capable(CAP_SYS_ADMIN) )invalidate_buffers(inode->i_rdev);
 		return 0;
 
-	case BLKRAGET: /* return the readahead value, 0x1263 */
-		if (!arg)  return -EINVAL;
-		err = 0; /* verify_area_20(VERIFY_WRITE, (long *) arg, sizeof(long));
-		          * if (err) return err;
-                          */
-		put_user(read_ahead[MAJOR(inode->i_rdev)], (long *)arg);
-
-		return 0;
-
-	case BLKRASET: /* set the readahead value, 0x1262 */
-		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-		if (arg > 0xff) return -EINVAL; /* limit it */
-		read_ahead[MAJOR(inode->i_rdev)] = arg;
-                atomic_eieio();
-		return 0;
-
 	case BLKRRPART: /* re-read partition table: can't do it, 0x1259 */
 		return -EINVAL;
 
@@ -1043,7 +1027,6 @@
 	blk_init_queue (q, xpram_request);
 	blk_queue_headactive (BLK_DEFAULT_QUEUE (major), 0);
 #endif /* V22/V24 */
-	read_ahead[major] = xpram_rahead;
 
 	/* we want to have XPRAM_UNUSED blocks security buffer between devices */
 	mem_usable=xpram_mem_avail-(XPRAM_UNUSED*(xpram_devs-1));
@@ -1182,7 +1165,6 @@
 	kfree(xpram_hardsects);
 	hardsect_size[major] = NULL;
  fail_malloc:
-	read_ahead[major] = 0;
 #if (XPRAM_VERSION == 22)
 	blk_dev[major].request_fn = NULL;
 #endif /* V22 */
@@ -1222,7 +1204,6 @@
 #if (XPRAM_VERSION == 22)
 	blk_dev[major].request_fn = NULL;
 #endif /* V22 */
-	read_ahead[major] = 0;
 	blk_size[major] = NULL;
 	kfree(blksize_size[major]);
 	blksize_size[major] = NULL;
diff -urN linux/drivers/s390/char/tapeblock.c linux-new/drivers/s390/char/tapeblock.c
--- linux/drivers/s390/char/tapeblock.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/s390/char/tapeblock.c	Mon Nov 26 03:08:01 2001
@@ -102,7 +102,6 @@
     }
     if (tapeblock_major == 0) tapeblock_major = result;   /* accept dynamic major number*/
     INIT_BLK_DEV(tapeblock_major,tape_request_fn,tapeblock_getqueue,NULL);
-    read_ahead[tapeblock_major]=TAPEBLOCK_READAHEAD;
     PRINT_WARN(KERN_ERR " tape gets major %d for block device\n", result);
     blk_size[tapeblock_major] = (int*) kmalloc (256*sizeof(int),GFP_ATOMIC);
     memset(blk_size[tapeblock_major],0,256*sizeof(int));
diff -urN linux/drivers/scsi/sd.c linux-new/drivers/scsi/sd.c
--- linux/drivers/scsi/sd.c	Fri Nov  9 23:05:06 2001
+++ linux-new/drivers/scsi/sd.c	Mon Nov 26 03:13:51 2001
@@ -234,8 +234,6 @@
 		case BLKGETSIZE64:
 		case BLKROSET:
 		case BLKROGET:
-		case BLKRASET:
-		case BLKRAGET:
 		case BLKFLSBUF:
 		case BLKSSZGET:
 		case BLKPG:
@@ -1217,18 +1215,14 @@
 				rscsi_disks[i].has_part_table = 1;
 			}
 		}
-	/* If our host adapter is capable of scatter-gather, then we increase
-	 * the read-ahead to 60 blocks (120 sectors).  If not, we use
-	 * a two block (4 sector) read ahead. We can only respect this with the
-	 * granularity of every 16 disks (one device major).
+
+	/* FIXME: If our host adapter is capable of scatter-gather, then we
+	 * should increase the number of blocks we read at once to 60 (120
+	 * sectors).  However there is currently no such kind of mechanism
+	 * there... Please have a look at the corresponding comment in sr.c
+	 *
+	 * --dalecki
 	 */
-	for (i = 0; i < N_USED_SD_MAJORS; i++) {
-		read_ahead[SD_MAJOR(i)] =
-		    (rscsi_disks[i * SCSI_DISKS_PER_MAJOR].device
-		     && rscsi_disks[i * SCSI_DISKS_PER_MAJOR].device->host->sg_tablesize)
-		    ? 120	/* 120 sector read-ahead */
-		    : 4;	/* 4 sector read-ahead */
-	}
 
 	return;
 }
@@ -1405,7 +1399,6 @@
 		del_gendisk(&sd_gendisks[i]);
 		blk_size[SD_MAJOR(i)] = NULL;
 		hardsect_size[SD_MAJOR(i)] = NULL;
-		read_ahead[SD_MAJOR(i)] = 0;
 	}
 	sd_template.dev_max = 0;
 	if (sd_gendisks != &sd_gendisk)
diff -urN linux/drivers/scsi/sr.c linux-new/drivers/scsi/sr.c
--- linux/drivers/scsi/sr.c	Thu Oct 25 22:58:35 2001
+++ linux-new/drivers/scsi/sr.c	Mon Nov 26 02:45:19 2001
@@ -888,14 +888,12 @@
 		register_cdrom(&scsi_CDs[i].cdi);
 	}
 
-
-	/* If our host adapter is capable of scatter-gather, then we increase
-	 * the read-ahead to 16 blocks (32 sectors).  If not, we use
-	 * a two block (4 sector) read ahead. */
-	if (scsi_CDs[0].device && scsi_CDs[0].device->host->sg_tablesize)
-		read_ahead[MAJOR_NR] = 32;	/* 32 sector read-ahead.  Always removable. */
-	else
-		read_ahead[MAJOR_NR] = 4;	/* 4 sector read-ahead */
+	/* FIXME: There should be a way to increase some kind of driver read
+	 * ahead value for the device here. Plase have a look at the
+	 * corresponding note in sd.c.
+	 *
+	 * --dalecki
+	 */
 
 	return;
 }
@@ -954,7 +952,6 @@
 	blksize_size[MAJOR_NR] = NULL;
         hardsect_size[MAJOR_NR] = NULL;
 	blk_size[MAJOR_NR] = NULL;
-	read_ahead[MAJOR_NR] = 0;
 
 	sr_template.dev_max = 0;
 }
diff -urN linux/drivers/scsi/sr_ioctl.c linux-new/drivers/scsi/sr_ioctl.c
--- linux/drivers/scsi/sr_ioctl.c	Mon Oct 15 22:27:42 2001
+++ linux-new/drivers/scsi/sr_ioctl.c	Mon Nov 26 03:14:37 2001
@@ -550,8 +550,6 @@
 		return put_user((u64)scsi_CDs[target].capacity << 9, (u64 *)arg);
 	case BLKROSET:
 	case BLKROGET:
-	case BLKRASET:
-	case BLKRAGET:
 	case BLKFLSBUF:
 	case BLKSSZGET:
 		return blk_ioctl(cdi->dev, cmd, arg);
diff -urN linux/dump linux-new/dump
--- linux/dump	Thu Jan  1 01:00:00 1970
+++ linux-new/dump	Mon Nov 26 03:12:16 2001
@@ -0,0 +1,2 @@
+BLKRASET
+BLKRAGET
diff -urN linux/fs/hfs/file.c linux-new/fs/hfs/file.c
--- linux/fs/hfs/file.c	Sun Aug 12 19:56:56 2001
+++ linux-new/fs/hfs/file.c	Mon Nov 26 02:23:10 2001
@@ -313,8 +313,8 @@
 
 	bhb = bhe = buflist;
 	if (reada) {
-		if (blocks < read_ahead[MAJOR(dev)] / (HFS_SECTOR_SIZE>>9)) {
-			blocks = read_ahead[MAJOR(dev)] / (HFS_SECTOR_SIZE>>9);
+		if (blocks < reada / (HFS_SECTOR_SIZE>>9)) {
+			blocks = reada / (HFS_SECTOR_SIZE>>9);
 		}
 		if (block + blocks > size) {
 			blocks = size - block;
diff -urN linux/include/linux/fs.h linux-new/include/linux/fs.h
--- linux/include/linux/fs.h	Thu Nov 22 20:46:19 2001
+++ linux-new/include/linux/fs.h	Mon Nov 26 03:23:50 2001
@@ -170,8 +170,10 @@
 #define BLKRRPART  _IO(0x12,95)	/* re-read partition table */
 #define BLKGETSIZE _IO(0x12,96)	/* return device size /512 (long *arg) */
 #define BLKFLSBUF  _IO(0x12,97)	/* flush buffer cache */
+#if 0
 #define BLKRASET   _IO(0x12,98)	/* Set read ahead for block device */
 #define BLKRAGET   _IO(0x12,99)	/* get current read ahead setting */
+#endif
 #define BLKFRASET  _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */
 #define BLKFRAGET  _IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */
 #define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */
@@ -1438,7 +1440,6 @@
 
 extern ssize_t char_read(struct file *, char *, size_t, loff_t *);
 extern ssize_t block_read(struct file *, char *, size_t, loff_t *);
-extern int read_ahead[];
 
 extern ssize_t char_write(struct file *, const char *, size_t, loff_t *);
 extern ssize_t block_write(struct file *, const char *, size_t, loff_t *);
diff -urN linux/kernel/ksyms.c linux-new/kernel/ksyms.c
--- linux/kernel/ksyms.c	Wed Nov 21 23:07:25 2001
+++ linux-new/kernel/ksyms.c	Mon Nov 26 02:23:04 2001
@@ -496,7 +496,6 @@
 EXPORT_SYMBOL(clear_inode);
 EXPORT_SYMBOL(___strtok);
 EXPORT_SYMBOL(init_special_inode);
-EXPORT_SYMBOL(read_ahead);
 EXPORT_SYMBOL(get_hash_table);
 EXPORT_SYMBOL(get_empty_inode);
 EXPORT_SYMBOL(insert_inode_hash);

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Linux-2.4.15-pre9
  2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
  2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
  2001-11-22 19:16   ` Linux-2.4.15-pre9 Tim Schmielau
@ 2001-11-26 15:18   ` bill davidsen
  2 siblings, 0 replies; 16+ messages in thread
From: bill davidsen @ 2001-11-26 15:18 UTC (permalink / raw)
  To: linux-kernel

In article <Pine.LNX.4.33.0111221046170.1479-100000@penguin.transmeta.com> 
  torvalds@transmeta.com claimed this objective:
>
>On Thu, 22 Nov 2001, Anuradha Ratnaweera wrote:
>>
>> On Wed, Nov 21, 2001 at 10:44:30PM -0800, Linus Torvalds wrote:
>> >
>> > I think I'm ready to hand this over to Marcelo.
>>
>> Aren't you going to include Tim Schmielau's patch to handle uptime larger than
>> 497 days?  It is a cool feature we always liked to have.
>
>Quite frankly, right now I'm in "handle only bugs that can crash the
>system mode". Anything that takes 497 days to see is fairly low on my
>priority list. My highest priority, in fact, is to get 2.4.15 out without
>any embarrassment.

Back in the 60's when GE was still a mainframe manufacturer they had a
counter which rolled over at about 35 days. When it started failing
their competitors had good time with "GECOS fails to fail as expected."
That *is* an embarrassment.

con06:news> uptime
  9:56am  up 427 days, 19:00,  2 users,  load average: 0.87, 0.88, 0.83

-- 
bill davidsen <davidsen@tmr.com>
  His first management concern is not solving the problem, but covering
his ass. If he lived in the middle ages he'd wear his codpiece backward.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: PATCH 2.5.0 kill  read_ahead array.
  2001-11-26 11:52     ` PATCH 2.5.0 kill read_ahead array Martin Dalecki
@ 2001-11-26 16:34       ` Andreas Dilger
  2001-11-26 16:53         ` Martin Dalecki
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Dilger @ 2001-11-26 16:34 UTC (permalink / raw)
  To: Martin Dalecki; +Cc: Linus Torvalds, Kernel Mailing List

On Nov 26, 2001  12:52 +0100, Martin Dalecki wrote:
> This is removing the "write only" read_ahead sparse array from all
> the places where it's "used" by now. 
> This is just saving some memmory.

Is this a case of the "read_ahead" array is redundant and read ahead is
done at a different level (not using this array), or is it a case of
read ahead not being done at all?  If it is not being done at all, then
removing the unused array is the wrong thing to do - we should fix
read ahead, and start using the array.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: PATCH 2.5.0 kill  read_ahead array.
  2001-11-26 16:34       ` Andreas Dilger
@ 2001-11-26 16:53         ` Martin Dalecki
  0 siblings, 0 replies; 16+ messages in thread
From: Martin Dalecki @ 2001-11-26 16:53 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Martin Dalecki, Linus Torvalds, Kernel Mailing List

Andreas Dilger wrote:
> 
> On Nov 26, 2001  12:52 +0100, Martin Dalecki wrote:
> > This is removing the "write only" read_ahead sparse array from all
> > the places where it's "used" by now.
> > This is just saving some memmory.
> 
> Is this a case of the "read_ahead" array is redundant and read ahead is
> done at a different level (not using this array), or is it a case of
> read ahead not being done at all?  If it is not being done at all, then
> removing the unused array is the wrong thing to do - we should fix
> read ahead, and start using the array.

No we shouldn't.

There are the following problems with the read_ahead array as it
currently
stands:

1. It isn't used at all at any level! 
Even the AS390 people finally cleaned aparently theyr code up. 

REALY REALY Please look at the the patch. 

There is only one bogous place in hfs, where this array was used at all.
Literally all other places are just writing some values into it.
This is what I'm calling a "write only" variable.

2. It is bound to the major number, which is the wrong granularity,
since linux doesn't preserve the device type on this level and is
slicing up
the minor numbers. This is the most severe brain damage of it.

3. We have anyway a filesystem read ahead layer there.

4. We have a block device driver read ahead layer there too 
(it's called blksize there...).

5. We have blk_dev_t and block_device structs, which are supposed
to replace the current static global array, since they are the
more logical place where such information should be placed. This
is unevitable if we are ever willing to provide support for real
kernel scalability in terms of numbers of attached devices...

Regard's.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2001-11-26 17:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22  6:44 Linux-2.4.15-pre9 Linus Torvalds
2001-11-22  7:47 ` Linux-2.4.15-pre9 Anuradha Ratnaweera
2001-11-22 18:52   ` Linux-2.4.15-pre9 Linus Torvalds
2001-11-22 19:34     ` Linux-2.4.15-pre9 Alexander Viro
2001-11-22 19:46       ` Linux-2.4.15-pre9 Tom Rini
2001-11-23 16:20     ` Linux-2.4.15-pre9 Michael H. Warfield
2001-11-26 11:52     ` PATCH 2.5.0 kill read_ahead array Martin Dalecki
2001-11-26 16:34       ` Andreas Dilger
2001-11-26 16:53         ` Martin Dalecki
2001-11-22 19:16   ` Linux-2.4.15-pre9 Tim Schmielau
2001-11-26 15:18   ` Linux-2.4.15-pre9 bill davidsen
2001-11-22  8:41 ` [PATCH] fix SCSI non-blocksize reads Erik Andersen
2001-11-22 17:09   ` Linus Torvalds
2001-11-22 17:20     ` Erik Andersen
2001-11-22 18:40       ` Linus Torvalds
2001-11-24  0:04         ` Erik Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox