All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota
@ 2020-05-11  6:15 ` Konstantin Khlebnikov
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Khlebnikov @ 2020-05-11  6:15 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, Jaegeuk Kim, Chao Yu

This reserved space isn't committed yet but cannot be used for
allocations. For userspace it has no difference from used space.

See the same fix in ext4 commit f06925c73942 ("ext4: report delalloc
reserve as non-free in statfs for project quota").

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project")
---
 fs/f2fs/super.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index f2dfc21c6abb..c5e8cb31626f 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1292,7 +1292,8 @@ static int f2fs_statfs_project(struct super_block *sb,
 		limit >>= sb->s_blocksize_bits;
 
 	if (limit && buf->f_blocks > limit) {
-		curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits;
+		curblock = (dquot->dq_dqb.dqb_curspace +
+			    dquot->dq_dqb.dqb_rsvspace) >> sb->s_blocksize_bits;
 		buf->f_blocks = limit;
 		buf->f_bfree = buf->f_bavail =
 			(buf->f_blocks > curblock) ?


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [f2fs-dev] [PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota
@ 2020-05-11  6:15 ` Konstantin Khlebnikov
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Khlebnikov @ 2020-05-11  6:15 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, Jaegeuk Kim, Chao Yu

This reserved space isn't committed yet but cannot be used for
allocations. For userspace it has no difference from used space.

See the same fix in ext4 commit f06925c73942 ("ext4: report delalloc
reserve as non-free in statfs for project quota").

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project")
---
 fs/f2fs/super.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index f2dfc21c6abb..c5e8cb31626f 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1292,7 +1292,8 @@ static int f2fs_statfs_project(struct super_block *sb,
 		limit >>= sb->s_blocksize_bits;
 
 	if (limit && buf->f_blocks > limit) {
-		curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits;
+		curblock = (dquot->dq_dqb.dqb_curspace +
+			    dquot->dq_dqb.dqb_rsvspace) >> sb->s_blocksize_bits;
 		buf->f_blocks = limit;
 		buf->f_bfree = buf->f_bavail =
 			(buf->f_blocks > curblock) ?



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota
  2020-05-11  6:15 ` [f2fs-dev] " Konstantin Khlebnikov
@ 2020-05-12  1:50   ` Chao Yu
  -1 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2020-05-12  1:50 UTC (permalink / raw)
  To: Konstantin Khlebnikov, linux-kernel, linux-f2fs-devel,
	Jaegeuk Kim, Chao Yu

On 2020/5/11 14:15, Konstantin Khlebnikov wrote:
> This reserved space isn't committed yet but cannot be used for
> allocations. For userspace it has no difference from used space.
> 
> See the same fix in ext4 commit f06925c73942 ("ext4: report delalloc
> reserve as non-free in statfs for project quota").
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project")

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

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota
@ 2020-05-12  1:50   ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2020-05-12  1:50 UTC (permalink / raw)
  To: Konstantin Khlebnikov, linux-kernel, linux-f2fs-devel,
	Jaegeuk Kim, Chao Yu

On 2020/5/11 14:15, Konstantin Khlebnikov wrote:
> This reserved space isn't committed yet but cannot be used for
> allocations. For userspace it has no difference from used space.
> 
> See the same fix in ext4 commit f06925c73942 ("ext4: report delalloc
> reserve as non-free in statfs for project quota").
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project")

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

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-12  1:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11  6:15 [PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota Konstantin Khlebnikov
2020-05-11  6:15 ` [f2fs-dev] " Konstantin Khlebnikov
2020-05-12  1:50 ` Chao Yu
2020-05-12  1:50   ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.