Date: Thu, 25 Sep 1997 23:11:44 +1000 From: Bruce Evans <bde@zeta.org.au> To: kato@migmatite.eps.nagoya-u.ac.jp, phk@critter.freebsd.dk Cc: current@FreeBSD.ORG Subject: Re: Daily SNAPshots at current.freebsd.org shut down for now. Message-ID: <199709251311.XAA16478@godzilla.zeta.org.au>
index | next in thread | raw e-mail
>> I would suggest you make a mount option for it so you can decide for
>> other filesystems if you want clustering or not.
>
>I don't have enough time, so what I can do now is to add vnconfig
>option to disable clustering. (I also think mount option is good
>mechanism and I need it to use union fs safely.)
There's always time to do it again? :-)
I think this has a major problem - it disables clustering in the wrong
layer. I/O to the vn file must be clustered for efficiency.
The mount option would automatically apply to the correct layer.
>diff -arcN sys.old/gnu/ext2fs/ext2_readwrite.c sys/gnu/ext2fs/ext2_readwrite.c
>*** sys.old/gnu/ext2fs/ext2_readwrite.c Wed Sep 24 20:27:46 1997
>--- sys/gnu/ext2fs/ext2_readwrite.c Wed Sep 24 22:44:01 1997
>***************
>*** 112,118 ****
>
> if (lblktosize(fs, nextlbn) >= ip->i_size)
> error = bread(vp, lbn, size, NOCRED, &bp);
>! else if (doclusterread)
> error = cluster_read(vp,
> ip->i_size, lbn, size, NOCRED, &bp);
> else if (lbn - 1 == vp->v_lastr) {
>--- 112,118 ----
>
> if (lblktosize(fs, nextlbn) >= ip->i_size)
> error = bread(vp, lbn, size, NOCRED, &bp);
>! else if (doclusterread && !(vp->v_flag & VNOCLUSTER))
> error = cluster_read(vp,
> ip->i_size, lbn, size, NOCRED, &bp);
> else if (lbn - 1 == vp->v_lastr) {
For the current version, I think the test needs to be something like
else if (doclusterread &&
!(vp->v_mount->mnt_vnodecovered & VNOCLUSTER))
Perhaps the mount-option version should eliminate doclusterread and
doclusterwrite (this requires a mount option for each) and move the
tests into cluster_read() and cluster_write().
>diff -arcN sys.old/sys/vnode.h sys/sys/vnode.h
>*** sys.old/sys/vnode.h Wed Sep 24 20:26:36 1997
>--- sys/sys/vnode.h Wed Sep 24 22:37:44 1997
>***************
>*** 111,129 ****
> /*
> * Vnode flags.
> */
>! #define VROOT 0x0001 /* root of its file system */
>! #define VTEXT 0x0002 /* vnode is a pure text prototype */
>! #define VSYSTEM 0x0004 /* vnode being used by kernel */
>! #define VOLOCK 0x0008 /* vnode is locked waiting for an object */
>! #define VOWANT 0x0010 /* a process is waiting for VOLOCK */
>! #define VXLOCK 0x0100 /* vnode is locked to change underlying type */
>! #define VXWANT 0x0200 /* process is waiting for vnode */
>! #define VBWAIT 0x0400 /* waiting for output to complete */
>! #define VALIASED 0x0800 /* vnode has an alias */
>! #define VDIROP 0x1000 /* LFS: vnode is involved in a directory op */
>! #define VVMIO 0x2000 /* VMIO flag */
>! #define VNINACT 0x4000 /* LFS: skip ufs_inactive() in lfs_vunref */
>! #define VAGE 0x8000 /* Insert vnode at head of free list */
>
> /*
> * Vnode attributes. A field value of VNOVAL represents a field whose value
>--- 111,130 ----
> /*
> * Vnode flags.
> */
>! #define VROOT 0x00001 /* root of its file system */
>! #define VTEXT 0x00002 /* vnode is a pure text prototype */
>! #define VSYSTEM 0x00004 /* vnode being used by kernel */
>! #define VOLOCK 0x00008 /* vnode is locked waiting for an object */
>! #define VOWANT 0x00010 /* a process is waiting for VOLOCK */
>! #define VXLOCK 0x00100 /* vnode is locked to change underlying type */
>! #define VXWANT 0x00200 /* process is waiting for vnode */
>! #define VBWAIT 0x00400 /* waiting for output to complete */
>! #define VALIASED 0x00800 /* vnode has an alias */
>! #define VDIROP 0x01000 /* LFS: vnode is involved in a directory op */
>! #define VVMIO 0x02000 /* VMIO flag */
>! #define VNINACT 0x04000 /* LFS: skip ufs_inactive() in lfs_vunref */
>! #define VAGE 0x08000 /* Insert vnode at head of free list */
>! #define VNOCLUSTER 0x10000 /* disable cluster read / write */
>
> /*
> * Vnode attributes. A field value of VNOVAL represents a field whose value
I don't like large essentially-null changes just to keep 0x numbers
lined up. Rev.1.49 has already added another digit to all the numbers.
You would need to change them all again.
Bruce
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709251311.XAA16478>
