Whamcloud - gitweb
LU-11364 osd: remove unused 'ignore quota' parameters 38/33138/3
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 11 Sep 2018 16:17:47 +0000 (11:17 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 10 Oct 2018 01:50:11 +0000 (01:50 +0000)
Remove the unused 'ignore quota' parameters from dt_write(),
dt_insert(), and their implementations.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib6e61c5dff8c2b1027ed3a7e0808fe208fd17d84
Reviewed-on: https://review.whamcloud.com/33138
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
25 files changed:
lustre/fld/fld_index.c
lustre/include/dt_object.h
lustre/include/lustre_sec.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/lod/lod_internal.h
lustre/lod/lod_object.c
lustre/lod/lod_sub_object.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_orphans.c
lustre/obdclass/dt_object.c
lustre/obdclass/llog_osd.c
lustre/obdclass/local_storage.c
lustre/obdclass/scrub.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_io.c
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/ptlrpc/nodemap_storage.c
lustre/quota/lquota_disk.c
lustre/target/out_lib.c

index 7399206..7c36a7e 100644 (file)
@@ -193,7 +193,7 @@ int fld_index_create(const struct lu_env *env, struct lu_server_fld *fld,
 
        range_cpu_to_be(tmp, tmp);
        rc = dt_insert(env, fld->lsf_obj, (struct dt_rec *)tmp,
-                      (struct dt_key *)&tmp->lsr_start, th, 1);
+                      (struct dt_key *)&tmp->lsr_start, th);
        if (rc != 0) {
                CERROR("%s: insert range "DRANGE" failed: rc = %d\n",
                       fld->lsf_name, PRANGE(new_range), rc);
index 88efa86..0c82235 100644 (file)
@@ -1139,7 +1139,6 @@ struct dt_body_operations {
         * \param[in] pos       position in the object to start
         * \param[out] pos      \a pos + bytes written
         * \param[in] th        transaction handle
-        * \param[in] ignore    unused (was used to request quota ignorance)
         *
         * \retval positive     bytes written on success
         * \retval negative     negated errno on error
@@ -1148,8 +1147,7 @@ struct dt_body_operations {
                             struct dt_object *dt,
                             const struct lu_buf *buf,
                             loff_t *pos,
-                            struct thandle *th,
-                            int ignore);
+                            struct thandle *th);
 
        /**
         * Return buffers for data.
@@ -1482,7 +1480,6 @@ struct dt_index_operations {
         * \param[in] rec       buffer storing value
         * \param[in] key       key
         * \param[in] th        transaction handle
-        * \param[in] ignore    unused (was used to request quota ignorance)
         *
         * \retval 0            on success
         * \retval negative     negated errno on error
@@ -1491,8 +1488,7 @@ struct dt_index_operations {
                          struct dt_object *dt,
                          const struct dt_rec *rec,
                          const struct dt_key *key,
-                         struct thandle *th,
-                         int ignore);
+                         struct thandle *th);
 
        /**
         * Declare intention to delete a key/value from an index.
@@ -2465,12 +2461,12 @@ static inline int dt_declare_write(const struct lu_env *env,
 
 static inline ssize_t dt_write(const struct lu_env *env, struct dt_object *dt,
                               const struct lu_buf *buf, loff_t *pos,
-                              struct thandle *th, int rq)
+                              struct thandle *th)
 {
        LASSERT(dt);
        LASSERT(dt->do_body_ops);
        LASSERT(dt->do_body_ops->dbo_write);
-       return dt->do_body_ops->dbo_write(env, dt, buf, pos, th, rq);
+       return dt->do_body_ops->dbo_write(env, dt, buf, pos, th);
 }
 
 static inline int dt_declare_punch(const struct lu_env *env,
@@ -2573,11 +2569,10 @@ static inline int dt_declare_insert(const struct lu_env *env,
 }
 
 static inline int dt_insert(const struct lu_env *env,
-                                    struct dt_object *dt,
-                                    const struct dt_rec *rec,
-                                    const struct dt_key *key,
-                                    struct thandle *th,
-                                    int noquota)
+                           struct dt_object *dt,
+                           const struct dt_rec *rec,
+                           const struct dt_key *key,
+                           struct thandle *th)
 {
         LASSERT(dt);
         LASSERT(dt->do_index_ops);
@@ -2586,7 +2581,7 @@ static inline int dt_insert(const struct lu_env *env,
        if (CFS_FAULT_CHECK(OBD_FAIL_DT_INSERT))
                return cfs_fail_err;
 
-       return dt->do_index_ops->dio_insert(env, dt, rec, key, th, noquota);
+       return dt->do_index_ops->dio_insert(env, dt, rec, key, th);
 }
 
 static inline int dt_declare_xattr_del(const struct lu_env *env,
index 8554216..96deb11 100644 (file)
@@ -1193,10 +1193,6 @@ int sptlrpc_current_user_desc_size(void);
 int sptlrpc_pack_user_desc(struct lustre_msg *msg, int offset);
 int sptlrpc_unpack_user_desc(struct lustre_msg *req, int offset, int swabbed);
 
-
-#define CFS_CAP_CHOWN_MASK (1 << CFS_CAP_CHOWN)
-#define CFS_CAP_SYS_RESOURCE_MASK (1 << CFS_CAP_SYS_RESOURCE)
-
 /** @} sptlrpc */
 
 #endif /* _LUSTRE_SEC_H_ */
index e866566..4008174 100644 (file)
@@ -1560,7 +1560,7 @@ static int lfsck_layout_ins_dangling_rec(const struct lu_env *env,
                GOTO(unlock, rc);
 
        rc = dt_insert(env, obj, (const struct dt_rec *)rec,
-                      (const struct dt_key *)key, th, 1);
+                      (const struct dt_key *)key, th);
 
        GOTO(unlock, rc);
 
@@ -2439,7 +2439,7 @@ again:
                GOTO(stop, rc);
 
        rc = dt_insert(env, lpf, (const struct dt_rec *)dtrec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc != 0)
                GOTO(stop, rc);
 
@@ -7028,8 +7028,7 @@ static int lfsck_orphan_index_insert(const struct lu_env *env,
                                     struct dt_object *dt,
                                     const struct dt_rec *rec,
                                     const struct dt_key *key,
-                                    struct thandle *handle,
-                                    int ignore_quota)
+                                    struct thandle *handle)
 {
        return -EOPNOTSUPP;
 }
index 82c3168..6d146a0 100644 (file)
@@ -727,14 +727,14 @@ static int lfsck_create_lpf_local(const struct lu_env *env,
        /* 3b. insert dot into child dir */
        rec->rec_fid = cfid;
        rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dot, th, 1);
+                      (const struct dt_key *)dot, th);
        if (rc != 0)
                GOTO(unlock, rc);
 
        /* 4b. insert dotdot into child dir */
        rec->rec_fid = &LU_LPF_FID;
        rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dotdot, th, 1);
