File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ static int gc_thread_func(void *data)
4444 if (kthread_should_stop ())
4545 break ;
4646
47- if (sbi -> sb -> s_writers .frozen >= SB_FREEZE_WRITE ) {
48- wait_ms = GC_THREAD_MAX_SLEEP_TIME ;
47+ f2fs_balance_fs (sbi );
48+
49+ if (!test_opt (sbi , BG_GC ))
4950 continue ;
50- }
5151
5252 /*
5353 * [GC triggering condition]
Original file line number Diff line number Diff line change @@ -245,15 +245,13 @@ void f2fs_evict_inode(struct inode *inode)
245245 if (inode -> i_nlink || is_bad_inode (inode ))
246246 goto no_delete ;
247247
248- sb_start_intwrite (inode -> i_sb );
249248 set_inode_flag (F2FS_I (inode ), FI_NO_ALLOC );
250249 i_size_write (inode , 0 );
251250
252251 if (F2FS_HAS_BLOCKS (inode ))
253252 f2fs_truncate (inode );
254253
255254 remove_inode_page (inode );
256- sb_end_intwrite (inode -> i_sb );
257255no_delete :
258256 end_writeback (inode );
259257}
Original file line number Diff line number Diff line change @@ -143,22 +143,6 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
143143 return 0 ;
144144}
145145
146- static int f2fs_freeze (struct super_block * sb )
147- {
148- int err ;
149-
150- if (sb -> s_flags & MS_RDONLY )
151- return 0 ;
152-
153- err = f2fs_sync_fs (sb , 1 );
154- return err ;
155- }
156-
157- static int f2fs_unfreeze (struct super_block * sb )
158- {
159- return 0 ;
160- }
161-
162146static int f2fs_statfs (struct dentry * dentry , struct kstatfs * buf )
163147{
164148 struct super_block * sb = dentry -> d_sb ;
@@ -229,8 +213,6 @@ static struct super_operations f2fs_sops = {
229213 .evict_inode = f2fs_evict_inode ,
230214 .put_super = f2fs_put_super ,
231215 .sync_fs = f2fs_sync_fs ,
232- .freeze_fs = f2fs_freeze ,
233- .unfreeze_fs = f2fs_unfreeze ,
234216 .statfs = f2fs_statfs ,
235217};
236218
You can’t perform that action at this time.
0 commit comments