Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/bouyer-quota2]: src/sbin/fsck_ffs Skip snapshot inodes for both block an...
details: https://anonhg.NetBSD.org/src/rev/8476aa6635ff
branches: bouyer-quota2
changeset: 761170:8476aa6635ff
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Feb 12 21:48:41 2011 +0000
description:
Skip snapshot inodes for both block and inode quotas.
diffstat:
sbin/fsck_ffs/inode.c | 13 ++++++++-----
sbin/fsck_ffs/pass1.c | 9 +++++----
sbin/fsck_ffs/pass4.c | 12 +++++++-----
3 files changed, 20 insertions(+), 14 deletions(-)
diffs (104 lines):
diff -r 356b881eeacc -r 8476aa6635ff sbin/fsck_ffs/inode.c
--- a/sbin/fsck_ffs/inode.c Sat Feb 12 21:48:09 2011 +0000
+++ b/sbin/fsck_ffs/inode.c Sat Feb 12 21:48:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.63.2.2 2011/02/12 19:53:32 bouyer Exp $ */
+/* $NetBSD: inode.c,v 1.63.2.3 2011/02/12 21:48:41 bouyer Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: inode.c,v 1.63.2.2 2011/02/12 19:53:32 bouyer Exp $");
+__RCSID("$NetBSD: inode.c,v 1.63.2.3 2011/02/12 21:48:41 bouyer Exp $");
#endif
#endif /* not lint */
@@ -580,8 +580,9 @@
* ckinode will call id_func (actually always pass4check)
* which will update the block count
*/
- update_uquot(idesc->id_number, idesc->id_uid, idesc->id_gid,
- 0, -1);
+ if (idesc->id_type != SNAP)
+ update_uquot(idesc->id_number,
+ idesc->id_uid, idesc->id_gid, 0, -1);
(void)ckinode(dp, idesc);
clearinode(dp);
inoinfo(idesc->id_number)->ino_state = USTATE;
@@ -844,7 +845,9 @@
clearinode(dp);
inodirty();
inoinfo(ino)->ino_state = USTATE;
- update_uquot(idesc.id_number, idesc.id_uid, idesc.id_gid, 0, -1);
+ if (idesc.id_type != SNAP)
+ update_uquot(idesc.id_number,
+ idesc.id_uid, idesc.id_gid, 0, -1);
n_files--;
if (cgp) {
clrbit(cg_inosused(cgp, 0), ino % sblock->fs_ipg);
diff -r 356b881eeacc -r 8476aa6635ff sbin/fsck_ffs/pass1.c
--- a/sbin/fsck_ffs/pass1.c Sat Feb 12 21:48:09 2011 +0000
+++ b/sbin/fsck_ffs/pass1.c Sat Feb 12 21:48:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.46.14.2 2011/02/12 19:53:32 bouyer Exp $ */
+/* $NetBSD: pass1.c,v 1.46.14.3 2011/02/12 21:48:41 bouyer Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: pass1.c,v 1.46.14.2 2011/02/12 19:53:32 bouyer Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.46.14.3 2011/02/12 21:48:41 bouyer Exp $");
#endif
#endif /* not lint */
@@ -466,8 +466,9 @@
dp->dp1.di_blocks = iswap32((int32_t)idesc->id_entryno);
inodirty();
}
- update_uquot(inumber, idesc->id_uid, idesc->id_gid,
- (idesc->id_type == SNAP) ? 0 : idesc->id_entryno, 1);
+ if (idesc->id_type != SNAP)
+ update_uquot(inumber, idesc->id_uid, idesc->id_gid,
+ idesc->id_entryno, 1);
return;
unknown:
pfatal("UNKNOWN FILE TYPE I=%llu", (unsigned long long)inumber);
diff -r 356b881eeacc -r 8476aa6635ff sbin/fsck_ffs/pass4.c
--- a/sbin/fsck_ffs/pass4.c Sat Feb 12 21:48:09 2011 +0000
+++ b/sbin/fsck_ffs/pass4.c Sat Feb 12 21:48:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass4.c,v 1.25.14.2 2011/02/12 19:53:32 bouyer Exp $ */
+/* $NetBSD: pass4.c,v 1.25.14.3 2011/02/12 21:48:41 bouyer Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass4.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: pass4.c,v 1.25.14.2 2011/02/12 19:53:32 bouyer Exp $");
+__RCSID("$NetBSD: pass4.c,v 1.25.14.3 2011/02/12 21:48:41 bouyer Exp $");
#endif
#endif /* not lint */
@@ -192,9 +192,11 @@
dtogd(sblock, blkno));
n_blks--;
- update_uquot(idesc->id_number, idesc->id_uid,
- idesc->id_gid, (idesc->id_type == SNAP) ?
- 0 : -btodb(sblock->fs_fsize), 0);
+ if (idesc->id_type != SNAP) {
+ update_uquot(idesc->id_number,
+ idesc->id_uid, idesc->id_gid,
+ -btodb(sblock->fs_fsize), 0);
+ }
if (idesc->id_numfrags != sblock->fs_frag &&
cgp) {
cgp->cg_cs.cs_nffree ++;
Home |
Main Index |
Thread Index |
Old Index