X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fquota%2Fquota_internal.h;h=b5e4b9d180a234d4dff1b33ed54e9082af6e0c78;hb=e3a7c58aebafce40323db54bf6056029e5af4a70;hp=e7a633d3ea81af99c54136567625be511d9c1dd1;hpb=222305972a5d38b0fe111966da775e98a0ec8269;p=fs%2Flustre-release.git diff --git a/lustre/quota/quota_internal.h b/lustre/quota/quota_internal.h index e7a633d..b5e4b9d 100644 --- a/lustre/quota/quota_internal.h +++ b/lustre/quota/quota_internal.h @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +24,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -54,7 +52,7 @@ #define DQUOT_DEBUG(dquot, fmt, arg...) \ CDEBUG(D_QUOTA, "refcnt(%u) id(%u) type(%u) off(%llu) flags(%lu) " \ "bhardlimit("LPU64") curspace("LPU64") ihardlimit("LPU64") " \ - "curinodes("LPU64"): " fmt, dquot->dq_refcnt, \ + "curinodes("LPU64"): " fmt, cfs_atomic_read(&dquot->dq_refcnt),\ dquot->dq_id, dquot->dq_type, dquot->dq_off, dquot->dq_flags, \ dquot->dq_dqb.dqb_bhardlimit, dquot->dq_dqb.dqb_curspace, \ dquot->dq_dqb.dqb_ihardlimit, dquot->dq_dqb.dqb_curinodes, \ @@ -87,14 +85,14 @@ #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 +112,11 @@ 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); /* quota_master.c */ int lustre_dquot_init(void); void lustre_dquot_exit(void); @@ -130,6 +133,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); @@ -140,6 +144,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 */ @@ -155,6 +160,7 @@ int target_quota_check(struct obd_device *obd, struct obd_export *exp, int quota_adjust_slave_lqs(struct quota_adjust_qunit *oqaq, struct lustre_quota_ctxt *qctxt); #ifdef __KERNEL__ +int quota_is_set(struct obd_device *obd, const unsigned int id[], int flag); struct lustre_qunit_size *quota_search_lqs(unsigned long long lqs_key, struct lustre_quota_ctxt *qctxt, int create); @@ -168,9 +174,11 @@ extern int quote_copy_qdata(struct ptlrpc_request *req, struct qunit_data *qdata int is_req, int is_exp); int filter_quota_adjust_qunit(struct obd_export *exp, struct quota_adjust_qunit *oqaq, - struct lustre_quota_ctxt *qctxt); + struct lustre_quota_ctxt *qctxt, + struct ptlrpc_request_set *rqset); int lquota_proc_setup(struct obd_device *obd, int is_master); int lquota_proc_cleanup(struct lustre_quota_ctxt *qctxt); +void build_lqs(struct obd_device *obd); extern cfs_proc_dir_entry_t *lquota_type_proc_dir; #endif @@ -186,10 +194,13 @@ extern cfs_proc_dir_entry_t *lquota_type_proc_dir; #endif int client_quota_adjust_qunit(struct obd_export *exp, struct quota_adjust_qunit *oqaq, - struct lustre_quota_ctxt *qctxt); + struct lustre_quota_ctxt *qctxt, + struct ptlrpc_request_set *set); + int lov_quota_adjust_qunit(struct obd_export *exp, struct quota_adjust_qunit *oqaq, - struct lustre_quota_ctxt *qctxt); + struct lustre_quota_ctxt *qctxt, + struct ptlrpc_request_set *rqset); int client_quota_ctl(struct obd_device *unused, struct obd_export *exp, struct obd_quotactl *oqctl); int lmv_quota_ctl(struct obd_device *unused, struct obd_export *exp, @@ -203,4 +214,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