Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs Don't let the pager_map deadlock avoidance code ...



details:   https://anonhg.NetBSD.org/src/rev/b816f882777d
branches:  trunk
changeset: 580691:b816f882777d
user:      perseant <perseant%NetBSD.org@localhost>
date:      Wed May 04 04:58:22 2005 +0000

description:
Don't let the pager_map deadlock avoidance code in lfs_putpages() write
segments containing zero-block FINFO records.  These records cause segments
to become uncleanable, which would eventually result in a "no clean segments"
panic.

diffstat:

 sys/ufs/lfs/lfs_vfsops.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r bd6e731b264e -r b816f882777d sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Wed May 04 02:40:55 2005 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Wed May 04 04:58:22 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.177 2005/04/23 19:47:51 perseant Exp $        */
+/*     $NetBSD: lfs_vfsops.c,v 1.178 2005/05/04 04:58:22 perseant Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.177 2005/04/23 19:47:51 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.178 2005/05/04 04:58:22 perseant Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -2029,7 +2029,12 @@
                      (int)((SEGSUM *)(sp->segsum))->ss_nfinfo,
                      (unsigned)fs->lfs_offset));
 #endif
-               lfs_updatemeta(sp);
+               if (sp->fip->fi_nblocks == 0) {
+                       /* Don't write zero-length finfos */
+                       --((SEGSUM *)(sp->segsum))->ss_nfinfo;
+                       sp->sum_bytes_left += FINFOSIZE;
+               } else
+                       lfs_updatemeta(sp);
 
                version = sp->fip->fi_version;
                (void) lfs_writeseg(fs, sp);



Home | Main Index | Thread Index | Old Index