+                      (const struct dt_key *)dotdot, th);
        if (rc != 0)
                GOTO(unlock, rc);
 
@@ -748,7 +748,7 @@ static int lfsck_create_lpf_local(const struct lu_env *env,
        /* 6b. insert name into parent dir */
        rec->rec_fid = cfid;
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc != 0)
                GOTO(stop, rc);
 
@@ -893,14 +893,14 @@ static int lfsck_create_lpf_remote(const struct lu_env *env,
        rec->rec_type = S_IFDIR;
        rec->rec_fid = cfid;
        rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dot, th, 1);
+                      (const struct dt_key *)dot, th);
        if (rc != 0)
                GOTO(unlock, rc);
 
        /* 4b. insert dotdot into child dir */
        rec->rec_fid = &LU_LPF_FID;
        rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dotdot, th, 1);
+                      (const struct dt_key *)dotdot, th);
        if (rc != 0)
                GOTO(unlock, rc);
 
@@ -948,7 +948,7 @@ static int lfsck_create_lpf_remote(const struct lu_env *env,
 
        /* 5b. insert name into parent dir */
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc != 0)
                GOTO(stop, rc);
 
index 0459052..6893b0c 100644 (file)
@@ -562,7 +562,7 @@ int lfsck_namespace_trace_update(const struct lu_env *env,
 
        if (new != 0) {
                rc = dt_insert(env, obj, (const struct dt_rec *)&new,
-                              (const struct dt_key *)key, th, 1);
+                              (const struct dt_key *)key, th);
                if (rc != 0)
                        GOTO(log, rc);
        }
