[Top] [All Lists]

Re: [PATCH 0/3] xfs: change available ranges in quota check

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 0/3] xfs: change available ranges in quota check
From: HAYASAKA Mitsuo <mitsuo.hayasaka.hu@xxxxxxxxxxx>
Date: Fri, 27 Jan 2012 15:21:02 +0900
Cc: Ben Myers <bpm@xxxxxxx>, Alex Elder <aelder@xxxxxxx>, Christoph Hellwig <hch@xxxxxx>, xfs-masters@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20120124174612.GC9853@xxxxxxxxxxxxx>
References: <20120123034513.3339.97432.stgit@xxxxxxxxxxxxxxxxxxxxxxxx> <20120124174612.GC9853@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
Hi Christoph,

(2012/01/25 2:46), Christoph Hellwig wrote:
> On Mon, Jan 23, 2012 at 12:45:14PM +0900, Mitsuo Hayasaka wrote:
>> Hi,
>> This patch series changes available ranges of softlimit and
>> hardlimit in quota check, as follows.
>> (1) Consider new reservation for quota check
>>     The disk block reservation checks if (current usage + new
>>     reservation) reach the quota limit although the inode reservation
>>     does not use the new reservation for quota check. It should
>>     consider it, as well. This is mandatory for (2).
> Can you send a testcase that reproduces issues with the old behaviour?

Regarding (1) related to inode reservation, current xfs works well
because inode is reserved one by one if required.

For example, when an new inode tries to be reserved in xfs_trans_dqresv(),
it checks quota as follows.

if (ninos > 0) {        // ninos: # of new inodes expected to be allocated.
        if (cur_usage >= limit)
                goto error;

        cur_usage += ninos;

It checks only current usage, but this code works well since the caller
always set the argument ninos to 1 or 0 in current xfs. So, inode can be
used up to the limits due to the one by one reservation.

To make it more general, this check should be the same way as the new
block quota check introduced in the PATCH 2/3 where the disk block can
be used up to the block quota limits.

So, this part is a kind of cleanup patch. I'm going to split the part
into another patch, and to send a new patch series.


<Prev in Thread] Current Thread [Next in Thread>