Description: The default stripe count has been changed to 1
Details : The interpretation of the default stripe count (0, to lfs
or lmc) has been changed to mean striping across a single
- OST, rather than all available. To get the previous
- behaviour, a stripe count of -1 can be used, however for
- general usage we have found a stripe count of 1 or 2
- works best.
+ OST, rather than all available. For general usage we have
+ found a stripe count of 1 or 2 works best.
------------------------------------------------------------------------------
desc->ld_default_stripe_size &= ~(LOV_MIN_STRIPE_SIZE - 1);
}
+ if (desc->ld_default_stripe_count == 0)
+ desc->ld_default_stripe_count = 1;
+
/* Because of 64-bit divide/mod operations only work with a 32-bit
* divisor in a 32-bit kernel, we cannot support a stripe width
* of 4GB or larger on 32-bit CPUs. */
}
if (set) {
- __u32 expected_stripes = lov->desc.ld_default_stripe_count ?
- lov->desc.ld_default_stripe_count :
- 1;
+ __u32 expected_stripes = lov_get_stripecnt(lov, 0);
if (osfs->os_files != LOV_U64_MAX)
do_div(osfs->os_files, expected_stripes);
{
struct obd_device *obd = mdc_exp->exp_obd;
struct client_obd *cli = &obd->u.cli;
+ struct lov_stripe_md lsm = { .lsm_magic = LOV_MAGIC };
struct lov_desc desc;
__u32 valsize = sizeof(desc);
int rc, size;
if (rc)
RETURN(rc);
- /* If default_stripe_count is zero we stripe over a single OST */
- if (desc.ld_default_stripe_count != 0) {
- struct lov_stripe_md lsm = { .lsm_magic = LOV_MAGIC,
- .lsm_stripe_count = 1 };
- size = obd_size_diskmd(lov_exp, &lsm);
- }
+ lsm.lsm_stripe_count = desc.ld_default_stripe_count;
+ size = obd_size_diskmd(lov_exp, &lsm);
+
if (cli->cl_default_mds_easize < size)
cli->cl_default_mds_easize = size;