Whamcloud - gitweb
LU-18671 mdc: don't send empty rpc for DoM 83/57883/4
authorAlexander Boyko <alexander.boyko@hpe.com>
Tue, 14 Jan 2025 12:02:04 +0000 (13:02 +0100)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Feb 2025 23:42:13 +0000 (23:42 +0000)
osc_page_gang_lookup() sends empty rpc to refresh a lock,
bases on cl_io lm_next_rpc_time from a thread storage.
mdc_lock_discard_pages() does not set time, and it is taken from a
osc_thread_info. Sometimes this leads to an empty rpc for a DoM,
outside of DoM component size.

LustreError: lustre-MDT0000-mdc-ffffa0816bceb000: operation ost_read
 to node 192.168.122.55@tcp failed: rc = -116

HPE-bug-id: LUS-12706
Fixes: 564070343ac4 ("LU-14711 osc: Notify server if cache discard takes a long time")
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I36cdc2c697e2306e792241ecee77b442b24356ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57883
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdc/mdc_dev.c
lustre/osc/osc_cache.c

index 3370884..50e8241 100644 (file)
@@ -229,6 +229,8 @@ static int mdc_lock_discard_pages(const struct lu_env *env,
 
        io->ci_obj = cl_object_top(osc2cl(osc));
        io->ci_ignore_layout = 1;
+       io->u.ci_misc.lm_next_rpc_time = 0;
+
        result = cl_io_init(env, io, CIT_MISC, io->ci_obj);
        if (result != 0)
                GOTO(out, result);
index ea32832..2401f3c 100644 (file)
@@ -3140,7 +3140,6 @@ bool osc_page_gang_lookup(const struct lu_env *env, struct cl_io *io,
                        cl_page_get(page);
                        pvec[j++] = ops;
                }
-               ++idx;
 
                /*
                 * Here a delicate locking dance is performed. Current thread
@@ -3182,6 +3181,7 @@ bool osc_page_gang_lookup(const struct lu_env *env, struct cl_io *io,
                if (need_resched())
                        cond_resched();
 
+               ++idx;
                spin_lock(&osc->oo_tree_lock);
                tree_lock = true;
        }