Skip to contentSkip to conversation

ext4: return error on syncfs after shutdown

PATCH Applied Amir Goldstein 3 participants 3 messages Sep 4, 2024 – Nov 7, 2024 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: return error on syncfs after shutdown

This is the logic behavior and one that we would like to verify using a generic fstest similar to xfs/546.

---

Ted,

Please see the discussion about moving test xfs/546 to generic.

WDYT?

Thanks,
Amir.

 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/super.c +1 -1
index e72145c4ae5a..b9cf18819e11 100644
@@ -6279,7 +6279,7 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 
 	if (unlikely(ext4_forced_shutdown(sb)))
-		return 0;
+		return -EIO;
 
 	trace_ext4_sync_fs(sb, wait);
 	flush_workqueue(sbi->rsv_conversion_wq);
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Amir Goldstein

This is the logic behavior and one that we would like to verify using a generic fstest similar to xfs/546.

Yeah, makes sense to me. Feel free to add:

Honza

Quoted 30 lines

---

Ted,

Please see the discussion about moving test xfs/546 to generic.

WDYT?

Thanks,
Amir.

 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/super.c +1 -1
index e72145c4ae5a..b9cf18819e11 100644
@@ -6279,7 +6279,7 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 
 	if (unlikely(ext4_forced_shutdown(sb)))
-		return 0;
+		return -EIO;
 
 	trace_ext4_sync_fs(sb, wait);
 	flush_workqueue(sbi->rsv_conversion_wq);
Signature · 1 line
2.34.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer Applied
#2 lore raw
In reply to Amir Goldstein
Quoted 4 lines · Amir Goldstein

This is the logic behavior and one that we would like to verify using a generic fstest similar to xfs/546.

Applied, thanks!

[1/1] ext4: return error on syncfs after shutdown

      commit: e80597b47c4a8ed28471cc59acce850f3a401e8c

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>