[dm-devel] [PATCH v2] dm init: add dm-mod.waitfor to wait for asynchronously probed block devices

Peter Korsgaard peter at korsgaard.com
Thu Dec 1 07:28:05 UTC 2022


>>>>> "Mike" == Mike Snitzer <snitzer at redhat.com> writes:

Hi,

 > On Thu, Nov 24 2022 at  5:35P -0500,
 > Peter Korsgaard <peter at korsgaard.com> wrote:

 >> > +	if (waitfor[0])
 >> > +		DMINFO("all devices available");
 >> > +

 > Why 20?  Also, why is waiting indefinitely OK?  Would really like to
 > hear from other consumers of dm-init that this module param is useful
 > and needed.

Mainly because of checkpatch.pl ;) prepare_namespace() uses msleep(5)
but checkpatch complains about it, so I made it 20 instead. It doesn't
really matter much, as long as it is small enough to not delay boots too
much (E.G. this is typically used for embedded system where boot time is
critical).

I would say that it DOES make sense to wait forever, similar to how it
is done in prepare_namespace() when rootwait is passed. This waitfor
bootargs is used for root-on-dm, so we cannot continue until the
underlying devices are available.

As mentioned,
https://lore.kernel.org/all/20220406154631.277107-1-fabio.aiuto@amarulasolutions.com/
is an alternatively (less nice) approach to solve the same issue, so yes
- It is useful and needed.

-- 
Bye, Peter Korsgaard



More information about the dm-devel mailing list