[LTP] [PATCH] lib: tst_device: Scale loop device detach timeout

Cyril Hrubis chrubis@suse.cz
Thu Oct 22 15:09:42 CEST 2026


Hi!
> > Scale the number of retries with tst_multiply_timeout(), which attach
> > already uses since d90d20046 ("lib: Use backoff polling to wait for
> > loop device nodes"). The default stays 2s, multiplied by 4 on kernels
> > with slow kconfig options and by LTP_TIMEOUT_MUL. The 50ms polling
> > step is kept, so the detach still finishes shortly after the device
> > is released.
> 
> It would probably be better if we used the TST_RETRY_FN_EXP_BACKOFF() in
> the detach loop instead so that the deatch is fast on fast device but we
> do not poll unecessairly fast on slow devices.

And that macro already scales the timeout with tst_multiply_timeout().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list