Whamcloud - gitweb
LU-8589 osd: remove "object" from method function names
[fs/lustre-release.git] / lustre / lod / lod_sub_object.c
index b2e89c8..2b0d71e 100644 (file)
@@ -76,7 +76,7 @@ struct thandle *lod_sub_get_thandle(const struct lu_env *env,
        tth = container_of(th, struct top_thandle, tt_super);
 
        /* local object must be mdt object, Note: during ost object
-        * creation, FID is not assigned until osp_object_create(),
+        * creation, FID is not assigned until osp_create(),
         * so if the FID of sub_obj is zero, it means OST object. */
        if (!dt_object_remote(sub_obj) ||
            fid_is_zero(lu_object_fid(&sub_obj->do_lu))) {
@@ -126,12 +126,10 @@ struct thandle *lod_sub_get_thandle(const struct lu_env *env,
  * \retval             0 if the declaration succeeds
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_create(const struct lu_env *env,
-                                 struct dt_object *dt,
-                                 struct lu_attr *attr,
-                                 struct dt_allocation_hint *hint,
-                                 struct dt_object_format *dof,
-                                 struct thandle *th)
+int lod_sub_declare_create(const struct lu_env *env, struct dt_object *dt,
+                          struct lu_attr *attr,
+                          struct dt_allocation_hint *hint,
+                          struct dt_object_format *dof, struct thandle *th)
 {
        struct thandle *sub_th;
        bool record_update;
@@ -163,11 +161,9 @@ int lod_sub_object_declare_create(const struct lu_env *env,
  * \retval             0 if the creation succeeds
  * \retval             negative errno if the creation fails.
  */
-int lod_sub_object_create(const struct lu_env *env, struct dt_object *dt,
-                         struct lu_attr *attr,
-                         struct dt_allocation_hint *hint,
-                         struct dt_object_format *dof,
-                         struct thandle *th)
+int lod_sub_create(const struct lu_env *env, struct dt_object *dt,
+                  struct lu_attr *attr, struct dt_allocation_hint *hint,
+                  struct dt_object_format *dof, struct thandle *th)
 {
        struct thandle     *sub_th;
        bool               record_update;
@@ -203,9 +199,8 @@ int lod_sub_object_create(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_ref_add(const struct lu_env *env,
-                                  struct dt_object *dt,
-                                  struct thandle *th)
+int lod_sub_declare_ref_add(const struct lu_env *env, struct dt_object *dt,
+                           struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -237,8 +232,8 @@ int lod_sub_object_declare_ref_add(const struct lu_env *env,
  * \retval             0 if it succeeds.
  * \retval             negative errno if it fails.
  */
-int lod_sub_object_ref_add(const struct lu_env *env, struct dt_object *dt,
-                          struct thandle *th)
+int lod_sub_ref_add(const struct lu_env *env, struct dt_object *dt,
+                   struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -273,9 +268,8 @@ int lod_sub_object_ref_add(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_ref_del(const struct lu_env *env,
-                                  struct dt_object *dt,
-                                  struct thandle *th)
+int lod_sub_declare_ref_del(const struct lu_env *env, struct dt_object *dt,
+                           struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -307,8 +301,8 @@ int lod_sub_object_declare_ref_del(const struct lu_env *env,
  * \retval             0 if it succeeds.
  * \retval             negative errno if it fails.
  */
-int lod_sub_object_ref_del(const struct lu_env *env, struct dt_object *dt,
-                          struct thandle *th)
+int lod_sub_ref_del(const struct lu_env *env, struct dt_object *dt,
+                   struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -343,9 +337,8 @@ int lod_sub_object_ref_del(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_destroy(const struct lu_env *env,
-                                  struct dt_object *dt,
-                                  struct thandle *th)
+int lod_sub_declare_destroy(const struct lu_env *env, struct dt_object *dt,
+                           struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -357,8 +350,7 @@ int lod_sub_object_declare_destroy(const struct lu_env *env,
                RETURN(PTR_ERR(sub_th));
 
        if (record_update)
-               update_record_size(env, object_destroy, th,
-                                  lu_object_fid(&dt->do_lu));
+               update_record_size(env, destroy, th, lu_object_fid(&dt->do_lu));
 
        rc = dt_declare_destroy(env, dt, sub_th);
 
@@ -378,8 +370,8 @@ int lod_sub_object_declare_destroy(const struct lu_env *env,
  * \retval             0 if the destroy succeeds.
  * \retval             negative errno if the destroy fails.
  */
-int lod_sub_object_destroy(const struct lu_env *env, struct dt_object *dt,
-                          struct thandle *th)
+int lod_sub_destroy(const struct lu_env *env, struct dt_object *dt,
+                   struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -391,8 +383,7 @@ int lod_sub_object_destroy(const struct lu_env *env, struct dt_object *dt,
                RETURN(PTR_ERR(sub_th));
 
        if (record_update) {
-               rc = update_record_pack(object_destroy, th,
-                                       lu_object_fid(&dt->do_lu));
+               rc = update_record_pack(destroy, th, lu_object_fid(&dt->do_lu));
                if (rc < 0)
                        RETURN(rc);
        }
@@ -416,11 +407,9 @@ int lod_sub_object_destroy(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_insert(const struct lu_env *env,
-                                 struct dt_object *dt,
-                                 const struct dt_rec *rec,
-                                 const struct dt_key *key,
-                                 struct thandle *th)
+int lod_sub_declare_insert(const struct lu_env *env, struct dt_object *dt,
+                          const struct dt_rec *rec,
+                          const struct dt_key *key, struct thandle *th)
 {
        struct thandle *sub_th;
        bool            record_update;
@@ -452,10 +441,9 @@ int lod_sub_object_declare_insert(const struct lu_env *env,
  * \retval             0 if the insertion succeeds.
  * \retval             negative errno if the insertion fails.
  */
-int lod_sub_object_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 ign)
+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 *sub_th;
        int             rc;
@@ -488,10 +476,8 @@ int lod_sub_object_index_insert(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_delete(const struct lu_env *env,
-                                 struct dt_object *dt,
-                                 const struct dt_key *key,
-                                 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)
 {
        struct thandle *sub_th;
        bool            record_update;
@@ -521,8 +507,8 @@ int lod_sub_object_declare_delete(const struct lu_env *env,
  * \retval             0 if the deletion succeeds.
  * \retval             negative errno if the deletion fails.
  */
-int lod_sub_object_delete(const struct lu_env *env, struct dt_object *dt,
-                         const struct dt_key *name, struct thandle *th)
+int lod_sub_delete(const struct lu_env *env, struct dt_object *dt,
+                  const struct dt_key *name, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -558,11 +544,9 @@ int lod_sub_object_delete(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_xattr_set(const struct lu_env *env,
-                                    struct dt_object *dt,
-                                    const struct lu_buf *buf,
-                                    const char *name, int fl,
-                                    struct thandle *th)
+int lod_sub_declare_xattr_set(const struct lu_env *env, struct dt_object *dt,
+                             const struct lu_buf *buf, const char *name,
+                             int fl, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -599,9 +583,9 @@ int lod_sub_object_declare_xattr_set(const struct lu_env *env,
  * \retval             0 if the xattr setting succeeds.
  * \retval             negative errno if xattr setting fails.
  */
-int lod_sub_object_xattr_set(const struct lu_env *env, struct dt_object *dt,
-                            const struct lu_buf *buf, const char *name, int fl,
-                            struct thandle *th)
+int lod_sub_xattr_set(const struct lu_env *env, struct dt_object *dt,
+                     const struct lu_buf *buf, const char *name, int fl,
+                     struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -638,10 +622,8 @@ int lod_sub_object_xattr_set(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_attr_set(const struct lu_env *env,
-                                   struct dt_object *dt,
-                                   const struct lu_attr *attr,
-                                   struct thandle *th)
+int lod_sub_declare_attr_set(const struct lu_env *env, struct dt_object *dt,
+                            const struct lu_attr *attr, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -675,10 +657,8 @@ int lod_sub_object_declare_attr_set(const struct lu_env *env,
  * \retval             0 if attributes setting succeeds.
  * \retval             negative errno if the attributes setting fails.
  */
-int lod_sub_object_attr_set(const struct lu_env *env,
-                           struct dt_object *dt,
-                           const struct lu_attr *attr,
-                           struct thandle *th)
+int lod_sub_attr_set(const struct lu_env *env, struct dt_object *dt,
+                    const struct lu_attr *attr, struct thandle *th)
 {
        bool               record_update;
        struct thandle     *sub_th;
@@ -714,10 +694,8 @@ int lod_sub_object_attr_set(const struct lu_env *env,
  * \retval             0 if the declaration succeeds.
  * \retval             negative errno if the declaration fails.
  */
-int lod_sub_object_declare_xattr_del(const struct lu_env *env,
-                                    struct dt_object *dt,
-                                    const char *name,
-                                    struct thandle *th)
+int lod_sub_declare_xattr_del(const struct lu_env *env, struct dt_object *dt,
+                             const char *name, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -752,10 +730,8 @@ int lod_sub_object_declare_xattr_del(const struct lu_env *env,
  * \retval             0 if the deletion succeeds.
  * \retval             negative errno if the deletion fails.
  */
-int lod_sub_object_xattr_del(const struct lu_env *env,
-                            struct dt_object *dt,
-                            const char *name,
-                            struct thandle *th)
+int lod_sub_xattr_del(const struct lu_env *env, struct dt_object *dt,
+                     const char *name, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -792,10 +768,9 @@ int lod_sub_object_xattr_del(const struct lu_env *env,
  * \retval             0 if the insertion succeeds.
  * \retval             negative errno if the insertion fails.
  */
-int lod_sub_object_declare_write(const struct lu_env *env,
-                                struct dt_object *dt,
-                                const struct lu_buf *buf, loff_t pos,
-                                struct thandle *th)
+int lod_sub_declare_write(const struct lu_env *env, struct dt_object *dt,
+                         const struct lu_buf *buf, loff_t pos,
+                         struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -832,9 +807,9 @@ int lod_sub_object_declare_write(const struct lu_env *env,
  * \retval             the buffer size in bytes if it succeeds.
  * \retval             negative errno if it fails.
  */
-ssize_t lod_sub_object_write(const struct lu_env *env, struct dt_object *dt,
-                            const struct lu_buf *buf, loff_t *pos,
-                            struct thandle *th, int rq)
+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  *sub_th;
        bool            record_update;
@@ -870,10 +845,8 @@ ssize_t lod_sub_object_write(const struct lu_env *env, struct dt_object *dt,
  * \retval             0 if the insertion succeeds.
  * \retval             negative errno if the insertion fails.
  */
-int lod_sub_object_declare_punch(const struct lu_env *env,
-                                struct dt_object *dt,
-                                __u64 start, __u64 end,
-                                struct thandle *th)
+int lod_sub_declare_punch(const struct lu_env *env, struct dt_object *dt,
+                         __u64 start, __u64 end, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;
@@ -910,8 +883,8 @@ int lod_sub_object_declare_punch(const struct lu_env *env,
  * \retval             the buffer size in bytes if it succeeds.
  * \retval             negative errno if it fails.
  */
-int lod_sub_object_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,
+                 __u64 start, __u64 end, struct thandle *th)
 {
        struct thandle  *sub_th;
        bool            record_update;