mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Chengguang Xu <cgxu519@mykernel.net>, <jaegeuk@kernel.org>,
	<chao@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: fix miscounted block limit in f2fs_statfs_project()
Date: Tue, 7 Jan 2020 19:28:10 +0800	[thread overview]
Message-ID: <a3fd21e0-1f54-0f36-b016-e474ff50fdda@huawei.com> (raw)
In-Reply-To: <20200104142004.12883-1-cgxu519@mykernel.net>

On 2020/1/4 22:20, Chengguang Xu wrote:
> statfs calculates Total/Used/Avail disk space in block unit,
> so we should translate soft/hard prjquota limit to block unit
> as well.
> 
> Below testing result shows the block/inode numbers of
> Total/Used/Avail from df command are all correct afer
> applying this patch.
> 
> [root@localhost quota-tools]\# ./repquota -P /dev/sdb1
> *** Report for project quotas on device /dev/sdb1
> Block grace time: 7days; Inode grace time: 7days
>               Block limits                File limits
> Project   used soft    hard  grace  used  soft  hard  grace
> -----------------------------------------------------------
> \#0   --   4       0       0         1     0     0
> \#101 --   0       0       0         2     0     0
> \#102 --   0   10240       0         2    10     0
> \#103 --   0       0   20480         2     0    20
> \#104 --   0   10240   20480         2    10    20
> \#105 --   0   20480   10240         2    20    10
> 
> [root@localhost sdb1]\# lsattr -p t{1,2,3,4,5}
>   101 ----------------N-- t1/a1
>   102 ----------------N-- t2/a2
>   103 ----------------N-- t3/a3
>   104 ----------------N-- t4/a4
>   105 ----------------N-- t5/a5
> 
> [root@localhost sdb1]\# df -hi t{1,2,3,4,5}
> Filesystem     Inodes IUsed IFree IUse% Mounted on
> /dev/sdb1        2.4M    21  2.4M    1% /mnt/sdb1
> /dev/sdb1          10     2     8   20% /mnt/sdb1
> /dev/sdb1          20     2    18   10% /mnt/sdb1
> /dev/sdb1          10     2     8   20% /mnt/sdb1
> /dev/sdb1          10     2     8   20% /mnt/sdb1
> 
> [root@localhost sdb1]\# df -h t{1,2,3,4,5}
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdb1        10G  489M  9.6G   5% /mnt/sdb1
> /dev/sdb1        10M     0   10M   0% /mnt/sdb1
> /dev/sdb1        20M     0   20M   0% /mnt/sdb1
> /dev/sdb1        10M     0   10M   0% /mnt/sdb1
> /dev/sdb1        10M     0   10M   0% /mnt/sdb1
> 
> Fixes: 909110c060f2 ("f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()")
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

      parent reply	other threads:[~2020-01-07 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 14:20 [f2fs-dev][PATCH " Chengguang Xu
2020-01-04 14:20 ` [f2fs-dev][PATCH 2/2] f2fs: code cleanup for f2fs_statfs_project() Chengguang Xu
2020-01-07 11:37   ` [f2fs-dev] [PATCH " Chao Yu
2020-01-07 11:28 ` Chao Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3fd21e0-1f54-0f36-b016-e474ff50fdda@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=cgxu519@mykernel.net \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®