From: Jaegeuk Kim <jaegeuk@kernel.org>
To: LiFan <fanofcode.li@samsung.com>
Cc: "'Chao Yu'" <yuchao0@huawei.com>, "'Chao Yu'" <chao@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: release reserved blocks for quota
Date: Thu, 7 Dec 2017 21:24:12 -0800 [thread overview]
Message-ID: <20171208052412.GA77074@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <000b01d36d9e$199ee360$4cdcaa20$@samsung.com>
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
>
prev parent reply other threads:[~2017-12-08 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171205075320epcas5p3c146367a8d57d8b4617085982b195e40@epcas5p3.samsung.com>
2017-12-05 7:52 ` LiFan
2017-12-08 5:24 ` Jaegeuk Kim [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=20171208052412.GA77074@jaegeuk-macbookpro.roam.corp.google.com \
--to=jaegeuk@kernel.org \
--cc=chao@kernel.org \
--cc=fanofcode.li@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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®