Date: Wed, 24 Sep 1997 12:25:31 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: KATO Takenori <kato@migmatite.eps.nagoya-u.ac.jp> Cc: current@freebsd.org Subject: Re: Daily SNAPshots at current.freebsd.org shut down for now. Message-ID: <1237.875096731@critter.freebsd.dk> In-Reply-To: Your message of "Wed, 24 Sep 1997 19:17:40 %2B0900." <199709241017.TAA01768@gneiss.eps.nagoya-u.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199709241017.TAA01768@gneiss.eps.nagoya-u.ac.jp>, KATO Takenori wri
tes:
>> disable clustering on a per filesystem or mount point basis and disallow
>> it for vn devices. If you think about it, it doesn't make sense in the
>> first place.
>
>How about following following patch?
Looks good.
I would suggest you make a mount option for it so you can decide for
other filesystems if you want clustering or not.
Go for it!
Poul-Henning.
>
>---------- BEGIN ----------
>*** sys/vnode.h.ORIG Wed Sep 24 18:47:16 1997
>--- sys/vnode.h Wed Sep 24 18:49:46 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 objec
>t */
>! #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 director
>y op */
>! #define VVMIO 0x2000 /* VMIO flag */
>! #define VNINACT 0x4000 /* LFS: skip ufs_inactive() in lfs_vunr
>ef */
>! #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 objec
>t */
>! #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 director
>y op */
>! #define VVMIO 0x02000 /* VMIO flag */
>! #define VNINACT 0x04000 /* LFS: skip ufs_inactive() in lfs_vunr
>ef */
>! #define VAGE 0x08000 /* Insert vnode at head of free list */
>! #define VNOCLUSTER 0x10000 /* Disable cluster read and write */
>
> /*
> * Vnode attributes. A field value of VNOVAL represents a field whose value
>*** dev/vn/vn.c.ORIG Wed Sep 24 18:59:07 1997
>--- dev/vn/vn.c Wed Sep 24 19:00:42 1997
>***************
>*** 467,472 ****
>--- 467,473 ----
> }
> VOP_UNLOCK(nd.ni_vp);
> vn->sc_vp = nd.ni_vp;
>+ vn->sc_vp->v_flag |= VNOCLUSTER; /* disable cluster read
> write */
> vn->sc_size = btodb(vattr.va_size); /* note truncation */
> error = vnsetcred(vn, p->p_ucred);
> if (error) {
>*** ufs/ufs/ufs_readwrite.c.ORIG Wed Sep 24 18:51:04 1997
>--- ufs/ufs/ufs_readwrite.c Wed Sep 24 18:52:38 1997
>***************
>*** 120,126 ****
> #else
> 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) {
>--- 120,126 ----
> #else
> 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) {
>***************
>*** 286,292 ****
> if (ioflag & IO_SYNC) {
> (void)bwrite(bp);
> } else if (xfersize + blkoffset == fs->fs_bsize) {
>! if (doclusterwrite) {
> bp->b_flags |= B_CLUSTEROK;
> cluster_write(bp, ip->i_size);
> } else {
>--- 286,292 ----
> if (ioflag & IO_SYNC) {
> (void)bwrite(bp);
> } else if (xfersize + blkoffset == fs->fs_bsize) {
>! if (doclusterwrite && !(vp->v_flag & VNOCLUSTER)) {
> bp->b_flags |= B_CLUSTEROK;
> cluster_write(bp, ip->i_size);
> } else {
>*** isofs/cd9660/cd9660_vnops.c.ORIG Wed Sep 24 18:54:59 1997
>--- isofs/cd9660/cd9660_vnops.c Wed Sep 24 18:55:38 1997
>***************
>*** 341,347 ****
> n = diff;
> size = iso_blksize(imp, ip, lbn);
> rablock = lbn + 1;
>! if (doclusterread) {
> if (iso_lblktosize(imp, rablock) <= ip->i_size)
> error = cluster_read(vp, ip->i_size,
> lbn, size, NOCRED, &bp);
>--- 341,347 ----
> n = diff;
> size = iso_blksize(imp, ip, lbn);
> rablock = lbn + 1;
>! if (doclusterread && !(vp->v_flag & VNOCLUSTER)) {
> if (iso_lblktosize(imp, rablock) <= ip->i_size)
> error = cluster_read(vp, ip->i_size,
> lbn, size, NOCRED, &bp);
>*** gnu/ext2fs/ext2_readwrite.c.ORIG Wed Sep 24 18:53:10 1997
>--- gnu/ext2fs/ext2_readwrite.c Wed Sep 24 18:54:24 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) {
>***************
>*** 284,290 ****
> if (ioflag & IO_SYNC) {
> (void)bwrite(bp);
> } else if (xfersize + blkoffset == fs->s_frag_size) {
>! if (doclusterwrite) {
> #if defined(__FreeBSD__)
> bp->b_flags |= B_CLUSTEROK;
> #endif
>--- 284,290 ----
> if (ioflag & IO_SYNC) {
> (void)bwrite(bp);
> } else if (xfersize + blkoffset == fs->s_frag_size) {
>! if (doclusterwrite && !(vp->v_flag & VNOCLUSTER)) {
> #if defined(__FreeBSD__)
> bp->b_flags |= B_CLUSTEROK;
> #endif
>----
>
>
>----
>KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp>
>Dept. Earth Planet. Sci., Nagoya Univ., Nagoya, 464-01, Japan
>PGP public key: finger kato@eclogite.eps.nagoya-u.ac.jp
>------------------- Powered by FreeBSD(98) -------------------
--
Poul-Henning Kamp FreeBSD coreteam member
phk@FreeBSD.ORG "Real hackers run -current on their laptop."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1237.875096731>
