Whamcloud - gitweb
LU-5710 all: second batch of corrected typos and grammar errors
[fs/lustre-release.git] / lustre / include / cl_object.h
index 7c72c41..63be0fc 100644 (file)
 #include <linux/wait.h>
 #include <lustre_dlm.h>
 
 #include <linux/wait.h>
 #include <lustre_dlm.h>
 
+struct obd_info;
 struct inode;
 
 struct cl_device;
 struct inode;
 
 struct cl_device;
@@ -348,19 +349,19 @@ struct cl_object_operations {
          */
         int  (*coo_io_init)(const struct lu_env *env,
                             struct cl_object *obj, struct cl_io *io);
          */
         int  (*coo_io_init)(const struct lu_env *env,
                             struct cl_object *obj, struct cl_io *io);
-        /**
-         * Fill portion of \a attr that this layer controls. This method is
-         * called top-to-bottom through all object layers.
-         *
-         * \pre cl_object_header::coh_attr_guard of the top-object is locked.
-         *
-         * \return   0: to continue
-         * \return +ve: to stop iterating through layers (but 0 is returned
-         * from enclosing cl_object_attr_get())
-         * \return -ve: to signal error
-         */
-        int (*coo_attr_get)(const struct lu_env *env, struct cl_object *obj,
-                            struct cl_attr *attr);
+       /**
+        * Fill portion of \a attr that this layer controls. This method is
+        * called top-to-bottom through all object layers.
+        *
+        * \pre cl_object_header::coh_attr_guard of the top-object is locked.
+        *
+        * \return   0: to continue
+        * \return +ve: to stop iterating through layers (but 0 is returned
+        *              from enclosing cl_object_attr_get())
+        * \return -ve: to signal error
+        */
+       int (*coo_attr_get)(const struct lu_env *env, struct cl_object *obj,
+                           struct cl_attr *attr);
         /**
          * Update attributes.
          *
         /**
          * Update attributes.
          *
@@ -409,6 +410,23 @@ struct cl_object_operations {
         */
        int (*coo_find_cbdata)(const struct lu_env *env, struct cl_object *obj,
                               ldlm_iterator_t iter, void *data);
         */
        int (*coo_find_cbdata)(const struct lu_env *env, struct cl_object *obj,
                               ldlm_iterator_t iter, void *data);
+       /**
+        * Get FIEMAP mapping from the object.
+        */
+       int (*coo_fiemap)(const struct lu_env *env, struct cl_object *obj,
+                         struct ll_fiemap_info_key *fmkey,
+                         struct fiemap *fiemap, size_t *buflen);
+       /**
+        * Get attributes of the object from server. (top->bottom)
+        */
+       int (*coo_obd_info_get)(const struct lu_env *env, struct cl_object *obj,
+                               struct obd_info *oinfo,
+                               struct ptlrpc_request_set *set);
+       /**
+        * Get data version of the object. (top->bottom)
+        */
+       int (*coo_data_version)(const struct lu_env *env, struct cl_object *obj,
+                               __u64 *version, int flags);
 };
 
 /**
 };
 
 /**
@@ -1768,11 +1786,12 @@ struct cl_io {
                } ci_wr;
                struct cl_io_rw_common ci_rw;
                struct cl_setattr_io {
                } ci_wr;
                struct cl_io_rw_common ci_rw;
                struct cl_setattr_io {
-                       struct ost_lvb   sa_attr;
-                       unsigned int     sa_valid;
-                       int              sa_stripe_index;
-                       struct lu_fid    *sa_parent_fid;
-                       struct obd_capa  *sa_capa;
+                       struct ost_lvb           sa_attr;
+                       unsigned int             sa_attr_flags;
+                       unsigned int             sa_valid;
+                       int                      sa_stripe_index;
+                       const struct lu_fid     *sa_parent_fid;
+                       struct obd_capa         *sa_capa;
                } ci_setattr;
                 struct cl_fault_io {
                         /** page index within file. */
                } ci_setattr;
                 struct cl_fault_io {
                         /** page index within file. */
@@ -1993,7 +2012,7 @@ struct cl_req_obj {
  */
 struct cl_req {
        enum cl_req_type        crq_type;
  */
 struct cl_req {
        enum cl_req_type        crq_type;
-       /** A list of pages being transfered */
+       /** A list of pages being transferred */
        struct list_head        crq_pages;
        /** Number of pages in cl_req::crq_pages */
        unsigned                crq_nrpages;
        struct list_head        crq_pages;
        /** Number of pages in cl_req::crq_pages */
        unsigned                crq_nrpages;
@@ -2166,8 +2185,8 @@ void cl_object_put        (const struct lu_env *env, struct cl_object *o);
 void cl_object_get        (struct cl_object *o);
 void cl_object_attr_lock  (struct cl_object *o);
 void cl_object_attr_unlock(struct cl_object *o);
 void cl_object_get        (struct cl_object *o);
 void cl_object_attr_lock  (struct cl_object *o);
 void cl_object_attr_unlock(struct cl_object *o);
-int  cl_object_attr_get   (const struct lu_env *env, struct cl_object *obj,
-                           struct cl_attr *attr);
+int  cl_object_attr_get(const struct lu_env *env, struct cl_object *obj,
+                       struct cl_attr *attr);
 int  cl_object_attr_update(const struct lu_env *env, struct cl_object *obj,
                            const struct cl_attr *attr, unsigned valid);
 int  cl_object_glimpse    (const struct lu_env *env, struct cl_object *obj,
 int  cl_object_attr_update(const struct lu_env *env, struct cl_object *obj,
                            const struct cl_attr *attr, unsigned valid);
 int  cl_object_glimpse    (const struct lu_env *env, struct cl_object *obj,
@@ -2180,6 +2199,14 @@ int cl_object_getstripe(const struct lu_env *env, struct cl_object *obj,
                        struct lov_user_md __user *lum);
 int cl_object_find_cbdata(const struct lu_env *env, struct cl_object *obj,
                          ldlm_iterator_t iter, void *data);
                        struct lov_user_md __user *lum);
 int cl_object_find_cbdata(const struct lu_env *env, struct cl_object *obj,
                          ldlm_iterator_t iter, void *data);
+int cl_object_fiemap(const struct lu_env *env, struct cl_object *obj,
+                    struct ll_fiemap_info_key *fmkey, struct fiemap *fiemap,
+                    size_t *buflen);
+int cl_object_obd_info_get(const struct lu_env *env, struct cl_object *obj,
+                          struct obd_info *oinfo,
+                          struct ptlrpc_request_set *set);
+int cl_object_data_version(const struct lu_env *env, struct cl_object *obj,
+                          __u64 *version, int flags);
 
 /**
  * Returns true, iff \a o0 and \a o1 are slices of the same object.
 
 /**
  * Returns true, iff \a o0 and \a o1 are slices of the same object.