Whamcloud - gitweb
LU-888 lctl: remove perilous lctl {get,set,list}_param behavior.
[fs/lustre-release.git] / lustre / include / md_object.h
index 9a7e3ee..0346116 100644 (file)
@@ -30,6 +30,9 @@
  * Use is subject to license terms.
  */
 /*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
@@ -126,7 +129,8 @@ enum ma_valid {
         MA_LOV_DEF   = (1 << 6),
 /* (Layout lock will used #7 here) */
         MA_HSM       = (1 << 8),
-        MA_SOM       = (1 << 9)
+        MA_SOM       = (1 << 9),
+        MA_PFID      = (1 << 10)
 };
 
 typedef enum {
@@ -177,6 +181,7 @@ struct md_attr {
         struct lustre_capa     *ma_capa;
         struct md_hsm           ma_hsm;
         struct md_som_data     *ma_som;
+        struct lu_fid           ma_pfid;
 };
 
 /** Additional parameters for create */
@@ -240,6 +245,7 @@ struct md_object_operations {
         int (*moo_xattr_del)(const struct lu_env *env, struct md_object *obj,
                              const char *name);
 
+        /** \retval number of bytes actually read upon success */
         int (*moo_readpage)(const struct lu_env *env, struct md_object *obj,
                             const struct lu_rdpg *rdpg);
 
@@ -266,7 +272,7 @@ struct md_object_operations {
                         struct md_object *obj, int flag);
 
         int (*moo_close)(const struct lu_env *env, struct md_object *obj,
-                         struct md_attr *ma);
+                         struct md_attr *ma, int mode);
 
         int (*moo_capa_get)(const struct lu_env *, struct md_object *,
                             struct lustre_capa *, int renewal);
@@ -687,10 +693,11 @@ static inline int mo_open(const struct lu_env *env,
 
 static inline int mo_close(const struct lu_env *env,
                            struct md_object *m,
-                           struct md_attr *ma)
+                           struct md_attr *ma,
+                           int mode)
 {
         LASSERT(m->mo_ops->moo_close);
-        return m->mo_ops->moo_close(env, m, ma);
+        return m->mo_ops->moo_close(env, m, ma, mode);
 }
 
 static inline int mo_readpage(const struct lu_env *env,