@@ -1058,7 +1058,7 @@ again:
                        rec->rec_type = S_IFDIR;
                        rec->rec_fid = pfid;
                        rc = dt_insert(env, orphan, (const struct dt_rec *)rec,
-                                      (const struct dt_key *)dotdot, th, 1);
+                                      (const struct dt_key *)dotdot, th);
                        if (rc != 0)
                                GOTO(unlock, rc);
                }
@@ -1077,7 +1077,7 @@ again:
                rec->rec_type = lfsck_object_type(orphan) & S_IFMT;
                rec->rec_fid = cfid;
                rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                              (const struct dt_key *)cname->ln_name, th, 1);
+                              (const struct dt_key *)cname->ln_name, th);
                if (rc == 0 && S_ISDIR(rec->rec_type)) {
                        dt_write_lock(env, parent, 0);
                        rc = dt_ref_add(env, parent, th);
@@ -1209,7 +1209,7 @@ static int lfsck_namespace_insert_normal(const struct lu_env *env,
                GOTO(stop, rc);
 
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc != 0)
                GOTO(stop, rc);
 
@@ -1459,13 +1459,13 @@ again:
 
        rec->rec_fid = cfid;
        rc = dt_insert(env, orphan, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dot, th, 1);
+                      (const struct dt_key *)dot, th);
        if (rc != 0)
                GOTO(unlock2, rc);
 
        rec->rec_fid = lfsck_dto2fid(parent);
        rc = dt_insert(env, orphan, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dotdot, th, 1);
+                      (const struct dt_key *)dotdot, th);
        if (rc != 0)
                GOTO(unlock2, rc);
 
@@ -1483,7 +1483,7 @@ again:
 
        rec->rec_fid = cfid;
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc == 0) {
                dt_write_lock(env, parent, 0);
                rc = dt_ref_add(env, parent, th);
@@ -1923,7 +1923,7 @@ replace:
                GOTO(stop, rc);
 
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
 
        GOTO(stop, rc = (rc == 0 ? 1 : rc));
 
@@ -2133,7 +2133,7 @@ int lfsck_namespace_repair_dirent(const struct lu_env *env,
        if (update) {
                rc = dt_insert(env, parent,
                               (const struct dt_rec *)rec,
-                              (const struct dt_key *)name2, th, 1);
+                              (const struct dt_key *)name2, th);
                if (rc != 0)
                        GOTO(unlock2, rc);
        }
@@ -2261,7 +2261,7 @@ static int lfsck_namespace_repair_unmatched_pairs(const struct lu_env *env,
        dt_delete(env, obj, (const struct dt_key *)dotdot, th);
 
        rc = dt_insert(env, obj, (const struct dt_rec *)rec,
-                      (const struct dt_key *)dotdot, th, 1);
+                      (const struct dt_key *)dotdot, th);
        if (rc != 0)
                GOTO(unlock, rc);
 
@@ -5264,14 +5264,14 @@ int lfsck_namespace_repair_dangling(const struct lu_env *env,
                rec->rec_type = S_IFDIR;
                rec->rec_fid = cfid;
                rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                              (const struct dt_key *)dot, th, 1);
+                              (const struct dt_key *)dot, th);
                if (rc != 0)
                        GOTO(unlock, rc);
 
                /* 4b. insert dotdot into child dir */
                rec->rec_fid = pfid;
                rc = dt_insert(env, child, (const struct dt_rec *)rec,
-                              (const struct dt_key *)dotdot, th, 1);
+                              (const struct dt_key *)dotdot, th);
                if (rc != 0)
                        GOTO(unlock, rc);
 
@@ -5956,7 +5956,7 @@ static int lfsck_namespace_scan_local_lpf_one(const struct lu_env *env,
 
        /* b5. insert child's FID into the LFSCK trace file. */
        rc = dt_insert(env, obj, (const struct dt_rec *)&flags,
-                      (const struct dt_key *)key, th, 1);
+                      (const struct dt_key *)key, th);
 
        GOTO(stop, rc = (rc == 0 ? 1 : rc));
 
