generic/681, generic/682: add debugging information to $seqreq.full
authorTheodore Ts'o <tytso@mit.edu>
Mon, 25 Apr 2022 21:14:50 +0000 (17:14 -0400)
committerZorro Lang <zlang@kernel.org>
Tue, 26 Apr 2022 18:54:00 +0000 (02:54 +0800)
commit5528f7843b1ad6f15a9d6ac050cfdd6ce5b229f9
tree8093e593a9db3ddaed6fa59b8578bb21ccdd3de8
parent0fd8e26141f50aaba8c6d3e058149a499317e445
generic/681, generic/682: add debugging information to $seqreq.full

These two tests are checking whether a non-privileged user causing a
block allocation while expanding a directory block when over quota
will fail with an EDQUOT error.  There are three reasons why this can
fail.

* Aa test bug, where if the file system is using cluster allocation
  (for example, ext4 bigalloc) the test doesn't add enough directory
  entries to actually force directory grwoth.

* A file system bug, where the file system allocates blocks but for
  some reason isn't charging the space quota correctly (which
  currently seems to be the case in ext4 with fscrypt).

* A file system bug, where the file system is correctly charging the
  space quota to the unprivileged user, but isn't failing the system
  call with EDQUOT.

By adding some additional debugging information about whether
directory has grown or not (in addition to the existing repquota
output) to the the $seqres.full, it makes easier for the file system
developer to disambiguate between these possibilities.  It's cheap to
do this, and it could save developer time when trying to root cause
the failure.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/681
tests/generic/682