On Thu, Mar 17, 2011 at 4:43 AM, Lennart Poettering <[email protected]> wrote: > On Thu, 10.03.11 00:42, Andrey Borzenkov ([email protected]) wrote: >> It is not. Suggested patch attached. > >> From: Andrey Borzenkov <[email protected]> >> Subject: [PATCH] mount: do not add dependency on network filesystem to >> quotacheck >> >> This creates loop: >> >> fs -> quotacheck -> basic -> network -> fs >> >> It does not look like quota was enabled for them in /etc/init.d/netfs >> anyway. If quota is required, it probably should be implemented as >> per mount point unit. > [...] > Anywaym uf you rework this patch to check for the usrquota/grpquota > options I'd merge it promptly
But it does not solve the problem of usrquota being set on a _netfs filesystem. So either this has to be skipped completely or additional unit provided. > (or you can even merge it yourself, if > Tollef grants you git access by then ;-)). Even better would be if you > add a WANTS dep too, so that we can remove the service from being pulled > in by default sysinit.target. > You mean Wants from mount unit to quotacheck unit? >> Fixes https://qa.mandriva.com/show_bug.cgi?id=62746 >> >> --- >> src/mount.c | 14 ++++++++++++-- >> 1 files changed, 12 insertions(+), 2 deletions(-) >> >> diff --git a/src/mount.c b/src/mount.c >> index 0078010..61bbf50 100644 >> --- a/src/mount.c >> +++ b/src/mount.c >> @@ -412,9 +412,19 @@ static int mount_add_default_dependencies(Mount *m) { >> >> if (m->meta.manager->running_as == MANAGER_SYSTEM && >> !path_equal(m->where, "/")) { >> + MountParameters *p; >> >> - if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, >> SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0) >> - return r; >> + if (m->from_fragment) >> + p = &m->parameters_fragment; >> + else if (m->from_etc_fstab) >> + p = &m->parameters_etc_fstab; >> + else >> + p = NULL; >> + >> + if (!p || (!mount_test_option(p->options, "_netdev") && >> + !(p->fstype && fstype_is_network(p->fstype)))) >> + if ((r = unit_add_dependency_by_name(UNIT(m), >> UNIT_BEFORE, SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0) >> + return r; >> >> if ((r = unit_add_two_dependencies_by_name(UNIT(m), >> UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) >> return r; > > > Lennart > > -- > Lennart Poettering - Red Hat, Inc. > _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
