Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs Expand the category of "metadata" in lfs_markv t...



details:   https://anonhg.NetBSD.org/src/rev/eed8efa2600d
branches:  trunk
changeset: 480533:eed8efa2600d
user:      perseant <perseant%NetBSD.org@localhost>
date:      Fri Jan 14 21:41:11 2000 +0000

description:
Expand the category of "metadata" in lfs_markv to include Ifile data blocks.
This prevents a rare condition in which Ifile "ifile" blocks, that is, the
blocks of the ifile which point VOP_VGET at the inode block containing the
requested inode, from being "unwritten" when cleaning during intense disk
activity.

diffstat:

 sys/ufs/lfs/lfs_syscalls.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 30cd0db9f209 -r eed8efa2600d sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c        Fri Jan 14 21:38:46 2000 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c        Fri Jan 14 21:41:11 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_syscalls.c,v 1.37 1999/11/23 23:52:42 fvdl Exp $   */
+/*     $NetBSD: lfs_syscalls.c,v 1.38 2000/01/14 21:41:11 perseant Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -399,13 +399,14 @@
                        }
                        splx(s);
                }
-               if (blkp->bi_lbn >= 0)  { /* Data Block */
-                       /* XXX KS - should we use incore here, or just always use getblk()? */
+               if (ip->i_number != LFS_IFILE_INUM && blkp->bi_lbn >= 0) {
+                       /* Data Block */
                        bp = lfs_fakebuf(vp, blkp->bi_lbn,
                                         blkp->bi_size, blkp->bi_bp);
                        /* Pretend we used bread() to get it */
                        bp->b_blkno = blkp->bi_daddr;
-               } else {        /* Indirect block */
+               } else {
+                       /* Indirect block */
                        bp = getblk(vp, blkp->bi_lbn, blkp->bi_size, 0, 0);
                        if (!(bp->b_flags & (B_DONE|B_DELWRI))) { /* B_CACHE */
                                /*



Home | Main Index | Thread Index | Old Index