* [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota
@ 2018-02-02 10:40 Konstantin Khlebnikov
2018-02-06 13:46 ` Jan Kara
2018-05-21 2:52 ` Theodore Y. Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Konstantin Khlebnikov @ 2018-02-02 10:40 UTC (permalink / raw)
To: Andreas Dilger, linux-ext4, Theodore Ts'o, linux-kernel
Cc: Dmitry Monakhov, Li Xi, Jan Kara
This reserved space isn't committed yet but cannot be used for allocations.
For userspace it has no difference from used space. XFS already does this.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 689c958cbe6b ("ext4: add project quota support")
---
fs/ext4/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 5de959fb0244..13ce97b9e820 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5227,7 +5227,8 @@ static int ext4_statfs_project(struct super_block *sb,
dquot->dq_dqb.dqb_bsoftlimit :
dquot->dq_dqb.dqb_bhardlimit) >> 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] 3+ messages in thread
* Re: [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota
2018-02-02 10:40 [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota Konstantin Khlebnikov
@ 2018-02-06 13:46 ` Jan Kara
2018-05-21 2:52 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2018-02-06 13:46 UTC (permalink / raw)
To: Konstantin Khlebnikov
Cc: Andreas Dilger, linux-ext4, Theodore Ts'o, linux-kernel,
Dmitry Monakhov, Li Xi, Jan Kara
On Fri 02-02-18 13:40:05, 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. XFS already does this.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: 689c958cbe6b ("ext4: add project quota support")
The patch looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/super.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 5de959fb0244..13ce97b9e820 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -5227,7 +5227,8 @@ static int ext4_statfs_project(struct super_block *sb,
> dquot->dq_dqb.dqb_bsoftlimit :
> dquot->dq_dqb.dqb_bhardlimit) >> 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) ?
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota
2018-02-02 10:40 [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota Konstantin Khlebnikov
2018-02-06 13:46 ` Jan Kara
@ 2018-05-21 2:52 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Y. Ts'o @ 2018-05-21 2:52 UTC (permalink / raw)
To: Konstantin Khlebnikov
Cc: Andreas Dilger, linux-ext4, linux-kernel, Dmitry Monakhov, Li Xi,
Jan Kara
On Fri, Feb 02, 2018 at 01:40:05PM +0300, 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. XFS already does this.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: 689c958cbe6b ("ext4: add project quota support")
Applied, thanks. Apologies for the delay in applying the patch.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-21 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02 10:40 [PATCH] ext4: report delalloc reserve as non-free in statfs mangled by project quota Konstantin Khlebnikov
2018-02-06 13:46 ` Jan Kara
2018-05-21 2:52 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).