Whamcloud - gitweb
LU-17573 lov: change default object size. 00/56100/2
authorAlexey Lyashkov <alexey.lyashkov@hpe.com>
Thu, 22 Feb 2024 06:38:03 +0000 (09:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Nov 2024 17:40:09 +0000 (17:40 +0000)
OST don't able to use indirects for long time,
let's switch a object size to extent based.

Lustre-commit: f315a3a594a78ecd47fcd74177fa73fb2efff59c
Lustre-change: https://review.whamcloud.com/54137

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

index beb0f63..2631660 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;
@@ -281,12 +281,14 @@ lsme_unpack(struct lov_obd *lov, struct lov_mds_md *lmm, size_t buf_size,
 
        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 9341d2e..33fb43e 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 daf7574..3d7122f 100755 (executable)
@@ -1578,7 +1578,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
@@ -1618,7 +1618,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"