Re: [PATCH] quota: initialize dquot cache before mounting rootfs

From: Jan Kara

Date: Wed Oct 21 2026 - 11:42:32 EST


Hi!

On Tue 20-10-26 21:52:29, YouYou Yu wrote:
> On Mon, 19 Oct 2026 12:44:49 +0200, Jan Kara wrote:
> > I definitely don't think anybody sane wants quotas on initramfs. Is this
> > just a fuzzing result or are you really interested in that functionality?
>
> The truth is it's not a fuzzing result, we are really interested in it.
> We run systems that extensively use rootfs and we want to limit per user
> usage on it the same way tmpfs quotas allow on any other tmpfs mount.

OK, please make the fact that you have this usecase explicit in the
changelog.

> > Instead of pulling quota into early boot I'd just refuse tmpfs mount in
> > this case (same result as original behavior but clearer error message :)).
>
> Refusing the mount would avoid the crash, but rootfs would then be
> the only tmpfs instance where quotas can't be used, even though
> initramfs_options= exists to pass mount options to it. That said, if
> initializing this earlier is a concern, I'm happy to rework the patch
> if you have a preferred approach.

No, the patch was actually good. I just didn't want to add complexity just
because fuzzer was able to come up with some insanity. If you have a real
use for it, I'm OK with the change. I'll take it through my tree.

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR