LLT_EMPTY, /** empty file without body (mknod + truncate) */
LLT_RELEASED, /** file with no objects (data in HSM) */
LLT_COMP, /** support composite layout */
+ LLT_FOREIGN, /** foreign layout */
LLT_NR
};
return "RELEASED";
case LLT_COMP:
return "COMPOSITE";
+ case LLT_FOREIGN:
+ return "FOREIGN";
case LLT_NR:
LBUG();
}
*/
static inline __u32 lov_entry_type(struct lov_stripe_md_entry *lsme)
{
- if ((lov_pattern(lsme->lsme_pattern) == LOV_PATTERN_RAID0) ||
+ if ((lov_pattern(lsme->lsme_pattern) & LOV_PATTERN_RAID0) ||
(lov_pattern(lsme->lsme_pattern) == LOV_PATTERN_MDT))
- return lov_pattern(lsme->lsme_pattern);
+ return lov_pattern(lsme->lsme_pattern &
+ ~LOV_PATTERN_OVERSTRIPING);
return 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_preferred_mirror.
+ * lo_last_read_mirror.
*/
spinlock_t lo_write_lock;
/**
struct cl_io *lse_io;
};
-struct lovsub_page {
- struct cl_page_slice lsb_cl;
-};
-
-
struct lov_thread_info {
struct cl_object_conf lti_stripe_conf;
struct lu_fid lti_fid;
int lov_page_init (const struct lu_env *env, struct cl_object *ob,
struct cl_page *page, pgoff_t index);
-int lovsub_page_init (const struct lu_env *env, struct cl_object *ob,
- struct cl_page *page, pgoff_t index);
int lov_page_init_empty (const struct lu_env *env, struct cl_object *obj,
struct cl_page *page, pgoff_t index);
int lov_page_init_composite(const struct lu_env *env, struct cl_object *obj,
struct cl_page *page, pgoff_t index);
+int lov_page_init_foreign(const struct lu_env *env, struct cl_object *obj,
+ struct cl_page *page, pgoff_t index);
struct lu_object *lov_object_alloc (const struct lu_env *env,
const struct lu_object_header *hdr,
struct lu_device *dev);
+
struct lu_object *lovsub_object_alloc(const struct lu_env *env,
const struct lu_object_header *hdr,
struct lu_device *dev);
return container_of0(slice, struct lov_page, lps_cl);
}
-static inline struct lovsub_page *
-cl2lovsub_page(const struct cl_page_slice *slice)
-{
- LINVRNT(lovsub_is_object(&slice->cpl_obj->co_lu));
- return container_of0(slice, struct lovsub_page, lsb_cl);
-}
-
static inline struct lov_io *cl2lov_io(const struct lu_env *env,
const struct cl_io_slice *ios)
{