Whamcloud - gitweb
b=21919 Do not resend quota_ctl requests
[fs/lustre-release.git] / lustre / quota / quota_internal.h
index 692e562..a96390d 100644 (file)
 #define LQS_DEBUG(lqs, fmt, arg...)                                           \
         CDEBUG(D_QUOTA, "lqs(%p) id(%u) flag(%lu) type(%c) bunit(%lu) "       \
                "btune(%lu) iunit(%lu) itune(%lu) lqs_bwrite_pending(%lu) "    \
-               "lqs_iwrite_pending(%lu) ino_rec("LPD64") blk_rec("LPD64" ) "  \
+               "lqs_iwrite_pending(%lu) ino_rec(%lld) blk_rec(%lld) "         \
                "refcount(%d): "                                               \
                fmt, lqs, lqs->lqs_id, lqs->lqs_flags,                         \
                LQS_IS_GRP(lqs) ? 'g' : 'u',                                   \
                lqs->lqs_bunit_sz, lqs->lqs_btune_sz, lqs->lqs_iunit_sz,       \
                lqs->lqs_itune_sz, lqs->lqs_bwrite_pending,                    \
                lqs->lqs_iwrite_pending, lqs->lqs_ino_rec,                     \
-               lqs->lqs_blk_rec, atomic_read(&lqs->lqs_refcount), ## arg);
+               lqs->lqs_blk_rec, cfs_atomic_read(&lqs->lqs_refcount), ## arg);
 
 
 /* quota_context.c */
@@ -114,6 +114,8 @@ int compute_remquota(struct obd_device *obd,
                      int isblk);
 int check_qm(struct lustre_quota_ctxt *qctxt);
 void dqacq_interrupt(struct lustre_quota_ctxt *qctxt);
+int quota_is_on(struct lustre_quota_ctxt *qctxt, struct obd_quotactl *oqctl);
+int quota_is_off(struct lustre_quota_ctxt *qctxt, struct obd_quotactl *oqctl);
 void* quota_barrier(struct lustre_quota_ctxt *qctxt,
                     struct obd_quotactl *oqctl, int isblk);
 void quota_unbarrier(void *handle);
@@ -133,6 +135,7 @@ int mds_quota_finvalidate(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_admin_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl);
+int do_mds_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_admin_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_set_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl);
 int mds_get_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl);
@@ -143,6 +146,7 @@ int mds_get_obd_quota(struct obd_device *obd, struct obd_quotactl *oqctl);
 int dquot_create_oqaq(struct lustre_quota_ctxt *qctxt, struct lustre_dquot
                       *dquot, __u32 ost_num, __u32 mdt_num, int type,
                       struct quota_adjust_qunit *oqaq);
+int generic_quota_on(struct obd_device *, struct obd_quotactl *, int);
 #endif
 
 /* quota_ctl.c */
@@ -208,4 +212,5 @@ int lmv_quota_check(struct obd_device *unused, struct obd_export *exp,
 int lov_quota_check(struct obd_device *unused, struct obd_export *exp,
                     struct obd_quotactl *oqctl);
 int client_quota_poll_check(struct obd_export *exp, struct if_quotacheck *qchk);
+
 #endif