File tree Expand file tree Collapse file tree 5 files changed +11
-2
lines changed
Documentation/ABI/testing Expand file tree Collapse file tree 5 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -458,6 +458,7 @@ Description: Show status of f2fs superblock in real time.
458
458
0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP
459
459
0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
460
460
0x2000 SBI_IS_RESIZEFS resizefs is in process
461
+ 0x4000 SBI_IS_FREEZING freefs is in process
461
462
====== ===================== =================================
462
463
463
464
What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio
Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ static char *s_flag[] = {
338
338
[SBI_QUOTA_SKIP_FLUSH ] = " quota_skip_flush" ,
339
339
[SBI_QUOTA_NEED_REPAIR ] = " quota_need_repair" ,
340
340
[SBI_IS_RESIZEFS ] = " resizefs" ,
341
+ [SBI_IS_FREEZING ] = " freezefs" ,
341
342
};
342
343
343
344
static int stat_show (struct seq_file * s , void * v )
Original file line number Diff line number Diff line change @@ -1293,6 +1293,7 @@ enum {
1293
1293
SBI_QUOTA_SKIP_FLUSH , /* skip flushing quota in current CP */
1294
1294
SBI_QUOTA_NEED_REPAIR , /* quota file may be corrupted */
1295
1295
SBI_IS_RESIZEFS , /* resizefs is in process */
1296
+ SBI_IS_FREEZING , /* freezefs is in process */
1296
1297
};
1297
1298
1298
1299
enum {
Original file line number Diff line number Diff line change @@ -778,7 +778,8 @@ void f2fs_evict_inode(struct inode *inode)
778
778
f2fs_remove_ino_entry (sbi , inode -> i_ino , UPDATE_INO );
779
779
f2fs_remove_ino_entry (sbi , inode -> i_ino , FLUSH_INO );
780
780
781
- sb_start_intwrite (inode -> i_sb );
781
+ if (!is_sbi_flag_set (sbi , SBI_IS_FREEZING ))
782
+ sb_start_intwrite (inode -> i_sb );
782
783
set_inode_flag (inode , FI_NO_ALLOC );
783
784
i_size_write (inode , 0 );
784
785
retry :
@@ -809,7 +810,8 @@ void f2fs_evict_inode(struct inode *inode)
809
810
if (dquot_initialize_needed (inode ))
810
811
set_sbi_flag (sbi , SBI_QUOTA_NEED_REPAIR );
811
812
}
812
- sb_end_intwrite (inode -> i_sb );
813
+ if (!is_sbi_flag_set (sbi , SBI_IS_FREEZING ))
814
+ sb_end_intwrite (inode -> i_sb );
813
815
no_delete :
814
816
dquot_drop (inode );
815
817
Original file line number Diff line number Diff line change @@ -1663,11 +1663,15 @@ static int f2fs_freeze(struct super_block *sb)
1663
1663
/* ensure no checkpoint required */
1664
1664
if (!llist_empty (& F2FS_SB (sb )-> cprc_info .issue_list ))
1665
1665
return - EINVAL ;
1666
+
1667
+ /* to avoid deadlock on f2fs_evict_inode->SB_FREEZE_FS */
1668
+ set_sbi_flag (F2FS_SB (sb ), SBI_IS_FREEZING );
1666
1669
return 0 ;
1667
1670
}
1668
1671
1669
1672
static int f2fs_unfreeze (struct super_block * sb )
1670
1673
{
1674
+ clear_sbi_flag (F2FS_SB (sb ), SBI_IS_FREEZING );
1671
1675
return 0 ;
1672
1676
}
1673
1677
You can’t perform that action at this time.
0 commit comments