Re: [PATCH 06/10] xfs: test quota softlimit warning functionality

Chandan Babu R
2021-03-12T04:26:19Z

On 11 Mar 2021 at 16:40, Chandan Babu R wrote:
> On 09 Mar 2021 at 10:10, Darrick J. Wong wrote:
>> From: Darrick J. Wong <djwong@kernel.org>
>>
>> Make sure that quota softlimits work, which is to say that one can
>> exceed the softlimit up to warnlimit times before it starts enforcing
>> that.
>>
>> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
>> ---
>> tests/xfs/915 | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>> tests/xfs/915.out | 151 +++++++++++++++++++++++++++++++++++++++++++++++++
>> tests/xfs/group | 1
>> 3 files changed, 314 insertions(+)
>> create mode 100755 tests/xfs/915
>> create mode 100644 tests/xfs/915.out
>>
>>
>> diff --git a/tests/xfs/915 b/tests/xfs/915

[...]

>> +*** report initial settings
>> +[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
>> +[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
>> +
>> +*** push past the soft inode limit
>> +[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
>> +[NAME] 0 0 0 00 [--------] 4 3 500000 02 [7 days] 0 0 0 00 [--------]
>
> At this point in the test we have created 4 files.
> 1. softok{1,2,3}
> 2. softwarn1
>
> So we have exceeded the soft inode limit (i.e. 3) once. But the warning has
> been issued twice.
>
> _file_as_id() changes the project id of parent of each of the above files. In
> this case all the above listed files have $SCRATCH_MNT as the parent. So by
> the time softok2 is created we have already reached the soft inode limit of 3
> (parent and the two softok{1,2} files) and creation of softok3 and softwarn1
> generates the two warnings listed above. If this explaination is correct,
> shouldn't 'Used' inode count have a value of 5 (including the inode associated
> with $SCRATCH_MNT)?

Sorry, I missed the fact that _file_as_id() reverts back the project id of
$SCRATCH_MNT just before returning.

The patch looks good.

Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>

--
chandan