/* workaround - New target not in objids file; increase mdsize */
/* ld_tgt_count is used as the max index everywhere, despite its name. */
if (data[off] == 0) {
+ __u32 max_easize;
__u32 stripes;
+ max_easize = mds->mds_obt.obt_osd_properties.osd_max_ea_size;
data[off] = 1;
mds->mds_lov_objid_count++;
- stripes = min_t(__u32, LOV_MAX_STRIPE_COUNT,
- mds->mds_lov_objid_count);
+ stripes = min(lov_mds_md_stripecnt(max_easize, LOV_MAGIC_V3),
+ mds->mds_lov_objid_count);
mds->mds_max_mdsize = lov_mds_md_size(stripes, LOV_MAGIC_V3);
mds->mds_max_cookiesize = stripes * sizeof(struct llog_cookie);
static int mds_lov_update_from_read(struct mds_obd *mds, obd_id *data,
__u32 count)
{
- __u32 i;
- __u32 stripes;
+ __u32 max_easize = mds->mds_obt.obt_osd_properties.osd_max_ea_size;
+ __u32 i, stripes;
for (i = 0; i < count; i++) {
if (data[i] == 0)
mds->mds_lov_objid_count++;
}
- stripes = min_t(__u32, LOV_MAX_STRIPE_COUNT,
+ stripes = min(lov_mds_md_stripecnt(max_easize, LOV_MAGIC_V3),
mds->mds_lov_objid_count);
mds->mds_max_mdsize = lov_mds_md_size(stripes, LOV_MAGIC_V3);
OBD_CONNECT_OSS_CAPA | OBD_CONNECT_FULL20 |
OBD_CONNECT_CHANGE_QS | OBD_CONNECT_AT |
OBD_CONNECT_MDS | OBD_CONNECT_SKIP_ORPHAN |
- OBD_CONNECT_SOM;
+ OBD_CONNECT_SOM | OBD_CONNECT_MAX_EASIZE;
#ifdef HAVE_LRU_RESIZE_SUPPORT
data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
#endif
data->ocd_version = LUSTRE_VERSION_CODE;
data->ocd_group = mdt_to_obd_objseq(mds->mds_id);
+ data->ocd_max_easize = mds->mds_obt.obt_osd_properties.osd_max_ea_size;
+
/* send max bytes per rpc */
data->ocd_brw_size = PTLRPC_MAX_BRW_PAGES << CFS_PAGE_SHIFT;
/* send the list of supported checksum types */