diff options
author | peter <peter@FreeBSD.org> | 1998-10-29 09:51:28 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-29 09:51:28 +0000 |
commit | fe9b0651f9650a3815154d233af2bab0ab84c658 (patch) | |
tree | ba226201b0083ee55447a23bbfc1bae861102e4a /sys | |
parent | 0c010ce2d17c43014f1f4879d166c8e0abdcb86e (diff) | |
download | FreeBSD-src-fe9b0651f9650a3815154d233af2bab0ab84c658.zip FreeBSD-src-fe9b0651f9650a3815154d233af2bab0ab84c658.tar.gz |
Remove the V_SAVEMETA flag, nothing uses it any more now that msdosfs and
ext2fs call vtruncbuf() directly. This simplifies and cleans up
vinvalbuf() a little.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_export.c | 25 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 25 | ||||
-rw-r--r-- | sys/sys/vnode.h | 3 |
3 files changed, 15 insertions, 38 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 2fd7bfc..fad388a 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.168 1998/10/25 17:44:52 phk Exp $ + * $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $ */ /* @@ -605,20 +605,14 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) } s = splbio(); for (;;) { - if ((blist = vp->v_cleanblkhd.lh_first) && (flags & V_SAVEMETA)) - while (blist && blist->b_lblkno < 0) - blist = blist->b_vnbufs.le_next; - if (!blist && (blist = vp->v_dirtyblkhd.lh_first) && - (flags & V_SAVEMETA)) - while (blist && blist->b_lblkno < 0) - blist = blist->b_vnbufs.le_next; + blist = vp->v_cleanblkhd.lh_first; + if (!blist) + blist = vp->v_dirtyblkhd.lh_first; if (!blist) break; for (bp = blist; bp; bp = nbp) { nbp = bp->b_vnbufs.le_next; - if ((flags & V_SAVEMETA) && bp->b_lblkno < 0) - continue; if (bp->b_flags & B_BUSY) { bp->b_flags |= B_WANTED; error = tsleep((caddr_t) bp, @@ -676,17 +670,12 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) simple_lock(&vp->v_interlock); object = vp->v_object; if (object != NULL) { - if (flags & V_SAVEMETA) - vm_object_page_remove(object, 0, object->size, - (flags & V_SAVE) ? TRUE : FALSE); - else - vm_object_page_remove(object, 0, 0, - (flags & V_SAVE) ? TRUE : FALSE); + vm_object_page_remove(object, 0, 0, + (flags & V_SAVE) ? TRUE : FALSE); } simple_unlock(&vp->v_interlock); - if (!(flags & V_SAVEMETA) && - (vp->v_dirtyblkhd.lh_first || vp->v_cleanblkhd.lh_first)) + if (vp->v_dirtyblkhd.lh_first || vp->v_cleanblkhd.lh_first) panic("vinvalbuf: flush failed"); return (0); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2fd7bfc..fad388a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.168 1998/10/25 17:44:52 phk Exp $ + * $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $ */ /* @@ -605,20 +605,14 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) } s = splbio(); for (;;) { - if ((blist = vp->v_cleanblkhd.lh_first) && (flags & V_SAVEMETA)) - while (blist && blist->b_lblkno < 0) - blist = blist->b_vnbufs.le_next; - if (!blist && (blist = vp->v_dirtyblkhd.lh_first) && - (flags & V_SAVEMETA)) - while (blist && blist->b_lblkno < 0) - blist = blist->b_vnbufs.le_next; + blist = vp->v_cleanblkhd.lh_first; + if (!blist) + blist = vp->v_dirtyblkhd.lh_first; if (!blist) break; for (bp = blist; bp; bp = nbp) { nbp = bp->b_vnbufs.le_next; - if ((flags & V_SAVEMETA) && bp->b_lblkno < 0) - continue; if (bp->b_flags & B_BUSY) { bp->b_flags |= B_WANTED; error = tsleep((caddr_t) bp, @@ -676,17 +670,12 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) simple_lock(&vp->v_interlock); object = vp->v_object; if (object != NULL) { - if (flags & V_SAVEMETA) - vm_object_page_remove(object, 0, object->size, - (flags & V_SAVE) ? TRUE : FALSE); - else - vm_object_page_remove(object, 0, 0, - (flags & V_SAVE) ? TRUE : FALSE); + vm_object_page_remove(object, 0, 0, + (flags & V_SAVE) ? TRUE : FALSE); } simple_unlock(&vp->v_interlock); - if (!(flags & V_SAVEMETA) && - (vp->v_dirtyblkhd.lh_first || vp->v_cleanblkhd.lh_first)) + if (vp->v_dirtyblkhd.lh_first || vp->v_cleanblkhd.lh_first) panic("vinvalbuf: flush failed"); return (0); } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 5567a3a..9b23fa6 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 - * $Id: vnode.h,v 1.74 1998/09/11 18:50:16 rvb Exp $ + * $Id: vnode.h,v 1.75 1998/10/16 03:55:01 peter Exp $ */ #ifndef _SYS_VNODE_H_ @@ -242,7 +242,6 @@ extern int vttoif_tab[]; #define WRITECLOSE 0x0004 /* vflush: only close writable files */ #define DOCLOSE 0x0008 /* vclean: close active files */ #define V_SAVE 0x0001 /* vinvalbuf: sync file first */ -#define V_SAVEMETA 0x0002 /* vinvalbuf: leave indirect blocks */ #define REVOKEALL 0x0001 /* vop_revoke: revoke all aliases */ #define VREF(vp) vref(vp) |