lkml.org 
[lkml]   [2017]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [f2fs-dev] [PATCH] f2fs: release reserved blocks for quota
On 12/05, LiFan wrote:
>
> Quota has been modified during inc_valid_block_count(), but not in
> truncate process. This patch adds it.
>
> Signed-off-by: Fan li <fanofcode.li@samsung.com>
> ---
> fs/f2fs/f2fs.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 82f1dc3..71fbba96 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1619,7 +1619,9 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
> sbi->current_reserved_blocks = min(sbi->reserved_blocks,
> sbi->current_reserved_blocks + count);
> spin_unlock(&sbi->stat_lock);
> +
> f2fs_i_blocks_write(inode, count, false, true);
> + dquot_release_reservation_block(inode, count);

The f2fs_i_blocks_write() actually handles allocation, and reserved blocks are
only used for inc_valid_block_count().

Thanks,

> }
>
> static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
> --
> 2.7.4
>

\
 
 \ /
  Last update: 2017-12-08 06:24    [W:0.031 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site