Skip to contentSkip to conversation

f2fs: fix to restore whint_mode in ->remount_fs

PATCH In review Chao Yu 3 participants 3 messages Feb 28, 2018 – Mar 1, 2018 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix to restore whint_mode in ->remount_fs

From: Chao Yu <[email protected]>

If we fail in ->remount_fs, it needs to restore old whint_mode as other mount options.

Fixes e25afe01822f ("f2fs: support passing down write hints given by users to block layer")
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/super.c +1 -0
index 89abe4087e66..8a93f78efca2 100644
@@ -1512,6 +1512,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		sbi->s_qf_names[i] = s_qf_names[i];
 	}
 #endif
+	sbi->whint_mode = old_whint_mode;
 	sbi->mount_opt = org_mount_opt;
 	sbi->active_logs = active_logs;
 	sb->s_flags = old_sb_flags;
Signature · 1 line
2.14.1.145.gb3622a4ee
maintainer
#1 lore raw
Quoted 6 lines · Chao Yu

From: Chao Yu <[email protected]>

If we fail in ->remount_fs, it needs to restore old whint_mode as other mount options.

Fixes e25afe01822f ("f2fs: support passing down write hints given by users to block layer")

Hi Chao,

It was not merged, so please allow me to integrate this into the original patch.

Thanks,

Quoted 19 lines
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/super.c +1 -0
index 89abe4087e66..8a93f78efca2 100644
@@ -1512,6 +1512,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		sbi->s_qf_names[i] = s_qf_names[i];
 	}
 #endif
+	sbi->whint_mode = old_whint_mode;
 	sbi->mount_opt = org_mount_opt;
 	sbi->active_logs = active_logs;
 	sb->s_flags = old_sb_flags;
Signature · 1 line
2.14.1.145.gb3622a4ee
#2 lore raw

Hi Jaegeuk,

Quoted 6 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu

From: Chao Yu <[email protected]>

If we fail in ->remount_fs, it needs to restore old whint_mode as other mount options.

Quoted 6 lines
Quoted 1 line
Fixes e25afe01822f ("f2fs: support passing down write hints given by users to block layer")

Hi Chao,

It was not merged, so please allow me to integrate this into the original patch.

No problem, please go ahead. ;)

Thanks,

Quoted 25 lines

Thanks,

Quoted 19 lines
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/super.c +1 -0
index 89abe4087e66..8a93f78efca2 100644
@@ -1512,6 +1512,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		sbi->s_qf_names[i] = s_qf_names[i];
 	}
 #endif
+	sbi->whint_mode = old_whint_mode;
 	sbi->mount_opt = org_mount_opt;
 	sbi->active_logs = active_logs;
 	sb->s_flags = old_sb_flags;
Signature · 1 line
2.14.1.145.gb3622a4ee

.