struct lovsub_object;
enum lov_device_flags {
- LOV_DEV_INITIALIZED = 1 << 0
+ LOV_DEV_INITIALIZED = BIT(0),
};
/*
*/
int lo_preferred_mirror;
/**
- * The last mirror that has been read successfully.
- * This field is maintained so that subsequent read
- * can take the advantage of last retries and avoid
- * reading some unavailable OSTs.
- */
- int lo_last_read_mirror;
- /**
* For FLR: the lock to protect access to
- * lo_last_read_mirror.
+ * lo_preferred_mirror.
*/
spinlock_t lo_write_lock;
/**
{
LASSERT(lov->lo_type == LLT_COMP);
LASSERTF(i < lov->u.composite.lo_entry_count,
- "entry %d entry_count %d", i, lov->u.composite.lo_entry_count);
+ "entry %d entry_count %d\n", i,
+ lov->u.composite.lo_entry_count);
return &lov->u.composite.lo_entries[i].lle_raid0;
}
{
LASSERT(lov->lo_type == LLT_COMP);
LASSERTF(i < lov->u.composite.lo_entry_count,
- "entry %d entry_count %d", i, lov->u.composite.lo_entry_count);
+ "entry %d entry_count %d\n", i,
+ lov->u.composite.lo_entry_count);
return &lov->u.composite.lo_entries[i];
}
struct lov_page {
struct cl_page_slice lps_cl;
- /** layout_entry + stripe index, composed using lov_comp_index() */
- unsigned int lps_index;
/* the layout gen when this page was created */
__u32 lps_layout_gen;
};
struct ost_lvb lti_lvb;
struct cl_2queue lti_cl2q;
struct cl_page_list lti_plist;
- wait_queue_entry_t lti_waiter;
};
/**
* \see cl_env_get()
*/
__u16 sub_refcheck;
- __u16 sub_reenter;
};
/**
static inline struct lov_device *lu2lov_dev(const struct lu_device *d)
{
- LINVRNT(d->ld_type == &lov_device_type);
- return container_of0(d, struct lov_device, ld_cl.cd_lu_dev);
+ LINVRNT(d->ld_type == &lov_device_type);
+ return container_of(d, struct lov_device, ld_cl.cd_lu_dev);
}
static inline struct cl_device *lovsub2cl_dev(struct lovsub_device *lovsub)
static inline struct lovsub_device *lu2lovsub_dev(const struct lu_device *d)
{
- LINVRNT(d->ld_type == &lovsub_device_type);
- return container_of0(d, struct lovsub_device, acid_cl.cd_lu_dev);
+ LINVRNT(d->ld_type == &lovsub_device_type);
+ return container_of(d, struct lovsub_device, acid_cl.cd_lu_dev);
}
static inline struct lovsub_device *cl2lovsub_dev(const struct cl_device *d)
{
- LINVRNT(d->cd_lu_dev.ld_type == &lovsub_device_type);
- return container_of0(d, struct lovsub_device, acid_cl);
+ LINVRNT(d->cd_lu_dev.ld_type == &lovsub_device_type);
+ return container_of(d, struct lovsub_device, acid_cl);
}
static inline struct lu_object *lov2lu(struct lov_object *lov)
static inline struct lov_object *lu2lov(const struct lu_object *obj)
{
- LINVRNT(lov_is_object(obj));
- return container_of0(obj, struct lov_object, lo_cl.co_lu);
+ LINVRNT(lov_is_object(obj));
+ return container_of(obj, struct lov_object, lo_cl.co_lu);
}
static inline struct lov_object *cl2lov(const struct cl_object *obj)
{
- LINVRNT(lov_is_object(&obj->co_lu));
- return container_of0(obj, struct lov_object, lo_cl);
+ LINVRNT(lov_is_object(&obj->co_lu));
+ return container_of(obj, struct lov_object, lo_cl);
}
static inline struct lu_object *lovsub2lu(struct lovsub_object *los)
{
- return &los->lso_cl.co_lu;
+ return &los->lso_cl.co_lu;
}
static inline struct cl_object *lovsub2cl(struct lovsub_object *los)
{
- return &los->lso_cl;
+ return &los->lso_cl;
}
static inline struct lovsub_object *cl2lovsub(const struct cl_object *obj)
{
- LINVRNT(lovsub_is_object(&obj->co_lu));
- return container_of0(obj, struct lovsub_object, lso_cl);
+ LINVRNT(lovsub_is_object(&obj->co_lu));
+ return container_of(obj, struct lovsub_object, lso_cl);
}
static inline struct lovsub_object *lu2lovsub(const struct lu_object *obj)
{
- LINVRNT(lovsub_is_object(obj));
- return container_of0(obj, struct lovsub_object, lso_cl.co_lu);
+ LINVRNT(lovsub_is_object(obj));
+ return container_of(obj, struct lovsub_object, lso_cl.co_lu);
}
static inline struct lov_lock *cl2lov_lock(const struct cl_lock_slice *slice)
{
- LINVRNT(lov_is_object(&slice->cls_obj->co_lu));
- return container_of(slice, struct lov_lock, lls_cl);
+ LINVRNT(lov_is_object(&slice->cls_obj->co_lu));
+ return container_of(slice, struct lov_lock, lls_cl);
}
static inline struct lov_page *cl2lov_page(const struct cl_page_slice *slice)
{
- LINVRNT(lov_is_object(&slice->cpl_obj->co_lu));
- return container_of0(slice, struct lov_page, lps_cl);
+ LINVRNT(lov_is_object(&slice->cpl_obj->co_lu));
+ return container_of(slice, struct lov_page, lps_cl);
}
static inline struct lov_io *cl2lov_io(const struct lu_env *env,