Whamcloud - gitweb
LU-6050 target: control OST-index in IDIF via ROCOMPAT flag
[fs/lustre-release.git] / lustre / include / lu_object.h
index 698292d..2ac4144 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -642,6 +642,10 @@ struct lu_site {
         * XXX: a hack! fld has to find md_site via site, remove when possible
         */
        struct seq_server_site  *ld_seq_site;
+       /**
+        * Pointer to the lu_target for this site.
+        */
+       struct lu_target        *ls_tgt;
 };
 
 static inline struct lu_site_bkt_data *
@@ -731,8 +735,6 @@ struct lu_object *lu_object_find_at(const struct lu_env *env,
                                     struct lu_device *dev,
                                     const struct lu_fid *f,
                                     const struct lu_object_conf *conf);
-void lu_object_purge(const struct lu_env *env, struct lu_device *dev,
-                    const struct lu_fid *f);
 struct lu_object *lu_object_find_slice(const struct lu_env *env,
                                        struct lu_device *dev,
                                        const struct lu_fid *f,
@@ -1379,5 +1381,15 @@ struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, size_t len);
 extern __u32 lu_context_tags_default;
 extern __u32 lu_session_tags_default;
 
+static inline bool lu_device_is_cl(const struct lu_device *d)
+{
+       return d->ld_type->ldt_tags & LU_DEVICE_CL;
+}
+
+static inline bool lu_object_is_cl(const struct lu_object *o)
+{
+       return lu_device_is_cl(o->lo_dev);
+}
+
 /** @} lu */
 #endif /* __LUSTRE_LU_OBJECT_H */