f2fs: turn quota off when error occurs
Subsystems (2)
Jaegeuk Kim
maintainerPATCH 1/1 f2fs: turn quota off when error occurs
Before changing readonly, it needs to turn quota off.
--- fs/f2fs/checkpoint.c | 1 + 1 file changed, 1 insertion(+)
fs/f2fs/checkpoint.c +1 -0
@@ -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);
Signature · 1 line
2.14.0.rc1.383.gd1ce394fe2-goog
Chao Yu
maintainerQuoted 12 lines · Jaegeuk Kim
Before changing readonly, it needs to turn quota off.
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/checkpoint.c | 1 + 1 file changed, 1 insertion(+)fs/f2fs/checkpoint.c +0
-0
fs/f2fs/checkpoint.c struct kmem_cache *inode_entry_slab; · line 34
Quoted 6 lines
fs/f2fs/checkpoint.c +1
-0@@ -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,
Quoted 2 lines
fs/f2fs/checkpoint.c +0
-0f2fs_flush_merged_writes (sbi);
Jaegeuk Kim
maintainerQuoted 8 lines · Chao Yu
Quoted 7 lines · Jaegeuk Kim
Before changing readonly, it needs to turn quota off.
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/checkpoint.c | 1 + 1 file changed, 1 insertion(+)
Quoted 14 lines
fs/f2fs/checkpoint.c struct kmem_cache *inode_entry_slab; · line 34
Quoted 11 lines
fs/f2fs/checkpoint.c +1
-0@@ -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_checkpointcan be called fromend_io, how about addingf2fs_quota_off_umounthere?
Agreed.
--- fs/f2fs/checkpoint.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
fs/f2fs/checkpoint.c +6 -2
@@ -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 ; + } }/*
Signature · 1 line
2.14.0.rc1.383.gd1ce394fe2-goog
Quoted 24 lines · Jaegeuk Kim
Quoted 8 lines · Chao Yu
Quoted 7 lines · Jaegeuk Kim
Before changing readonly, it needs to turn quota off.
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/checkpoint.c | 1 + 1 file changed, 1 insertion(+)Quoted 14 lines
fs/f2fs/checkpoint.c struct kmem_cache *inode_entry_slab; · line 34
Quoted 11 lines
fs/f2fs/checkpoint.c +1
-0@@ -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_checkpointcan be called fromend_io, how about addingf2fs_quota_off_umounthere?
Quoted 3 lines
Agreed.
Signed-off-by Jaegeuk Kim <[email protected]>
Thanks,
Quoted 25 lines
--- fs/f2fs/checkpoint.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)fs/f2fs/checkpoint.c +6
-2@@ -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 ; + } }/*