Source-Changes-HG archive

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

[src/bouyer-quota2]: src/sys/ufs/ffs Do not adjust quota when a snapshot inod...



details:   https://anonhg.NetBSD.org/src/rev/11add7eac98f
branches:  bouyer-quota2
changeset: 761180:11add7eac98f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Feb 17 10:37:55 2011 +0000

description:
Do not adjust quota when a snapshot inode is cleared in a snapshot view.

diffstat:

 sys/ufs/ffs/ffs_snapshot.c |  14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diffs (49 lines):

diff -r ed1031ab2156 -r 11add7eac98f sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c        Tue Feb 15 17:52:51 2011 +0000
+++ b/sys/ufs/ffs/ffs_snapshot.c        Thu Feb 17 10:37:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $    */
+/*     $NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $    */
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -214,7 +214,7 @@
        error = snapshot_setup(mp, vp);
        if (error)
                goto out;
-       /* quota inodes are not accounted in quotas */
+       /* shapshot inodes are not accounted in quotas */
 #if defined(QUOTA) || defined(QUOTA2)
        chkdq(ip, -DIP(ip, blocks), l->l_cred, 0);
        chkiq(ip, -1, l->l_cred, 0);
@@ -1036,10 +1036,6 @@
                    ufs_rw32(ufs_rw32(dip1->di_flags, ns) & ~SF_SNAPSHOT, ns);
                memset(&dip1->di_db[0], 0, (NDADDR + NIADDR) * sizeof(int32_t));
                /* quota inodes are not accounted in quotas */
-#if defined(QUOTA) || defined(QUOTA2)
-               if (dip1->di_mode != 0)
-                       chkiq(cancelip, 1, l->l_cred, FORCE);
-#endif
        } else {
                dip2 = (struct ufs2_dinode *)bp->b_data +
                    ino_to_fsbo(fs, cancelip->i_number);
@@ -1050,10 +1046,6 @@
                dip2->di_flags =
                    ufs_rw32(ufs_rw32(dip2->di_flags, ns) & ~SF_SNAPSHOT, ns);
                memset(&dip2->di_db[0], 0, (NDADDR + NIADDR) * sizeof(int64_t));
-#if defined(QUOTA) || defined(QUOTA2)
-               if (dip2->di_mode != 0)
-                       chkiq(cancelip, 1, l->l_cred, FORCE);
-#endif
        }
        bdwrite(bp);
        /*



Home | Main Index | Thread Index | Old Index