On 8/15/16 11:38 AM, Zorro Lang wrote: > From the result of strace, we can see: > quotactl(0x5808 /* Q_??? */|USRQUOTA, "/dev/mapper/testvg-scratchdev", 0, 0x7ffdbbda94c0) = -1 EINVAL (Invalid argument) > quotactl(Q_XGETQSTAT|USRQUOTA, "/dev/mapper/testvg-scratchdev", 0, {version=1, ...}) = 0 > > So the first call for XFS_GETQSTATV return EINVAL. > > In linux kernel quota_getxstatev() function, the logic is: > /* If this kernel doesn't support user specified version, fail */ > switch (fqs.qs_version) { > case FS_QSTATV_VERSION1: > break; > default: > return -EINVAL; > } > > So we need to set qa_version to FS_QSTATV_VERSION1, before > we call XFS_GETQSTATV. And as we talked on IRC, it test passed if I set > > sv.qs_version = 1; > > at here. > > So maybe a V2 patch is needed to fix this problem:) Yep, kernel commit said: | Callers of the new quotactl command have to set the version of the data | structure being passed, and kernel will fill as much data as requested. | If the kernel does not support the user-space provided version, EINVAL | will be returned. User-space can reduce the version number and call the same | quotactl again. but this isn't documented anywhere else, AFAICT; this call still isn't documented in the quotactl manpage. o_O I'll fix it up, thanks for catching it! -Eric _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs