staging: lustre: obd: rename LUSTRE_STRIPE_MAXBYTES
authorJohn L. Hammond <john.hammond@intel.com>
Sun, 18 Sep 2016 20:37:39 +0000 (16:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Sep 2016 07:40:35 +0000 (09:40 +0200)
Rename LUSTRE_STRIPE_MAXBYTES to LUSTRE_EXT3_STRIPE_MAXBYTES and
correct the comment describing its use.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/11800
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/lov/lov_ea.c
drivers/staging/lustre/lustre/lov/lov_pack.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/osc/osc_request.c

index 0917aaa956a6ec21f42e2bd7f8625ce31fc55867..19230a97e37b99733c8c05d7e6380b083458f92e 100644 (file)
@@ -73,10 +73,12 @@ static inline void loi_init(struct lov_oinfo *loi)
 {
 }
 
-/* Until such time as we get_info the per-stripe maximum from the OST,
- * we define this to be 2T - 4k, which is the ext3 maxbytes.
+/*
+ * If we are unable to get the maximum object size from the OST in
+ * ocd_maxbytes using OBD_CONNECT_MAXBYTES, then we fall back to using
+ * the old maximum object size from ext3.
  */
-#define LUSTRE_STRIPE_MAXBYTES 0x1fffffff000ULL
+#define LUSTRE_EXT3_STRIPE_MAXBYTES 0x1fffffff000ULL
 
 struct lov_stripe_md {
        atomic_t     lsm_refc;
index d88b81daf692cdd92f294d1ea2c6021b31d4c227..9f0b5b74578ddf87bc6f9e3e810b86cee302715d 100644 (file)
@@ -154,14 +154,14 @@ static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa,
 }
 
 /* Find minimum stripe maxbytes value.  For inactive or
- * reconnecting targets use LUSTRE_STRIPE_MAXBYTES.
+ * reconnecting targets use LUSTRE_EXT3_STRIPE_MAXBYTES.
  */
 static void lov_tgt_maxbytes(struct lov_tgt_desc *tgt, __u64 *stripe_maxbytes)
 {
        struct obd_import *imp = tgt->ltd_obd->u.cli.cl_import;
 
        if (!imp || !tgt->ltd_active) {
-               *stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+               *stripe_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
                return;
        }
 
@@ -172,7 +172,7 @@ static void lov_tgt_maxbytes(struct lov_tgt_desc *tgt, __u64 *stripe_maxbytes)
                if (*stripe_maxbytes > imp->imp_connect_data.ocd_maxbytes)
                        *stripe_maxbytes = imp->imp_connect_data.ocd_maxbytes;
        } else {
-               *stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+               *stripe_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
        }
        spin_unlock(&imp->imp_lock);
 }
index 869ef41b13ca25aac16b28346345d86b32daa71c..c654810e2bfefe566846d4434e7436a801df0d88 100644 (file)
@@ -284,7 +284,7 @@ int lov_alloc_memmd(struct lov_stripe_md **lsmp, __u16 stripe_count,
        spin_lock_init(&(*lsmp)->lsm_lock);
        (*lsmp)->lsm_magic = magic;
        (*lsmp)->lsm_stripe_count = stripe_count;
-       (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES * stripe_count;
+       (*lsmp)->lsm_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES * stripe_count;
        (*lsmp)->lsm_pattern = pattern;
        (*lsmp)->lsm_pool_name[0] = '\0';
        (*lsmp)->lsm_layout_gen = 0;
index 6968953486dbe935e7b8c4f44264a3bc6eaa743d..cddc2d247fe9a14d34fd97e4e116ad3deb2f9e43 100644 (file)
@@ -454,7 +454,7 @@ static int echo_alloc_memmd(struct echo_device *ed,
        }
 
        loi_init((*lsmp)->lsm_oinfo[0]);
-       (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+       (*lsmp)->lsm_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
        ostid_set_seq_echo(&(*lsmp)->lsm_oi);
 
        return lsm_size;
index 0eb4e35a96ebd31bd4b9a2073dcb36e23936f8fa..40a7ceba5e894516b356a93e1f2c19c652ad76f4 100644 (file)
@@ -190,7 +190,7 @@ static int osc_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
            (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_MAXBYTES))
                (*lsmp)->lsm_maxbytes = imp->imp_connect_data.ocd_maxbytes;
        else
-               (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+               (*lsmp)->lsm_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
 
        return lsm_size;
 }