Description of problem: Different versions of the quotactl(2) commands share common names, which is sometimes confising. Version-Release number of selected component (if applicable): strace-4.5.2 How reproducible: On filesystems with different quota versions.
Created attachment 98669 [details] strace-4.5.2-alt-quotacmds-fix.patch Proposed patch.
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 important. 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) constants?
Created attachment 103290 [details] strace-4.5.6-alt-quotacmds-fix.patch This patch renames V1-style commands. Btw, the V2-style Q_GETSTATS appears to be missing.
Created attachment 115497 [details] strace-4.5.12-alt-quotacmds-fix.patch 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] strace-4.5.12-alt-quotactl.patch 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] strace-4.5.13-alt-quotactl.patch Rediffed for strace-4.5.13.
Created attachment 123342 [details] strace-4.5.14-alt-quotactl.patch Rediffed for strace-4.5.14, added Q_XQUOTASYNC command support.
Fixed upstream.
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.