Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-13974 llog: check stale osp object
[fs/lustre-release.git]
/
lustre
/
include
/
dt_object.h
diff --git
a/lustre/include/dt_object.h
b/lustre/include/dt_object.h
index
b5c0148
..
0330989
100644
(file)
--- a/
lustre/include/dt_object.h
+++ b/
lustre/include/dt_object.h
@@
-1063,6
+1063,18
@@
struct dt_object_operations {
int (*do_invalidate)(const struct lu_env *env, struct dt_object *dt);
/**
int (*do_invalidate)(const struct lu_env *env, struct dt_object *dt);
/**
+ * Check object stale state.
+ *
+ * OSP only.
+ *
+ * \param[in] dt object
+ *
+ * \retval true for stale object
+ * \retval false for not stale object
+ */
+ bool (*do_check_stale)(struct dt_object *dt);
+
+ /**
* Declare intention to instaintiate extended layout component.
*
* \param[in] env execution environment
* Declare intention to instaintiate extended layout component.
*
* \param[in] env execution environment
@@
-2386,6
+2398,15
@@
static inline int dt_write_locked(const struct lu_env *env,
return dt->do_ops->do_write_locked(env, dt);
}
return dt->do_ops->do_write_locked(env, dt);
}
+static inline bool dt_object_stale(struct dt_object *dt)
+{
+ LASSERT(dt);
+ LASSERT(dt->do_ops);
+ LASSERT(dt->do_ops->do_check_stale);
+
+ return dt->do_ops->do_check_stale(dt);
+}
+
static inline int dt_declare_attr_get(const struct lu_env *env,
struct dt_object *dt)
{
static inline int dt_declare_attr_get(const struct lu_env *env,
struct dt_object *dt)
{