Whamcloud - gitweb
LU-1304 osd: ->do_ah_init() to accept new object
[fs/lustre-release.git] / lustre / osd-zfs / osd_internal.h
index 45bac12..cb9b8a5 100644 (file)
@@ -47,6 +47,7 @@
 #define _OSD_INTERNAL_H
 
 #include <dt_object.h>
+#include <lquota.h>
 #include <sys/arc.h>
 
 #include <sys/nvpair.h>
@@ -152,6 +153,8 @@ struct osd_thread_info {
        zap_attribute_t          oti_za;
        dmu_object_info_t        oti_doi;
        struct luz_direntry      oti_zde;
+
+       struct lquota_id_info    oti_qi;
 };
 
 extern struct lu_context_key osd_key;
@@ -167,6 +170,7 @@ struct osd_thandle {
        cfs_list_t               ot_sa_list;
        cfs_semaphore_t          ot_sa_lock;
        dmu_tx_t                *ot_tx;
+       struct lquota_trans      ot_quota_trans;
        __u32                    ot_write_commit:1,
                                 ot_assigned:1;
 };
@@ -222,6 +226,9 @@ struct osd_device {
        uint64_t                 od_iusr_oid;
        uint64_t                 od_igrp_oid;
 
+       /* quota slave instance */
+       struct qsd_instance     *od_quota_slave;
+
        /* used to debug zerocopy logic: the fields track all
         * allocated, loaned and referenced buffers in use.
         * to be removed once the change is tested well. */
@@ -264,6 +271,10 @@ int osd_statfs(const struct lu_env *, struct dt_device *, struct obd_statfs *);
 extern const struct dt_index_operations osd_acct_index_ops;
 uint64_t osd_quota_fid2dmu(const struct lu_fid *fid);
 extern struct lu_device_operations  osd_lu_ops;
+int osd_declare_quota(const struct lu_env *env, struct osd_device *osd,
+                     qid_t uid, qid_t gid, long long space,
+                     struct osd_thandle *oh, bool is_blk, int *flags,
+                     bool force);
 
 /*
  * Helpers.