Date: Thu, 11 Apr 2002 16:10:37 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: "Michael R. Wayne" <wayne@staff.msen.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: quotactl issues Message-ID: <20020411211037.GA8982@dan.emsphone.com> In-Reply-To: <20020411170324.K56996@staff.msen.com> References: <200204101733.NAA65972@manor.msen.com> <20020411132409.J56996@staff.msen.com> <3CB5F6A8.BBD071D@mindspring.com> <20020411170324.K56996@staff.msen.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 11), Michael R. Wayne said: > Now - to re-iterate my point. The code for edquota FAILS IN EXACTLY > THE SAME WAY with EINVAL. But edquota IGNORES this error. The > reason that edquota works is that, when it gets this failure, it > reads and writes the quota file directly. If quotactl works > properly, why is there code in edquota.c to read/write the quotactl > file directly? > > /usr/src/usr.sbin/edquota/edquota.c > > if (quotactl(fs->fs_file, qcmd, id, &qup->dqblk) != 0) { > if (errno == EOPNOTSUPP && !warned) { <--- running through gdb errno is EINVAL here. > warned++; > warnx("warning: quotas are not compiled into this kernel"); > sleep(3); > } > if ((fd = open(qfpathname, O_RDONLY)) < 0) { <--- So, edquota ignores quotactl and does it manually Note the warnx() call. It writes directly to the quota file so you can set quotas even if your current kernel is not capable of enforcing them. Is your kernel compiled with "options QUOTA"? I can tell you on all my 4.* systems (4.0 through 4.5) edquota calls quotactl and it succeeds: 90883 edquota CALL quotactl(0x8057828,0x40000,0x3e8,0x8057808) 90883 edquota NAMI "/usr" 90883 edquota RET quotactl 0 -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020411211037.GA8982>