* [PATCH] f2fs: turn quota off when error occurs
@ 2017-10-20 15:53 Jaegeuk Kim
2017-10-22 15:16 ` [f2fs-dev] " Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2017-10-20 15:53 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
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)
f2fs_flush_merged_writes(sbi);
--
2.14.0.rc1.383.gd1ce394fe2-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: turn quota off when error occurs
2017-10-20 15:53 [PATCH] f2fs: turn quota off when error occurs Jaegeuk Kim
@ 2017-10-22 15:16 ` Chao Yu
2017-10-22 16:01 ` Jaegeuk Kim
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2017-10-22 15:16 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-fsdevel, linux-f2fs-devel
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?
Thanks,
> f2fs_flush_merged_writes(sbi);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: turn quota off when error occurs
2017-10-22 15:16 ` [f2fs-dev] " Chao Yu
@ 2017-10-22 16:01 ` Jaegeuk Kim
2017-10-23 10:12 ` [f2fs-dev] " Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2017-10-22 16:01 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel
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>
---
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;
+ }
}
/*
--
2.14.0.rc1.383.gd1ce394fe2-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: turn quota off when error occurs
2017-10-22 16:01 ` Jaegeuk Kim
@ 2017-10-23 10:12 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2017-10-23 10:12 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-fsdevel, linux-f2fs-devel
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;
> + }
> }
>
> /*
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-23 10:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [f2fs-dev] " Chao Yu
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).