diff options
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r-- | fs/xfs/quota/xfs_dquot_item.c | 4 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 27 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm_bhv.c | 4 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm_syscalls.c | 2 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_trans_dquot.c | 2 |
5 files changed, 20 insertions, 19 deletions
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index 2ec6b441849c..546f48af882a 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c | |||
@@ -79,9 +79,11 @@ xfs_qm_dquot_logitem_format( | |||
79 | 79 | ||
80 | logvec->i_addr = (xfs_caddr_t)&logitem->qli_format; | 80 | logvec->i_addr = (xfs_caddr_t)&logitem->qli_format; |
81 | logvec->i_len = sizeof(xfs_dq_logformat_t); | 81 | logvec->i_len = sizeof(xfs_dq_logformat_t); |
82 | XLOG_VEC_SET_TYPE(logvec, XLOG_REG_TYPE_QFORMAT); | ||
82 | logvec++; | 83 | logvec++; |
83 | logvec->i_addr = (xfs_caddr_t)&logitem->qli_dquot->q_core; | 84 | logvec->i_addr = (xfs_caddr_t)&logitem->qli_dquot->q_core; |
84 | logvec->i_len = sizeof(xfs_disk_dquot_t); | 85 | logvec->i_len = sizeof(xfs_disk_dquot_t); |
86 | XLOG_VEC_SET_TYPE(logvec, XLOG_REG_TYPE_DQUOT); | ||
85 | 87 | ||
86 | ASSERT(2 == logitem->qli_item.li_desc->lid_size); | 88 | ASSERT(2 == logitem->qli_item.li_desc->lid_size); |
87 | logitem->qli_format.qlf_size = 2; | 89 | logitem->qli_format.qlf_size = 2; |
@@ -219,7 +221,7 @@ xfs_qm_dqunpin_wait( | |||
219 | * as possible. | 221 | * as possible. |
220 | * | 222 | * |
221 | * We must not be holding the AIL_LOCK at this point. Calling incore() to | 223 | * We must not be holding the AIL_LOCK at this point. Calling incore() to |
222 | * search the buffercache can be a time consuming thing, and AIL_LOCK is a | 224 | * search the buffer cache can be a time consuming thing, and AIL_LOCK is a |
223 | * spinlock. | 225 | * spinlock. |
224 | */ | 226 | */ |
225 | STATIC void | 227 | STATIC void |
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 7c0e39dc6189..73c1e5e80c07 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -289,7 +289,7 @@ xfs_qm_rele_quotafs_ref( | |||
289 | 289 | ||
290 | /* | 290 | /* |
291 | * This is called at mount time from xfs_mountfs to initialize the quotainfo | 291 | * This is called at mount time from xfs_mountfs to initialize the quotainfo |
292 | * structure and start the global quotamanager (xfs_Gqm) if it hasn't done | 292 | * structure and start the global quota manager (xfs_Gqm) if it hasn't done |
293 | * so already. Note that the superblock has not been read in yet. | 293 | * so already. Note that the superblock has not been read in yet. |
294 | */ | 294 | */ |
295 | void | 295 | void |
@@ -807,7 +807,7 @@ xfs_qm_dqattach_one( | |||
807 | * Given a udquot and gdquot, attach a ptr to the group dquot in the | 807 | * Given a udquot and gdquot, attach a ptr to the group dquot in the |
808 | * udquot as a hint for future lookups. The idea sounds simple, but the | 808 | * udquot as a hint for future lookups. The idea sounds simple, but the |
809 | * execution isn't, because the udquot might have a group dquot attached | 809 | * execution isn't, because the udquot might have a group dquot attached |
810 | * already and getting rid of that gets us into lock ordering contraints. | 810 | * already and getting rid of that gets us into lock ordering constraints. |
811 | * The process is complicated more by the fact that the dquots may or may not | 811 | * The process is complicated more by the fact that the dquots may or may not |
812 | * be locked on entry. | 812 | * be locked on entry. |
813 | */ | 813 | */ |
@@ -1094,10 +1094,10 @@ xfs_qm_sync( | |||
1094 | } | 1094 | } |
1095 | /* | 1095 | /* |
1096 | * If we can't grab the flush lock then if the caller | 1096 | * If we can't grab the flush lock then if the caller |
1097 | * really wanted us to give this our best shot, | 1097 | * really wanted us to give this our best shot, so |
1098 | * see if we can give a push to the buffer before we wait | 1098 | * see if we can give a push to the buffer before we wait |
1099 | * on the flush lock. At this point, we know that | 1099 | * on the flush lock. At this point, we know that |
1100 | * eventhough the dquot is being flushed, | 1100 | * even though the dquot is being flushed, |
1101 | * it has (new) dirty data. | 1101 | * it has (new) dirty data. |
1102 | */ | 1102 | */ |
1103 | xfs_qm_dqflock_pushbuf_wait(dqp); | 1103 | xfs_qm_dqflock_pushbuf_wait(dqp); |
@@ -1491,7 +1491,7 @@ xfs_qm_reset_dqcounts( | |||
1491 | /* | 1491 | /* |
1492 | * Do a sanity check, and if needed, repair the dqblk. Don't | 1492 | * Do a sanity check, and if needed, repair the dqblk. Don't |
1493 | * output any warnings because it's perfectly possible to | 1493 | * output any warnings because it's perfectly possible to |
1494 | * find unitialized dquot blks. See comment in xfs_qm_dqcheck. | 1494 | * find uninitialised dquot blks. See comment in xfs_qm_dqcheck. |
1495 | */ | 1495 | */ |
1496 | (void) xfs_qm_dqcheck(ddq, id+j, type, XFS_QMOPT_DQREPAIR, | 1496 | (void) xfs_qm_dqcheck(ddq, id+j, type, XFS_QMOPT_DQREPAIR, |
1497 | "xfs_quotacheck"); | 1497 | "xfs_quotacheck"); |
@@ -1580,7 +1580,7 @@ xfs_qm_dqiterate( | |||
1580 | 1580 | ||
1581 | error = 0; | 1581 | error = 0; |
1582 | /* | 1582 | /* |
1583 | * This looks racey, but we can't keep an inode lock across a | 1583 | * This looks racy, but we can't keep an inode lock across a |
1584 | * trans_reserve. But, this gets called during quotacheck, and that | 1584 | * trans_reserve. But, this gets called during quotacheck, and that |
1585 | * happens only at mount time which is single threaded. | 1585 | * happens only at mount time which is single threaded. |
1586 | */ | 1586 | */ |
@@ -1704,9 +1704,9 @@ xfs_qm_get_rtblks( | |||
1704 | xfs_qcnt_t *O_rtblks) | 1704 | xfs_qcnt_t *O_rtblks) |
1705 | { | 1705 | { |
1706 | xfs_filblks_t rtblks; /* total rt blks */ | 1706 | xfs_filblks_t rtblks; /* total rt blks */ |
1707 | xfs_extnum_t idx; /* extent record index */ | ||
1707 | xfs_ifork_t *ifp; /* inode fork pointer */ | 1708 | xfs_ifork_t *ifp; /* inode fork pointer */ |
1708 | xfs_extnum_t nextents; /* number of extent entries */ | 1709 | xfs_extnum_t nextents; /* number of extent entries */ |
1709 | xfs_bmbt_rec_t *base; /* base of extent array */ | ||
1710 | xfs_bmbt_rec_t *ep; /* pointer to an extent entry */ | 1710 | xfs_bmbt_rec_t *ep; /* pointer to an extent entry */ |
1711 | int error; | 1711 | int error; |
1712 | 1712 | ||
@@ -1717,10 +1717,11 @@ xfs_qm_get_rtblks( | |||
1717 | return error; | 1717 | return error; |
1718 | } | 1718 | } |
1719 | rtblks = 0; | 1719 | rtblks = 0; |
1720 | nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t); | 1720 | nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); |
1721 | base = &ifp->if_u1.if_extents[0]; | 1721 | for (idx = 0; idx < nextents; idx++) { |
1722 | for (ep = base; ep < &base[nextents]; ep++) | 1722 | ep = xfs_iext_get_ext(ifp, idx); |
1723 | rtblks += xfs_bmbt_get_blockcount(ep); | 1723 | rtblks += xfs_bmbt_get_blockcount(ep); |
1724 | } | ||
1724 | *O_rtblks = (xfs_qcnt_t)rtblks; | 1725 | *O_rtblks = (xfs_qcnt_t)rtblks; |
1725 | return 0; | 1726 | return 0; |
1726 | } | 1727 | } |
@@ -1823,7 +1824,7 @@ xfs_qm_dqusage_adjust( | |||
1823 | * we have to start from the beginning anyway. | 1824 | * we have to start from the beginning anyway. |
1824 | * Once we're done, we'll log all the dquot bufs. | 1825 | * Once we're done, we'll log all the dquot bufs. |
1825 | * | 1826 | * |
1826 | * The *QUOTA_ON checks below may look pretty racey, but quotachecks | 1827 | * The *QUOTA_ON checks below may look pretty racy, but quotachecks |
1827 | * and quotaoffs don't race. (Quotachecks happen at mount time only). | 1828 | * and quotaoffs don't race. (Quotachecks happen at mount time only). |
1828 | */ | 1829 | */ |
1829 | if (XFS_IS_UQUOTA_ON(mp)) { | 1830 | if (XFS_IS_UQUOTA_ON(mp)) { |
@@ -2788,9 +2789,7 @@ xfs_qm_freelist_destroy(xfs_frlist_t *ql) | |||
2788 | xfs_qm_dqdestroy(dqp); | 2789 | xfs_qm_dqdestroy(dqp); |
2789 | dqp = nextdqp; | 2790 | dqp = nextdqp; |
2790 | } | 2791 | } |
2791 | /* | 2792 | mutex_unlock(&ql->qh_lock); |
2792 | * Don't bother about unlocking. | ||
2793 | */ | ||
2794 | mutex_destroy(&ql->qh_lock); | 2793 | mutex_destroy(&ql->qh_lock); |
2795 | 2794 | ||
2796 | ASSERT(ql->qh_nelems == 0); | 2795 | ASSERT(ql->qh_nelems == 0); |
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index 90402a1c3983..6838b36d95a9 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c | |||
@@ -374,7 +374,7 @@ xfs_qm_exit(void) | |||
374 | vfs_bhv_clr_custom(&xfs_qmops); | 374 | vfs_bhv_clr_custom(&xfs_qmops); |
375 | xfs_qm_cleanup_procfs(); | 375 | xfs_qm_cleanup_procfs(); |
376 | if (qm_dqzone) | 376 | if (qm_dqzone) |
377 | kmem_cache_destroy(qm_dqzone); | 377 | kmem_zone_destroy(qm_dqzone); |
378 | if (qm_dqtrxzone) | 378 | if (qm_dqtrxzone) |
379 | kmem_cache_destroy(qm_dqtrxzone); | 379 | kmem_zone_destroy(qm_dqtrxzone); |
380 | } | 380 | } |
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index 676884394aae..c55db463bbf2 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c | |||
@@ -912,7 +912,7 @@ xfs_qm_export_dquot( | |||
912 | 912 | ||
913 | /* | 913 | /* |
914 | * Internally, we don't reset all the timers when quota enforcement | 914 | * Internally, we don't reset all the timers when quota enforcement |
915 | * gets turned off. No need to confuse the userlevel code, | 915 | * gets turned off. No need to confuse the user level code, |
916 | * so return zeroes in that case. | 916 | * so return zeroes in that case. |
917 | */ | 917 | */ |
918 | if (! XFS_IS_QUOTA_ENFORCED(mp)) { | 918 | if (! XFS_IS_QUOTA_ENFORCED(mp)) { |
diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c index 3290975d31f7..d8e131ec0aa8 100644 --- a/fs/xfs/quota/xfs_trans_dquot.c +++ b/fs/xfs/quota/xfs_trans_dquot.c | |||
@@ -804,7 +804,7 @@ xfs_trans_reserve_quota_bydquots( | |||
804 | } | 804 | } |
805 | 805 | ||
806 | /* | 806 | /* |
807 | * Didnt change anything critical, so, no need to log | 807 | * Didn't change anything critical, so, no need to log |
808 | */ | 808 | */ |
809 | return (0); | 809 | return (0); |
810 | } | 810 | } |