Hi Sandeep, On 4/29/25 05:49, Sandeep Dhavale wrote: > Hi Chao, > >> >> - mount #1 - mount #2 >> - z_erofs_init_pcpu_workers >> - atomic_xchg(, 1) >> - z_erofs_init_pcpu_workers >> - atomic_xchg(, 1) >> : return 0 since atomic variable >> is 1 >> it will run w/o percpu workers and >> hotplug >> : update atomic variable to 1 >> - erofs_init_percpu_workers >> : fail >> - atomic_set(, 0) >> : update atomic variable to 0 & fail the mount >> >> Can we add some logs to show we succeed/fail to initialize workers or >> hotplugs? As for mount #2, it expects it will run w/ them, but finally >> it may not. So we'd better have a simple way to know? >> >> Thanks, >> > What you have laid out as race, indeed can happen if > erofs_init_percpu_workers() fails with ENOMEM. For me that is still > not catastrophic as workqueue fallback is in place so the filesystem > is still functional. And at the next mount, the logic will be > reattempted as the atomic variable is reset to 0 after failure.
Yeah, correct. > > If you still think we need to have a log message, I will be happy to > spin up the next revision with logging for ENOMEM. I guess it will be good to add log for such case, thanks. :) Thanks, > > Thanks for the review! > > Regards, > Sandeep.
