Module Name:    src
Committed By:   perseant
Date:           Thu Jan  5 16:18:01 UTC 2012

Modified Files:
        src/sbin/fsck_lfs: pass6.c

Log Message:
Correct fragment extension calculation in pass6, to avoid putting
negative block counts on inodes during roll-forward.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/fsck_lfs/pass6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_lfs/pass6.c
diff -u src/sbin/fsck_lfs/pass6.c:1.23 src/sbin/fsck_lfs/pass6.c:1.24
--- src/sbin/fsck_lfs/pass6.c:1.23	Tue Feb 16 23:20:30 2010
+++ src/sbin/fsck_lfs/pass6.c	Thu Jan  5 16:18:00 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pass6.c,v 1.23 2010/02/16 23:20:30 mlelstv Exp $	 */
+/* $NetBSD: pass6.c,v 1.24 2012/01/05 16:18:00 perseant Exp $	 */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -108,7 +108,7 @@ rfw_update_single(struct uvnode *vp, dad
 			ip->i_ffs1_blocks += frags;
 		else {
 			/* possible fragment truncation or extension */
-			ofrags = ip->i_lfs_fragsize[lbn];
+			ofrags = numfrags(fs, ip->i_lfs_fragsize[lbn]);
 			ip->i_ffs1_blocks += (frags - ofrags);
 		}
 		ip->i_ffs1_db[lbn] = ndaddr;

Reply via email to