OK still one question bogs me: Why do we this check at the VFS layer.
Wouldn't be sifficient to do it where it really belongs:
The strategy routine or one level up in the block device handling?
(Maybe this is exactly what's already happaning. I will have to dig it
up.)
This way one wouldn't need to replicate the check code all over all
the filesystems and possible one could still get away without the
hard sector sizes array. (Which is still offending me by it's design
;-).
> --- 2.3.30pre3-alpha/fs/minix/inode.c.~1~ Tue Sep 14 14:35:13 1999
> +++ 2.3.30pre3-alpha/fs/minix/inode.c Mon Nov 29 17:45:02 1999
> @@ -177,6 +177,7 @@
> kdev_t dev = s->s_dev;
> const char * errmsg;
> struct inode *root_inode;
> + unsigned int hblock;
>
> /* N.B. These should be compile-time tests.
> Unfortunately that is impossible. */
> @@ -186,6 +187,11 @@
> panic("bad V2 i-node size");
>
> MOD_INC_USE_COUNT;
> +
> + hblock = get_hardblocksize(dev);
> + if (hblock && hblock > BLOCK_SIZE)
> + goto out_bad_hblock;
> +
> lock_super(s);
> set_blocksize(dev, BLOCK_SIZE);
> if (!(bh = bread(dev,1,BLOCK_SIZE)))
> @@ -322,11 +328,16 @@
> brelse(bh);
> goto out_unlock;
>
> +out_bad_hblock:
> + printk("MINIX-fs: blocksize too small for device.\n");
> + goto out;
> +
> out_bad_sb:
> printk("MINIX-fs: unable to read superblock\n");
> out_unlock:
> - s->s_dev = 0;
> unlock_super(s);
> + out:
> + s->s_dev = 0;
> MOD_DEC_USE_COUNT;
> return NULL;
> }
>
> >The NR_REQUESTS isn't used anywhere else and it's kernel internal
> >thing that shouldn't be exposed to user space. (it wasn't).
>
> When I gone to make the ll_rw_block layer bigmem capable I needed it from
> the outside to make sure to avoid deadlocks due OOM. That's why I think
> it's something that somebody (like the VM) may be interested about.
>
> >I doubt seriously if the result of this procedure give good results on
> >the average system out there. At least I would prefere much to have a
>
> I dubited too but Dave says that testcase is been large enough to
> represent to any kind of setup out there.
>
> >deductive
> >statement supporting it.
>
> Me too.
>
> Andrea
Lenin says: "Trust is good, control is better". So Dave please plese
give
some comments/explanations...
-- Marcin Dalecki- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/