From 5ae66ca81658235bb272748cdd460f3392d3865c Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 22 Jun 2005 21:12:04 +0000 Subject: [PATCH] b=6936 change "default" stripe count to 1. --- lustre/ChangeLog | 9 +++++++++ lustre/lov/lov_obd.c | 2 +- lustre/lov/lov_pack.c | 4 +++- lustre/mdc/mdc_request.c | 5 ++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 91daa54..98f92df 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -37,6 +37,15 @@ Details : CFS's improved ext3 filesystem is named ldiskfs for 2.6 when trying to load modules. Now, it will correctly use ext3 on 2.4 and ldiskfs on 2.6. +Severity : enhancement +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. + ------------------------------------------------------------------------------ 2005-06-20 Cluster File Systems, Inc. diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 1739474..76ac646 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1836,7 +1836,7 @@ static int lov_statfs(struct obd_device *obd, struct obd_statfs *osfs, if (set) { __u32 expected_stripes = lov->desc.ld_default_stripe_count ? lov->desc.ld_default_stripe_count : - lov->desc.ld_active_tgt_count; + 1; if (osfs->os_files != LOV_U64_MAX) do_div(osfs->os_files, expected_stripes); diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c index 8038a37..049ea80 100644 --- a/lustre/lov/lov_pack.c +++ b/lustre/lov/lov_pack.c @@ -139,7 +139,9 @@ int lov_get_stripecnt(struct lov_obd *lov, int stripe_count) { if (!stripe_count) stripe_count = lov->desc.ld_default_stripe_count; - if (!stripe_count || stripe_count > lov->desc.ld_active_tgt_count) + if (!stripe_count) + stripe_count = 1; + if (stripe_count > lov->desc.ld_active_tgt_count) stripe_count = lov->desc.ld_active_tgt_count; /* for now, we limit the stripe count directly, when bug 4424 is * fixed this needs to be somewhat dynamic based on whether ext3 diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 0c1f8c9..15f29bd 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -1061,11 +1061,10 @@ int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp) if (rc) RETURN(rc); - /* If default_stripe_count is zero we stripe over all OSTs */ + /* 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 = - desc.ld_default_stripe_count }; + .lsm_stripe_count = 1 }; size = obd_size_diskmd(lov_exp, &lsm); } if (cli->cl_default_mds_easize < size) -- 1.8.3.1