Red Hat Bugzilla – Bug 118696
more elaborate quotactl(2) deparser
Last modified: 2007-11-30 17:10:38 EST
Description of problem:
Different versions of the quotactl(2) commands share common names, which is
Version-Release number of selected component (if applicable):
On filesystems with different quota versions.
Created attachment 98669 [details]
I don't like creating new symbolic names that are not macro names used
in sources. I'm not sure there is any real good solution for this,
but that is not it.
Btw, Q_V2_* macros are present but have different semantic, so using them in
this context is not so good idea as I thought before.
What do you think about e.g. "v2(Q_GETQUOTA)" notation?
The more appropriate change is to change the old format since in
modern kernels there are no names for those commands anymore. Here
you could be inventive. The old headers are dying or died. Enabling
people to find the names strace prints in the current headers is more
So, I suggest to introduce Q_V1_*. I don't like a v1(...) notation.
The former has the advantage that if somebody really wants to write
old quota code they could use these macro names.
Dmitry, can you submit a patch that renames the old constants to
Q_V1_* and uses unadorned Q_* for the current kernel (V2 I guess)
Created attachment 103290 [details]
This patch renames V1-style commands.
Btw, the V2-style Q_GETSTATS appears to be missing.
Created attachment 115497 [details]
Rediffed for new strace version.
Since both glibc's sys/quota.h and kernel's linux/quota.h are incomplete
from strace point of view, and sys/quota.h is also outdated,
strace cannot rely on these header files.
My opinion is that quotactl decoder needs to be rewritten
using own header files like quota-tools project does.
Is there any flaws in this approach?
Created attachment 115653 [details]
Proposed quotactl deparser replacement.
With recent change in glibc
(I mean http://sources.redhat.com/ml/glibc-cvs/2005-q2/msg00436.html)
sys/quota.h looks much better, but still not sufficient for strace.
Created attachment 117547 [details]
Rediffed for strace-4.5.13.
Created attachment 123342 [details]
Rediffed for strace-4.5.14, added Q_XQUOTASYNC command support.
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.