From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: turn quota off when error occurs
Date: Mon, 23 Oct 2017 18:12:08 +0800 [thread overview]
Message-ID: <46f69cf8-a958-7071-d0a3-e8adc46e12b9@kernel.org> (raw)
In-Reply-To: <20171022160138.GA33480@jaegeuk-macbookpro.roam.corp.google.com>
On 2017/10/23 0:01, Jaegeuk Kim wrote:
> On 10/22, Chao Yu wrote:
>> On 2017/10/20 23:53, Jaegeuk Kim wrote:
>>> Before changing readonly, it needs to turn quota off.
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>> ---
>>> fs/f2fs/checkpoint.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
>>> index 201608281681..ff74665d7f2d 100644
>>> --- a/fs/f2fs/checkpoint.c
>>> +++ b/fs/f2fs/checkpoint.c
>>> @@ -29,6 +29,7 @@ struct kmem_cache *inode_entry_slab;
>>> void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io)
>>> {
>>> set_ckpt_flags(sbi, CP_ERROR_FLAG);
>>> + f2fs_quota_off_umount(sb);
>>> sbi->sb->s_flags |= MS_RDONLY;
>>> if (!end_io)
>>
>> Oh, f2fs_stop_checkpoint can be called from end_io, how about adding
>> f2fs_quota_off_umount here?
>
> Agreed.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
> ---
> fs/f2fs/checkpoint.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 201608281681..b38b1ae59124 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -29,9 +29,13 @@ struct kmem_cache *inode_entry_slab;
> void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io)
> {
> set_ckpt_flags(sbi, CP_ERROR_FLAG);
> - sbi->sb->s_flags |= MS_RDONLY;
> - if (!end_io)
> + if (!end_io) {
> + f2fs_quota_off_umount(sbi->sb);
> + sbi->sb->s_flags |= MS_RDONLY;
> f2fs_flush_merged_writes(sbi);
> + } else {
> + sbi->sb->s_flags |= MS_RDONLY;
> + }
> }
>
> /*
>
prev parent reply other threads:[~2017-10-23 10:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 15:53 [PATCH] f2fs: turn quota off when error occurs Jaegeuk Kim
2017-10-22 15:16 ` [f2fs-dev] " Chao Yu
2017-10-22 16:01 ` Jaegeuk Kim
2017-10-23 10:12 ` 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=46f69cf8-a958-7071-d0a3-e8adc46e12b9@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).