Whamcloud - gitweb
r=adilger; fixes to previous commit changing the default stripe count to 1
authorjacob <jacob>
Wed, 22 Jun 2005 22:49:12 +0000 (22:49 +0000)
committerjacob <jacob>
Wed, 22 Jun 2005 22:49:12 +0000 (22:49 +0000)
lustre/ChangeLog
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c

index 98f92df..a88551f 100644 (file)
@@ -41,10 +41,8 @@ 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.
+             OST, rather than all available.  For general usage we have
+             found a stripe count of 1 or 2 works best.
  
 ------------------------------------------------------------------------------
 
index 76ac646..aa11c83 100644 (file)
@@ -560,6 +560,9 @@ static int lov_setup(struct obd_device *obd, obd_count len, void *buf)
                 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. */
@@ -1834,9 +1837,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 :
-                                         1;
+                __u32 expected_stripes = lov_get_stripecnt(lov, 0);
 
                 if (osfs->os_files != LOV_U64_MAX)
                         do_div(osfs->os_files, expected_stripes);
index 15f29bd..a04d020 100644 (file)
@@ -1047,6 +1047,7 @@ int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp)
 {
         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;
@@ -1061,12 +1062,9 @@ 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 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;