Whamcloud - gitweb
LU-17573 lov: change default object size. 37/54137/3
authorAlexey Lyashkov <alexey.lyashkov@hpe.com>
Thu, 22 Feb 2024 06:38:03 +0000 (09:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 00:50:02 +0000 (00:50 +0000)
OST don't able to use indirects for long time,
let's switch a object size to extent based.

Test-Parameters: trivial
HPe-bug-id: LUS-11428
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I9759fc7122c41075ebc35d52ade342c37706b041
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54137
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_ea.c
lustre/lov/lov_internal.h
lustre/tests/sanity-hsm.sh

index 2755eb0..19fe451 100644 (file)
@@ -51,12 +51,12 @@ lu_extent_le_to_cpu(struct lu_extent *dst, const struct lu_extent *src)
 
 /*
  * Find minimum stripe maxbytes value.  For inactive or
- * reconnecting targets use LUSTRE_EXT3_STRIPE_MAXBYTES.
+ * reconnecting targets use LUSTRE_EXT4_STRIPE_MAXBYTES.
  */
 static loff_t lov_tgt_maxbytes(struct lov_tgt_desc *tgt)
 {
        struct obd_import *imp;
-       loff_t maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
+       loff_t maxbytes = LUSTRE_EXT4_STRIPE_MAXBYTES;
 
        if (!tgt->ltd_active)
                return maxbytes;
@@ -323,12 +323,14 @@ retry_new_ost:
 
        if (maxbytes) {
                if (min_stripe_maxbytes == 0)
-                       min_stripe_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
+                       min_stripe_maxbytes = LUSTRE_EXT4_STRIPE_MAXBYTES;
 
                if (stripe_count == 0)
-                       stripe_count = lov->desc.ld_tgt_count;
+                       stripe_count = lsme->lsme_stripe_count <= 0 ?
+                                           lov->desc.ld_tgt_count :
+                                           lsme->lsme_stripe_count;
 
-               if (min_stripe_maxbytes <= LLONG_MAX / stripe_count)
+               if (min_stripe_maxbytes <= (LLONG_MAX / stripe_count))
                        lov_bytes = min_stripe_maxbytes * stripe_count;
                else
                        lov_bytes = MAX_LFS_FILESIZE;
index b56afbb..8d4f332 100644 (file)
 #include <uapi/linux/lustre/lustre_user.h>
 
 /* 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_EXT3_STRIPE_MAXBYTES 0x1fffffff000ULL
+ * ocd_maxbytes using OBD_CONNECT_MAXBYTES or LSM component don't init,
+ * then we fall back to using the maximum object size from ldiskfs.
+ * Once indirect's blocks don't supported for ost now, ldiskfs
+ * extent limit used */
+#define LUSTRE_EXT4_STRIPE_MAXBYTES (((1ULL << 32) - 1) << 12)
 
 struct lov_stripe_md_entry {
        struct lu_extent        lsme_extent;
index 0324adf..906d13e 100755 (executable)
@@ -1706,7 +1706,7 @@ test_21() {
        local orig_size=$(stat -c "%s" $f)
        local orig_blocks=$(stat -c "%b" $f)
 
-       start_full_debug_logging
+#      start_full_debug_logging
 
        $LFS hsm_archive $f || error "could not archive file"
        wait_request_state $fid ARCHIVE SUCCEED
@@ -1746,7 +1746,7 @@ test_21() {
        $LFS hsm_release $f || fail "second release should succeed"
        check_hsm_flags $f "0x0000000d"
 
-       stop_full_debug_logging
+#      stop_full_debug_logging
 }
 run_test 21 "Simple release tests"