@@ -6779,7 +6779,7 @@ int lfsck_update_name_entry(const struct lu_env *env,
                GOTO(stop, rc);
 
        rc = dt_insert(env, dir, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (rc == 0 && S_ISDIR(type) && !exists) {
                dt_write_lock(env, dir, 0);
                rc = dt_ref_add(env, dir, th);
index 9d73ffa..005a12a 100644 (file)
@@ -792,7 +792,7 @@ int lod_sub_declare_insert(const struct lu_env *env, struct dt_object *dt,
                           struct thandle *th);
 int lod_sub_insert(const struct lu_env *env, struct dt_object *dt,
                   const struct dt_rec *rec, const struct dt_key *key,
-                  struct thandle *th, int ign);
+                  struct thandle *th);
 int lod_sub_declare_delete(const struct lu_env *env, struct dt_object *dt,
                           const struct dt_key *key, struct thandle *th);
 int lod_sub_delete(const struct lu_env *env, struct dt_object *dt,
@@ -816,7 +816,7 @@ int lod_sub_declare_write(const struct lu_env *env, struct dt_object *dt,
                          struct thandle *th);
 ssize_t lod_sub_write(const struct lu_env *env, struct dt_object *dt,
                      const struct lu_buf *buf, loff_t *pos,
-                     struct thandle *th, int rq);
+                     struct thandle *th);
 int lod_sub_declare_punch(const struct lu_env *env, struct dt_object *dt,
                          __u64 start, __u64 end, struct thandle *th);
 int lod_sub_punch(const struct lu_env *env, struct dt_object *dt,
index 7bab1b0..61ab51d 100644 (file)
@@ -98,9 +98,9 @@ static int lod_declare_insert(const struct lu_env *env, struct dt_object *dt,
  */
 static int lod_insert(const struct lu_env *env, struct dt_object *dt,
                      const struct dt_rec *rec, const struct dt_key *key,
-                     struct thandle *th, int ign)
+                     struct thandle *th)
 {
-       return lod_sub_insert(env, dt_object_child(dt), rec, key, th, ign);
+       return lod_sub_insert(env, dt_object_child(dt), rec, key, th);
 }
 
 /**
@@ -3677,14 +3677,14 @@ static int lod_xattr_set_lmv(const struct lu_env *env, struct dt_object *dt,
                        rec->rec_fid = lu_object_fid(&dto->do_lu);
                        rc = lod_sub_insert(env, dto,
                                            (const struct dt_rec *)rec,
-                                           (const struct dt_key *)dot, th, 0);
+                                           (const struct dt_key *)dot, th);
                        if (rc != 0)
                                GOTO(out, rc);
                }
 
                rec->rec_fid = lu_object_fid(&dt->do_lu);
                rc = lod_sub_insert(env, dto, (struct dt_rec *)rec,
-                                   (const struct dt_key *)dotdot, th, 0);
+                                   (const struct dt_key *)dotdot, th);
                if (rc != 0)
                        GOTO(out, rc);
 
@@ -3728,7 +3728,7 @@ static int lod_xattr_set_lmv(const struct lu_env *env, struct dt_object *dt,
                rec->rec_fid = lu_object_fid(&dto->do_lu);
                rc = lod_sub_insert(env, dt_object_child(dt),
                                    (const struct dt_rec *)rec,
-                                   (const struct dt_key *)stripe_name, th, 0);
+                                   (const struct dt_key *)stripe_name, th);
                if (rc != 0)
                        GOTO(out, rc);
 
@@ -6629,11 +6629,11 @@ static ssize_t lod_declare_write(const struct lu_env *env,
  */
 static ssize_t lod_write(const struct lu_env *env, struct dt_object *dt,
                         const struct lu_buf *buf, loff_t *pos,
-                        struct thandle *th, int iq)
+                        struct thandle *th)
 {
        LASSERT(S_ISREG(dt->do_lu.lo_header->loh_attr) ||
                S_ISLNK(dt->do_lu.lo_header->loh_attr));
-       return lod_sub_write(env, dt_object_child(dt), buf, pos, th, iq);
+       return lod_sub_write(env, dt_object_child(dt), buf, pos, th);
 }
 
 static int lod_declare_punch(const struct lu_env *env, struct dt_object *dt,
index ba97709..e2eb8d7 100644 (file)
@@ -438,14 +438,13 @@ int lod_sub_declare_insert(const struct lu_env *env, struct dt_object *dt,
  * \param[in] rec      record of the index to be inserted
  * \param[in] key      key of the index to be inserted
  * \param[in] th       the transaction handle
- * \param[in] ign      whether ignore quota
  *
  * \retval             0 if the insertion succeeds.
  * \retval             negative errno if the insertion fails.
  */
 int lod_sub_insert(const struct lu_env *env, struct dt_object *dt,
                   const struct dt_rec *rec, const struct dt_key *key,
-                  struct thandle *th, int ign)
+                  struct thandle *th)
 {
        struct thandle *sub_th;
        int             rc;
@@ -462,7 +461,7 @@ int lod_sub_insert(const struct lu_env *env, struct dt_object *dt,
                        return rc;
        }
 
-       return dt_insert(env, dt, rec, key, sub_th, ign);
+       return dt_insert(env, dt, rec, key, sub_th);
 }
 
 /**
@@ -804,14 +803,13 @@ int lod_sub_declare_write(const struct lu_env *env, struct dt_object *dt,
  * \param[in] buf      buffer to write which includes an embedded size field
  * \param[in] pos      offet in the object to start writing at
  * \param[in] th       transaction handle
- * \param[in] rq       enforcement for this write
  *
  * \retval             the buffer size in bytes if it succeeds.
  * \retval             negative errno if it fails.
  */
 ssize_t lod_sub_write(const struct lu_env *env, struct dt_object *dt,
                      const struct lu_buf *buf, loff_t *pos,
-                     struct thandle *th, int rq)
+                     struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -829,7 +827,7 @@ ssize_t lod_sub_write(const struct lu_env *env, struct dt_object *dt,
                        RETURN(rc);
        }
 
-       rc = dt_write(env, dt, buf, pos, sub_th, rq);
+       rc = dt_write(env, dt, buf, pos, sub_th);
        RETURN(rc);
 }
 
index e9380ff..59072c5 100644 (file)
@@ -666,15 +666,11 @@ static int __mdd_index_insert_only(const struct lu_env *env,
 
        if (dt_try_as_dir(env, next)) {
                struct dt_insert_rec    *rec = &mdd_env_info(env)->mti_dt_rec;
-               struct lu_ucred         *uc  = lu_ucred_check(env);
-               int                      ignore_quota;
 
                rec->rec_fid = lf;
                rec->rec_type = type;
-               ignore_quota = uc ? uc->uc_cap & CFS_CAP_SYS_RESOURCE_MASK : 1;
                rc = dt_insert(env, next, (const struct dt_rec *)rec,
-                              (const struct dt_key *)name, handle,
-                              ignore_quota);
+                              (const struct dt_key *)name, handle);
        } else {
                rc = -ENOTDIR;
        }
@@ -2345,17 +2341,13 @@ static int mdd_create_object(const struct lu_env *env, struct mdd_object *pobj,
 #endif
 
        if (S_ISLNK(attr->la_mode)) {
-               struct lu_ucred  *uc = lu_ucred_assert(env);
                struct dt_object *dt = mdd_object_child(son);
                const char *target_name = spec->u.sp_symname;
                int sym_len = strlen(target_name);
                loff_t pos = 0;
 
                buf = mdd_buf_get_const(env, target_name, sym_len);
-               rc = dt->do_body_ops->dbo_write(env, dt, buf, &pos, handle,
-                                               uc->uc_cap &
-                                               CFS_CAP_SYS_RESOURCE_MASK);
-
+               rc = dt->do_body_ops->dbo_write(env, dt, buf, &pos, handle);
                if (rc == sym_len)
                        rc = 0;
                else
index 4f6c32c..9930b78 100644 (file)
@@ -94,7 +94,7 @@ static inline int mdd_orphan_insert_obj(const struct lu_env *env,
        rec->rec_fid = lf;
        rec->rec_type = mdd_object_type(obj);
 
-       return dt_insert(env, dor, (const struct dt_rec *)rec, key, th, 1);
+       return dt_insert(env, dor, (const struct dt_rec *)rec, key, th);
 }
 
 int mdd_orphan_declare_insert(const struct lu_env *env, struct mdd_object *obj,
@@ -186,7 +186,7 @@ int mdd_orphan_insert(const struct lu_env *env, struct mdd_object *obj,
        rec->rec_fid = lf_dor;
        rec->rec_type = S_IFDIR;
        dt_insert(env, next, (const struct dt_rec *)rec,
-                 (const struct dt_key *)dotdot, th, 1);
+                 (const struct dt_key *)dotdot, th);
 
 out:
        if (rc == 0)
index d52bcc5..7ea0ecd 100644 (file)
@@ -514,7 +514,7 @@ int dt_record_write(const struct lu_env *env, struct dt_object *dt,
        LASSERT(dt->do_body_ops);
        LASSERT(dt->do_body_ops->dbo_write);
 
-       size = dt->do_body_ops->dbo_write(env, dt, buf, pos, th, 1);
+       size = dt->do_body_ops->dbo_write(env, dt, buf, pos, th);
        if (size < 0)
                return size;
        return (size == (ssize_t)buf->lb_len) ? 0 : -EFAULT;
index f25126d..9511e00 100644 (file)
@@ -1431,7 +1431,7 @@ llog_osd_regular_fid_add_name_entry(const struct lu_env *env,
                               (struct dt_key *)name, th);
        } else {
                rc = dt_insert(env, dir, (struct dt_rec *)rec,
-                              (struct dt_key *)name, th, 1);
+                              (struct dt_key *)name, th);
        }
        dt_write_unlock(env, dir);
 
@@ -1598,8 +1598,7 @@ static int llog_osd_create(const struct lu_env *env, struct llog_handle *res,
                rec->rec_type = S_IFREG;
                dt_read_lock(env, llog_dir, 0);
                rc = dt_insert(env, llog_dir, (struct dt_rec *)rec,
-                              (struct dt_key *)res->lgh_name,
-                              th, 1);
+                              (struct dt_key *)res->lgh_name, th);
                dt_read_unlock(env, llog_dir);
                dt_object_put(env, llog_dir);
                if (rc)
index a8dd4cb..04c25eb 100644 (file)
@@ -388,14 +388,14 @@ static struct dt_object *__local_file_create(const struct lu_env *env,
                rec->rec_fid = fid;
                /* Add "." and ".." for newly created dir */
                rc = dt_insert(env, dto, (const struct dt_rec *)rec,
-                              (const struct dt_key *)".", th, 1);
+                              (const struct dt_key *)".", th);
                if (rc != 0)
                        GOTO(destroy, rc);
 
                dt_ref_add(env, dto, th);
                rec->rec_fid = lu_object_fid(&parent->do_lu);
                rc = dt_insert(env, dto, (const struct dt_rec *)rec,
-                              (const struct dt_key *)"..", th, 1);
+                              (const struct dt_key *)"..", th);
                if (rc != 0)
                        GOTO(destroy, rc);
        }
@@ -404,7 +404,7 @@ static struct dt_object *__local_file_create(const struct lu_env *env,
        rec->rec_type = dto->do_lu.lo_header->loh_attr;
        dt_write_lock(env, parent, LOS_PARENT);
        rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        if (dti->dti_dof.dof_type == DFT_DIR)
                dt_ref_add(env, parent, th);
        dt_write_unlock(env, parent);
@@ -684,7 +684,7 @@ int local_object_unlink(const struct lu_env *env, struct dt_device *dt,
                rec->rec_fid = &dti->dti_fid;
                rec->rec_type = dto->do_lu.lo_header->loh_attr;
                rc = dt_insert(env, parent, (const struct dt_rec *)rec,
-                              (const struct dt_key *)name, th, 1);
+                              (const struct dt_key *)name, th);
                GOTO(unlock, rc);
        }
 
index 094f928..b2e93c6 100644 (file)
@@ -1140,7 +1140,7 @@ int lustre_index_restore(const struct lu_env *env, struct dt_device *dev,
                GOTO(stop, rc);
 
        rc = dt_insert(env, parent_obj, (const struct dt_rec *)&ent,
-                      (const struct dt_key *)name, th, 1);
+                      (const struct dt_key *)name, th);
        dt_trans_stop(env, dev, th);
        /* Some index name may has been inserted by OSD
         * automatically when create the index object. */
@@ -1186,7 +1186,7 @@ int lustre_index_restore(const struct lu_env *env, struct dt_device *dev,
                        if (rc)
                                GOTO(stop, rc);
 
-                       rc = dt_insert(env, tgt_obj, rec, key, th, 1);
+                       rc = dt_insert(env, tgt_obj, rec, key, th);
                        if (unlikely(rc == -EEXIST))
                                rc = 0;
 
index a93f4f6..85aea9b 100644 (file)
@@ -5261,8 +5261,7 @@ static int osd_index_declare_iam_insert(const struct lu_env *env,
  */
 static int osd_index_iam_insert(const struct lu_env *env, struct dt_object *dt,
                                const struct dt_rec *rec,
-                               const struct dt_key *key, struct thandle *th,
-                               int ignore_quota)
+                               const struct dt_key *key, struct thandle *th)
 {
        struct osd_object *obj = osd_dt_obj(dt);
        struct iam_path_descr *ipd;
@@ -5952,8 +5951,7 @@ static int osd_index_declare_ea_insert(const struct lu_env *env,
  */
 static int osd_index_ea_insert(const struct lu_env *env, struct dt_object *dt,
                               const struct dt_rec *rec,
-                              const struct dt_key *key, struct thandle *th,
-                              int ignore_quota)
+                              const struct dt_key *key, struct thandle *th)
 {
        struct osd_object *obj = osd_dt_obj(dt);
        struct osd_device *osd = osd_dev(dt->do_lu.lo_dev);
index 50a3395..c73b489 100644 (file)
@@ -517,7 +517,6 @@ struct osd_iobuf {
        int                dr_npages;
        int                dr_error;
        int                dr_frags;
-       unsigned int       dr_ignore_quota:1;
        unsigned int       dr_elapsed_valid:1; /* we really did count time */
        unsigned int       dr_rw:1;
        struct lu_buf      dr_pg_buf;
index 3019017..b04c6a5 100644 (file)
@@ -1852,7 +1852,7 @@ int osd_ldiskfs_write_record(struct inode *inode, void *buf, int bufsize,
 
 static ssize_t osd_write(const struct lu_env *env, struct dt_object *dt,
                         const struct lu_buf *buf, loff_t *pos,
-                        struct thandle *handle, int ignore_quota)
+                        struct thandle *handle)
 {
        struct inode            *inode = osd_dt_obj(dt)->oo_inode;
        struct osd_thandle      *oh;
index 2231182..115c247 100644 (file)
@@ -985,14 +985,13 @@ int osd_remote_fid(const struct lu_env *env, struct osd_device *osd,
  *      \param  key     key for index
  *      \param  rec     record reference
  *      \param  th      transaction handler
- *      \param  ignore_quota update should not affect quota
  *
  *      \retval  0  success
  *      \retval -ve failure
  */
 static int osd_dir_insert(const struct lu_env *env, struct dt_object *dt,
                          const struct dt_rec *rec, const struct dt_key *key,
-                         struct thandle *th, int ignore_quota)
+                         struct thandle *th)
 {
        struct osd_thread_info *oti = osd_oti_get(env);
        struct osd_object   *parent = osd_dt_obj(dt);
@@ -1777,7 +1776,7 @@ static int osd_declare_index_insert(const struct lu_env *env,
 
 static int osd_index_insert(const struct lu_env *env, struct dt_object *dt,
                            const struct dt_rec *rec, const struct dt_key *key,
-                           struct thandle *th, int ignore_quota)
+                           struct thandle *th)
 {
        struct osd_object  *obj = osd_dt_obj(dt);
        struct osd_device  *osd = osd_obj2dev(obj);
index bd26af6..1d9de36 100644 (file)
@@ -211,7 +211,7 @@ static ssize_t osd_declare_write(const struct lu_env *env, struct dt_object *dt,
 
 static ssize_t osd_write(const struct lu_env *env, struct dt_object *dt,
                        const struct lu_buf *buf, loff_t *pos,
-                       struct thandle *th, int ignore_quota)
+                        struct thandle *th)
 {
        struct osd_object  *obj  = osd_dt_obj(dt);
        struct osd_device  *osd = osd_obj2dev(obj);
index b66509a..aa77962 100644 (file)
@@ -569,15 +569,13 @@ static int osp_md_declare_index_insert(const struct lu_env *env,
  * \param[in] rec      record of the index to be inserted
  * \param[in] key      key of the index to be inserted
  * \param[in] th       the transaction handle
- * \param[in] ignore_quota quota enforcement for insert
  *
  * \retval             0 if packing index insert succeeds.
  * \retval             negative errno if packing fails.
  */
 static int osp_md_index_insert(const struct lu_env *env, struct dt_object *dt,
                               const struct dt_rec *rec,
-                              const struct dt_key *key, struct thandle *th,
-                              int ignore_quota)
+                              const struct dt_key *key, struct thandle *th)
 {
        struct osp_update_request *update;
        int rc;
@@ -1139,14 +1137,13 @@ static ssize_t osp_md_declare_write(const struct lu_env *env,
  * \param[in] buf      buffer to write which includes an embedded size field
  * \param[in] pos      offet in the object to start writing at
  * \param[in] th       transaction handle
- * \param[in] ignore_quota quota enforcement for this write
  *
  * \retval             the buffer size in bytes if packing succeeds.
  * \retval             negative errno if packing fails.
  */
 static ssize_t osp_md_write(const struct lu_env *env, struct dt_object *dt,
                            const struct lu_buf *buf, loff_t *pos,
-                           struct thandle *th, int ignore_quota)
+                           struct thandle *th)
 {
        struct osp_object         *obj = dt2osp_obj(dt);
        struct osp_update_request  *update;
index 641aa65..896ce2e 100644 (file)
@@ -1643,8 +1643,7 @@ static int osp_orphan_index_insert(const struct lu_env *env,
                                   struct dt_object *dt,
                                   const struct dt_rec *rec,
                                   const struct dt_key *key,
-                                  struct thandle *handle,
-                                  int ignore_quota)
+                                  struct thandle *handle)
 {
        return -EOPNOTSUPP;
 }
index c3e515f..33e6570 100644 (file)
@@ -273,7 +273,7 @@ static int nodemap_idx_insert(const struct lu_env *env,
        dt_write_lock(env, idx, 0);
 
        rc = dt_insert(env, idx, (const struct dt_rec *)nr,
-                      (const struct dt_key *)nk, th, 1);
+                      (const struct dt_key *)nk, th);
 
        nodemap_inc_version(env, idx, th);
        dt_write_unlock(env, idx);
@@ -321,7 +321,7 @@ static int nodemap_idx_update(const struct lu_env *env,
                GOTO(out_lock, rc);
 
        rc = dt_insert(env, idx, (const struct dt_rec *)nr,
-                      (const struct dt_key *)nk, th, 1);
+                      (const struct dt_key *)nk, th);
        if (rc != 0)
                GOTO(out_lock, rc);
 
index aa4d358..c823873 100644 (file)
@@ -660,11 +660,11 @@ int lquota_disk_write(const struct lu_env *env, struct thandle *th,
 
        if (rec != NULL) {
                /* insert record with updated quota settings */
-               rc = dt_insert(env, obj, rec, key, th, 1);
+               rc = dt_insert(env, obj, rec, key, th);
                if (rc) {
                        /* try to insert the old one */
                        rc = dt_insert(env, obj, (struct dt_rec *)&qti->qti_rec,
-                                      key, th, 1);
+                                      key, th);
                        LASSERTF(rc == 0, "failed to insert record in quota "
                                 "index "DFID"\n",
                                 PFID(lu_object_fid(&obj->do_lu)));
@@ -782,7 +782,7 @@ int lquota_disk_write_glb(const struct lu_env *env, struct dt_object *obj,
                rc = 0;
        }
 
-       rc = dt_insert(env, obj, (struct dt_rec *)rec, key, th, 1);
+       rc = dt_insert(env, obj, (struct dt_rec *)rec, key, th);
 out_lock:
        dt_write_unlock(env, obj);
 out:
index 57987e1..e8bdfd1 100644 (file)
@@ -1073,7 +1073,7 @@ static int out_obj_index_insert(const struct lu_env *env,
                return -ENOTDIR;
 
        dt_write_lock(env, dt_obj, MOR_TGT_CHILD);
-       rc = dt_insert(env, dt_obj, rec, key, th, 0);
+       rc = dt_insert(env, dt_obj, rec, key, th);
        dt_write_unlock(env, dt_obj);
 
        return rc;