super.c (71af75b6929458d85f63c0649dc26d6f4c19729e) | super.c (4d67490498acb4ffcef5ba7bc44990d46e66a44c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/super.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/module.h> --- 19 unchanged lines hidden (view full) --- 28#include <linux/zstd.h> 29#include <linux/lz4.h> 30 31#include "f2fs.h" 32#include "node.h" 33#include "segment.h" 34#include "xattr.h" 35#include "gc.h" | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/super.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/module.h> --- 19 unchanged lines hidden (view full) --- 28#include <linux/zstd.h> 29#include <linux/lz4.h> 30 31#include "f2fs.h" 32#include "node.h" 33#include "segment.h" 34#include "xattr.h" 35#include "gc.h" |
36#include "iostat.h" |
|
36 37#define CREATE_TRACE_POINTS 38#include <trace/events/f2fs.h> 39 40static struct kmem_cache *f2fs_inode_cachep; 41 42#ifdef CONFIG_F2FS_FAULT_INJECTION 43 --- 7 unchanged lines hidden (view full) --- 51 [FAULT_BLOCK] = "no more block", 52 [FAULT_DIR_DEPTH] = "too big dir depth", 53 [FAULT_EVICT_INODE] = "evict_inode fail", 54 [FAULT_TRUNCATE] = "truncate fail", 55 [FAULT_READ_IO] = "read IO error", 56 [FAULT_CHECKPOINT] = "checkpoint error", 57 [FAULT_DISCARD] = "discard error", 58 [FAULT_WRITE_IO] = "write IO error", | 37 38#define CREATE_TRACE_POINTS 39#include <trace/events/f2fs.h> 40 41static struct kmem_cache *f2fs_inode_cachep; 42 43#ifdef CONFIG_F2FS_FAULT_INJECTION 44 --- 7 unchanged lines hidden (view full) --- 52 [FAULT_BLOCK] = "no more block", 53 [FAULT_DIR_DEPTH] = "too big dir depth", 54 [FAULT_EVICT_INODE] = "evict_inode fail", 55 [FAULT_TRUNCATE] = "truncate fail", 56 [FAULT_READ_IO] = "read IO error", 57 [FAULT_CHECKPOINT] = "checkpoint error", 58 [FAULT_DISCARD] = "discard error", 59 [FAULT_WRITE_IO] = "write IO error", |
60 [FAULT_SLAB_ALLOC] = "slab alloc", |
|
59}; 60 61void f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned int rate, 62 unsigned int type) 63{ 64 struct f2fs_fault_info *ffi = &F2FS_OPTION(sbi).fault_info; 65 66 if (rate) { --- 83 unchanged lines hidden (view full) --- 150 Opt_compress_extension, 151 Opt_nocompress_extension, 152 Opt_compress_chksum, 153 Opt_compress_mode, 154 Opt_compress_cache, 155 Opt_atgc, 156 Opt_gc_merge, 157 Opt_nogc_merge, | 61}; 62 63void f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned int rate, 64 unsigned int type) 65{ 66 struct f2fs_fault_info *ffi = &F2FS_OPTION(sbi).fault_info; 67 68 if (rate) { --- 83 unchanged lines hidden (view full) --- 152 Opt_compress_extension, 153 Opt_nocompress_extension, 154 Opt_compress_chksum, 155 Opt_compress_mode, 156 Opt_compress_cache, 157 Opt_atgc, 158 Opt_gc_merge, 159 Opt_nogc_merge, |
160 Opt_discard_unit, |
|
158 Opt_err, 159}; 160 161static match_table_t f2fs_tokens = { 162 {Opt_gc_background, "background_gc=%s"}, 163 {Opt_disable_roll_forward, "disable_roll_forward"}, 164 {Opt_norecovery, "norecovery"}, 165 {Opt_discard, "discard"}, --- 60 unchanged lines hidden (view full) --- 226 {Opt_compress_extension, "compress_extension=%s"}, 227 {Opt_nocompress_extension, "nocompress_extension=%s"}, 228 {Opt_compress_chksum, "compress_chksum"}, 229 {Opt_compress_mode, "compress_mode=%s"}, 230 {Opt_compress_cache, "compress_cache"}, 231 {Opt_atgc, "atgc"}, 232 {Opt_gc_merge, "gc_merge"}, 233 {Opt_nogc_merge, "nogc_merge"}, | 161 Opt_err, 162}; 163 164static match_table_t f2fs_tokens = { 165 {Opt_gc_background, "background_gc=%s"}, 166 {Opt_disable_roll_forward, "disable_roll_forward"}, 167 {Opt_norecovery, "norecovery"}, 168 {Opt_discard, "discard"}, --- 60 unchanged lines hidden (view full) --- 229 {Opt_compress_extension, "compress_extension=%s"}, 230 {Opt_nocompress_extension, "nocompress_extension=%s"}, 231 {Opt_compress_chksum, "compress_chksum"}, 232 {Opt_compress_mode, "compress_mode=%s"}, 233 {Opt_compress_cache, "compress_cache"}, 234 {Opt_atgc, "atgc"}, 235 {Opt_gc_merge, "gc_merge"}, 236 {Opt_nogc_merge, "nogc_merge"}, |
237 {Opt_discard_unit, "discard_unit=%s"}, |
|
234 {Opt_err, NULL}, 235}; 236 237void f2fs_printk(struct f2fs_sb_info *sbi, const char *fmt, ...) 238{ 239 struct va_format vaf; 240 va_list args; 241 int level; --- 926 unchanged lines hidden (view full) --- 1168 set_opt(sbi, ATGC); 1169 break; 1170 case Opt_gc_merge: 1171 set_opt(sbi, GC_MERGE); 1172 break; 1173 case Opt_nogc_merge: 1174 clear_opt(sbi, GC_MERGE); 1175 break; | 238 {Opt_err, NULL}, 239}; 240 241void f2fs_printk(struct f2fs_sb_info *sbi, const char *fmt, ...) 242{ 243 struct va_format vaf; 244 va_list args; 245 int level; --- 926 unchanged lines hidden (view full) --- 1172 set_opt(sbi, ATGC); 1173 break; 1174 case Opt_gc_merge: 1175 set_opt(sbi, GC_MERGE); 1176 break; 1177 case Opt_nogc_merge: 1178 clear_opt(sbi, GC_MERGE); 1179 break; |
1180 case Opt_discard_unit: 1181 name = match_strdup(&args[0]); 1182 if (!name) 1183 return -ENOMEM; 1184 if (!strcmp(name, "block")) { 1185 F2FS_OPTION(sbi).discard_unit = 1186 DISCARD_UNIT_BLOCK; 1187 } else if (!strcmp(name, "segment")) { 1188 F2FS_OPTION(sbi).discard_unit = 1189 DISCARD_UNIT_SEGMENT; 1190 } else if (!strcmp(name, "section")) { 1191 F2FS_OPTION(sbi).discard_unit = 1192 DISCARD_UNIT_SECTION; 1193 } else { 1194 kfree(name); 1195 return -EINVAL; 1196 } 1197 kfree(name); 1198 break; |
|
1176 default: 1177 f2fs_err(sbi, "Unrecognized mount option \"%s\" or missing value", 1178 p); 1179 return -EINVAL; 1180 } 1181 } 1182default_check: 1183#ifdef CONFIG_QUOTA --- 22 unchanged lines hidden (view full) --- 1206 * devices, but mandatory for host-managed zoned block devices. 1207 */ 1208#ifndef CONFIG_BLK_DEV_ZONED 1209 if (f2fs_sb_has_blkzoned(sbi)) { 1210 f2fs_err(sbi, "Zoned block device support is not enabled"); 1211 return -EINVAL; 1212 } 1213#endif | 1199 default: 1200 f2fs_err(sbi, "Unrecognized mount option \"%s\" or missing value", 1201 p); 1202 return -EINVAL; 1203 } 1204 } 1205default_check: 1206#ifdef CONFIG_QUOTA --- 22 unchanged lines hidden (view full) --- 1229 * devices, but mandatory for host-managed zoned block devices. 1230 */ 1231#ifndef CONFIG_BLK_DEV_ZONED 1232 if (f2fs_sb_has_blkzoned(sbi)) { 1233 f2fs_err(sbi, "Zoned block device support is not enabled"); 1234 return -EINVAL; 1235 } 1236#endif |
1237 if (f2fs_sb_has_blkzoned(sbi)) { 1238 if (F2FS_OPTION(sbi).discard_unit != 1239 DISCARD_UNIT_SECTION) { 1240 f2fs_info(sbi, "Zoned block device doesn't need small discard, set discard_unit=section by default"); 1241 F2FS_OPTION(sbi).discard_unit = 1242 DISCARD_UNIT_SECTION; 1243 } 1244 } |
|
1214 1215#ifdef CONFIG_F2FS_FS_COMPRESSION 1216 if (f2fs_test_compress_extension(sbi)) { 1217 f2fs_err(sbi, "invalid compress or nocompress extension"); 1218 return -EINVAL; 1219 } 1220#endif 1221 --- 44 unchanged lines hidden (view full) --- 1266 } 1267 return 0; 1268} 1269 1270static struct inode *f2fs_alloc_inode(struct super_block *sb) 1271{ 1272 struct f2fs_inode_info *fi; 1273 | 1245 1246#ifdef CONFIG_F2FS_FS_COMPRESSION 1247 if (f2fs_test_compress_extension(sbi)) { 1248 f2fs_err(sbi, "invalid compress or nocompress extension"); 1249 return -EINVAL; 1250 } 1251#endif 1252 --- 44 unchanged lines hidden (view full) --- 1297 } 1298 return 0; 1299} 1300 1301static struct inode *f2fs_alloc_inode(struct super_block *sb) 1302{ 1303 struct f2fs_inode_info *fi; 1304 |
1274 fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_F2FS_ZERO); | 1305 fi = f2fs_kmem_cache_alloc(f2fs_inode_cachep, 1306 GFP_F2FS_ZERO, false, F2FS_SB(sb)); |
1275 if (!fi) 1276 return NULL; 1277 1278 init_once((void *) fi); 1279 1280 /* Initialize f2fs-specific inode info */ 1281 atomic_set(&fi->dirty_pages, 0); 1282 atomic_set(&fi->i_compr_blocks, 0); --- 254 unchanged lines hidden (view full) --- 1537 f2fs_destroy_xattr_caches(sbi); 1538 mempool_destroy(sbi->write_io_dummy); 1539#ifdef CONFIG_QUOTA 1540 for (i = 0; i < MAXQUOTAS; i++) 1541 kfree(F2FS_OPTION(sbi).s_qf_names[i]); 1542#endif 1543 fscrypt_free_dummy_policy(&F2FS_OPTION(sbi).dummy_enc_policy); 1544 destroy_percpu_info(sbi); | 1307 if (!fi) 1308 return NULL; 1309 1310 init_once((void *) fi); 1311 1312 /* Initialize f2fs-specific inode info */ 1313 atomic_set(&fi->dirty_pages, 0); 1314 atomic_set(&fi->i_compr_blocks, 0); --- 254 unchanged lines hidden (view full) --- 1569 f2fs_destroy_xattr_caches(sbi); 1570 mempool_destroy(sbi->write_io_dummy); 1571#ifdef CONFIG_QUOTA 1572 for (i = 0; i < MAXQUOTAS; i++) 1573 kfree(F2FS_OPTION(sbi).s_qf_names[i]); 1574#endif 1575 fscrypt_free_dummy_policy(&F2FS_OPTION(sbi).dummy_enc_policy); 1576 destroy_percpu_info(sbi); |
1577 f2fs_destroy_iostat(sbi); |
|
1545 for (i = 0; i < NR_PAGE_TYPE; i++) 1546 kvfree(sbi->write_io[i]); 1547#ifdef CONFIG_UNICODE 1548 utf8_unload(sb->s_encoding); 1549#endif 1550 kfree(sbi); 1551} 1552 --- 367 unchanged lines hidden (view full) --- 1920 seq_printf(seq, ",fsync_mode=%s", "nobarrier"); 1921 1922#ifdef CONFIG_F2FS_FS_COMPRESSION 1923 f2fs_show_compress_options(seq, sbi->sb); 1924#endif 1925 1926 if (test_opt(sbi, ATGC)) 1927 seq_puts(seq, ",atgc"); | 1578 for (i = 0; i < NR_PAGE_TYPE; i++) 1579 kvfree(sbi->write_io[i]); 1580#ifdef CONFIG_UNICODE 1581 utf8_unload(sb->s_encoding); 1582#endif 1583 kfree(sbi); 1584} 1585 --- 367 unchanged lines hidden (view full) --- 1953 seq_printf(seq, ",fsync_mode=%s", "nobarrier"); 1954 1955#ifdef CONFIG_F2FS_FS_COMPRESSION 1956 f2fs_show_compress_options(seq, sbi->sb); 1957#endif 1958 1959 if (test_opt(sbi, ATGC)) 1960 seq_puts(seq, ",atgc"); |
1961 1962 if (F2FS_OPTION(sbi).discard_unit == DISCARD_UNIT_BLOCK) 1963 seq_printf(seq, ",discard_unit=%s", "block"); 1964 else if (F2FS_OPTION(sbi).discard_unit == DISCARD_UNIT_SEGMENT) 1965 seq_printf(seq, ",discard_unit=%s", "segment"); 1966 else if (F2FS_OPTION(sbi).discard_unit == DISCARD_UNIT_SECTION) 1967 seq_printf(seq, ",discard_unit=%s", "section"); 1968 |
|
1928 return 0; 1929} 1930 1931static void default_options(struct f2fs_sb_info *sbi) 1932{ 1933 /* init some FS parameters */ 1934 if (f2fs_sb_has_readonly(sbi)) 1935 F2FS_OPTION(sbi).active_logs = NR_CURSEG_RO_TYPE; --- 20 unchanged lines hidden (view full) --- 1956 set_opt(sbi, EXTENT_CACHE); 1957 set_opt(sbi, NOHEAP); 1958 clear_opt(sbi, DISABLE_CHECKPOINT); 1959 set_opt(sbi, MERGE_CHECKPOINT); 1960 F2FS_OPTION(sbi).unusable_cap = 0; 1961 sbi->sb->s_flags |= SB_LAZYTIME; 1962 set_opt(sbi, FLUSH_MERGE); 1963 set_opt(sbi, DISCARD); | 1969 return 0; 1970} 1971 1972static void default_options(struct f2fs_sb_info *sbi) 1973{ 1974 /* init some FS parameters */ 1975 if (f2fs_sb_has_readonly(sbi)) 1976 F2FS_OPTION(sbi).active_logs = NR_CURSEG_RO_TYPE; --- 20 unchanged lines hidden (view full) --- 1997 set_opt(sbi, EXTENT_CACHE); 1998 set_opt(sbi, NOHEAP); 1999 clear_opt(sbi, DISABLE_CHECKPOINT); 2000 set_opt(sbi, MERGE_CHECKPOINT); 2001 F2FS_OPTION(sbi).unusable_cap = 0; 2002 sbi->sb->s_flags |= SB_LAZYTIME; 2003 set_opt(sbi, FLUSH_MERGE); 2004 set_opt(sbi, DISCARD); |
1964 if (f2fs_sb_has_blkzoned(sbi)) | 2005 if (f2fs_sb_has_blkzoned(sbi)) { |
1965 F2FS_OPTION(sbi).fs_mode = FS_MODE_LFS; | 2006 F2FS_OPTION(sbi).fs_mode = FS_MODE_LFS; |
1966 else | 2007 F2FS_OPTION(sbi).discard_unit = DISCARD_UNIT_SECTION; 2008 } else { |
1967 F2FS_OPTION(sbi).fs_mode = FS_MODE_ADAPTIVE; | 2009 F2FS_OPTION(sbi).fs_mode = FS_MODE_ADAPTIVE; |
2010 F2FS_OPTION(sbi).discard_unit = DISCARD_UNIT_BLOCK; 2011 } |
|
1968 1969#ifdef CONFIG_F2FS_FS_XATTR 1970 set_opt(sbi, XATTR_USER); 1971#endif 1972#ifdef CONFIG_F2FS_FS_POSIX_ACL 1973 set_opt(sbi, POSIX_ACL); 1974#endif 1975 --- 80 unchanged lines hidden (view full) --- 2056{ 2057 struct f2fs_sb_info *sbi = F2FS_SB(sb); 2058 struct f2fs_mount_info org_mount_opt; 2059 unsigned long old_sb_flags; 2060 int err; 2061 bool need_restart_gc = false, need_stop_gc = false; 2062 bool need_restart_ckpt = false, need_stop_ckpt = false; 2063 bool need_restart_flush = false, need_stop_flush = false; | 2012 2013#ifdef CONFIG_F2FS_FS_XATTR 2014 set_opt(sbi, XATTR_USER); 2015#endif 2016#ifdef CONFIG_F2FS_FS_POSIX_ACL 2017 set_opt(sbi, POSIX_ACL); 2018#endif 2019 --- 80 unchanged lines hidden (view full) --- 2100{ 2101 struct f2fs_sb_info *sbi = F2FS_SB(sb); 2102 struct f2fs_mount_info org_mount_opt; 2103 unsigned long old_sb_flags; 2104 int err; 2105 bool need_restart_gc = false, need_stop_gc = false; 2106 bool need_restart_ckpt = false, need_stop_ckpt = false; 2107 bool need_restart_flush = false, need_stop_flush = false; |
2108 bool need_restart_discard = false, need_stop_discard = false; |
|
2064 bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); | 2109 bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); |
2065 bool disable_checkpoint = test_opt(sbi, DISABLE_CHECKPOINT); | 2110 bool enable_checkpoint = !test_opt(sbi, DISABLE_CHECKPOINT); |
2066 bool no_io_align = !F2FS_IO_ALIGNED(sbi); 2067 bool no_atgc = !test_opt(sbi, ATGC); | 2111 bool no_io_align = !F2FS_IO_ALIGNED(sbi); 2112 bool no_atgc = !test_opt(sbi, ATGC); |
2113 bool no_discard = !test_opt(sbi, DISCARD); |
|
2068 bool no_compress_cache = !test_opt(sbi, COMPRESS_CACHE); | 2114 bool no_compress_cache = !test_opt(sbi, COMPRESS_CACHE); |
2069 bool checkpoint_changed; | 2115 bool block_unit_discard = f2fs_block_unit_discard(sbi); 2116 struct discard_cmd_control *dcc; |
2070#ifdef CONFIG_QUOTA 2071 int i, j; 2072#endif 2073 2074 /* 2075 * Save the old mount options in case we 2076 * need to restore them. 2077 */ --- 28 unchanged lines hidden (view full) --- 2106 } 2107 2108 default_options(sbi); 2109 2110 /* parse mount options */ 2111 err = parse_options(sb, data, true); 2112 if (err) 2113 goto restore_opts; | 2117#ifdef CONFIG_QUOTA 2118 int i, j; 2119#endif 2120 2121 /* 2122 * Save the old mount options in case we 2123 * need to restore them. 2124 */ --- 28 unchanged lines hidden (view full) --- 2153 } 2154 2155 default_options(sbi); 2156 2157 /* parse mount options */ 2158 err = parse_options(sb, data, true); 2159 if (err) 2160 goto restore_opts; |
2114 checkpoint_changed = 2115 disable_checkpoint != test_opt(sbi, DISABLE_CHECKPOINT); | |
2116 2117 /* 2118 * Previous and new state of filesystem is RO, 2119 * so skip checking GC and FLUSH_MERGE conditions. 2120 */ 2121 if (f2fs_readonly(sb) && (*flags & SB_RDONLY)) 2122 goto skip; 2123 --- 40 unchanged lines hidden (view full) --- 2164 } 2165 2166 if (no_compress_cache == !!test_opt(sbi, COMPRESS_CACHE)) { 2167 err = -EINVAL; 2168 f2fs_warn(sbi, "switch compress_cache option is not allowed"); 2169 goto restore_opts; 2170 } 2171 | 2161 2162 /* 2163 * Previous and new state of filesystem is RO, 2164 * so skip checking GC and FLUSH_MERGE conditions. 2165 */ 2166 if (f2fs_readonly(sb) && (*flags & SB_RDONLY)) 2167 goto skip; 2168 --- 40 unchanged lines hidden (view full) --- 2209 } 2210 2211 if (no_compress_cache == !!test_opt(sbi, COMPRESS_CACHE)) { 2212 err = -EINVAL; 2213 f2fs_warn(sbi, "switch compress_cache option is not allowed"); 2214 goto restore_opts; 2215 } 2216 |
2217 if (block_unit_discard != f2fs_block_unit_discard(sbi)) { 2218 err = -EINVAL; 2219 f2fs_warn(sbi, "switch discard_unit option is not allowed"); 2220 goto restore_opts; 2221 } 2222 |
|
2172 if ((*flags & SB_RDONLY) && test_opt(sbi, DISABLE_CHECKPOINT)) { 2173 err = -EINVAL; 2174 f2fs_warn(sbi, "disabling checkpoint not compatible with read-only"); 2175 goto restore_opts; 2176 } 2177 2178 /* 2179 * We stop the GC thread if FS is mounted as RO --- 49 unchanged lines hidden (view full) --- 2229 need_restart_flush = true; 2230 } else { 2231 err = f2fs_create_flush_cmd_control(sbi); 2232 if (err) 2233 goto restore_ckpt; 2234 need_stop_flush = true; 2235 } 2236 | 2223 if ((*flags & SB_RDONLY) && test_opt(sbi, DISABLE_CHECKPOINT)) { 2224 err = -EINVAL; 2225 f2fs_warn(sbi, "disabling checkpoint not compatible with read-only"); 2226 goto restore_opts; 2227 } 2228 2229 /* 2230 * We stop the GC thread if FS is mounted as RO --- 49 unchanged lines hidden (view full) --- 2280 need_restart_flush = true; 2281 } else { 2282 err = f2fs_create_flush_cmd_control(sbi); 2283 if (err) 2284 goto restore_ckpt; 2285 need_stop_flush = true; 2286 } 2287 |
2237 if (checkpoint_changed) { | 2288 if (no_discard == !!test_opt(sbi, DISCARD)) { 2289 if (test_opt(sbi, DISCARD)) { 2290 err = f2fs_start_discard_thread(sbi); 2291 if (err) 2292 goto restore_flush; 2293 need_stop_discard = true; 2294 } else { 2295 dcc = SM_I(sbi)->dcc_info; 2296 f2fs_stop_discard_thread(sbi); 2297 if (atomic_read(&dcc->discard_cmd_cnt)) 2298 f2fs_issue_discard_timeout(sbi); 2299 need_restart_discard = true; 2300 } 2301 } 2302 2303 if (enable_checkpoint == !!test_opt(sbi, DISABLE_CHECKPOINT)) { |
2238 if (test_opt(sbi, DISABLE_CHECKPOINT)) { 2239 err = f2fs_disable_checkpoint(sbi); 2240 if (err) | 2304 if (test_opt(sbi, DISABLE_CHECKPOINT)) { 2305 err = f2fs_disable_checkpoint(sbi); 2306 if (err) |
2241 goto restore_flush; | 2307 goto restore_discard; |
2242 } else { 2243 f2fs_enable_checkpoint(sbi); 2244 } 2245 } 2246 2247skip: 2248#ifdef CONFIG_QUOTA 2249 /* Release old quota file names */ 2250 for (i = 0; i < MAXQUOTAS; i++) 2251 kfree(org_mount_opt.s_qf_names[i]); 2252#endif 2253 /* Update the POSIXACL Flag */ 2254 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 2255 (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0); 2256 2257 limit_reserve_root(sbi); 2258 adjust_unusable_cap_perc(sbi); 2259 *flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME); 2260 return 0; | 2308 } else { 2309 f2fs_enable_checkpoint(sbi); 2310 } 2311 } 2312 2313skip: 2314#ifdef CONFIG_QUOTA 2315 /* Release old quota file names */ 2316 for (i = 0; i < MAXQUOTAS; i++) 2317 kfree(org_mount_opt.s_qf_names[i]); 2318#endif 2319 /* Update the POSIXACL Flag */ 2320 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 2321 (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0); 2322 2323 limit_reserve_root(sbi); 2324 adjust_unusable_cap_perc(sbi); 2325 *flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME); 2326 return 0; |
2327restore_discard: 2328 if (need_restart_discard) { 2329 if (f2fs_start_discard_thread(sbi)) 2330 f2fs_warn(sbi, "discard has been stopped"); 2331 } else if (need_stop_discard) { 2332 f2fs_stop_discard_thread(sbi); 2333 } |
|
2261restore_flush: 2262 if (need_restart_flush) { 2263 if (f2fs_create_flush_cmd_control(sbi)) 2264 f2fs_warn(sbi, "background flush thread has stopped"); 2265 } else if (need_stop_flush) { 2266 clear_opt(sbi, FLUSH_MERGE); 2267 f2fs_destroy_flush_cmd_control(sbi, false); 2268 } --- 244 unchanged lines hidden (view full) --- 2513 SBI_QUOTA_NEED_REPAIR); 2514 return err; 2515 } 2516 } 2517 } 2518 return 0; 2519} 2520 | 2334restore_flush: 2335 if (need_restart_flush) { 2336 if (f2fs_create_flush_cmd_control(sbi)) 2337 f2fs_warn(sbi, "background flush thread has stopped"); 2338 } else if (need_stop_flush) { 2339 clear_opt(sbi, FLUSH_MERGE); 2340 f2fs_destroy_flush_cmd_control(sbi, false); 2341 } --- 244 unchanged lines hidden (view full) --- 2586 SBI_QUOTA_NEED_REPAIR); 2587 return err; 2588 } 2589 } 2590 } 2591 return 0; 2592} 2593 |
2594static int f2fs_quota_sync_file(struct f2fs_sb_info *sbi, int type) 2595{ 2596 struct quota_info *dqopt = sb_dqopt(sbi->sb); 2597 struct address_space *mapping = dqopt->files[type]->i_mapping; 2598 int ret = 0; 2599 2600 ret = dquot_writeback_dquots(sbi->sb, type); 2601 if (ret) 2602 goto out; 2603 2604 ret = filemap_fdatawrite(mapping); 2605 if (ret) 2606 goto out; 2607 2608 /* if we are using journalled quota */ 2609 if (is_journalled_quota(sbi)) 2610 goto out; 2611 2612 ret = filemap_fdatawait(mapping); 2613 2614 truncate_inode_pages(&dqopt->files[type]->i_data, 0); 2615out: 2616 if (ret) 2617 set_sbi_flag(sbi, SBI_QUOTA_NEED_REPAIR); 2618 return ret; 2619} 2620 |
|
2521int f2fs_quota_sync(struct super_block *sb, int type) 2522{ 2523 struct f2fs_sb_info *sbi = F2FS_SB(sb); 2524 struct quota_info *dqopt = sb_dqopt(sb); 2525 int cnt; 2526 int ret; 2527 2528 /* | 2621int f2fs_quota_sync(struct super_block *sb, int type) 2622{ 2623 struct f2fs_sb_info *sbi = F2FS_SB(sb); 2624 struct quota_info *dqopt = sb_dqopt(sb); 2625 int cnt; 2626 int ret; 2627 2628 /* |
2529 * do_quotactl 2530 * f2fs_quota_sync 2531 * down_read(quota_sem) 2532 * dquot_writeback_dquots() 2533 * f2fs_dquot_commit 2534 * block_operation 2535 * down_read(quota_sem) 2536 */ 2537 f2fs_lock_op(sbi); 2538 2539 down_read(&sbi->quota_sem); 2540 ret = dquot_writeback_dquots(sb, type); 2541 if (ret) 2542 goto out; 2543 2544 /* | |
2545 * Now when everything is written we can discard the pagecache so 2546 * that userspace sees the changes. 2547 */ 2548 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 2629 * Now when everything is written we can discard the pagecache so 2630 * that userspace sees the changes. 2631 */ 2632 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { |
2549 struct address_space *mapping; | |
2550 2551 if (type != -1 && cnt != type) 2552 continue; | 2633 2634 if (type != -1 && cnt != type) 2635 continue; |
2553 if (!sb_has_quota_active(sb, cnt)) 2554 continue; | |
2555 | 2636 |
2556 mapping = dqopt->files[cnt]->i_mapping; | 2637 if (!sb_has_quota_active(sb, type)) 2638 return 0; |
2557 | 2639 |
2558 ret = filemap_fdatawrite(mapping); 2559 if (ret) 2560 goto out; | 2640 inode_lock(dqopt->files[cnt]); |
2561 | 2641 |
2562 /* if we are using journalled quota */ 2563 if (is_journalled_quota(sbi)) 2564 continue; | 2642 /* 2643 * do_quotactl 2644 * f2fs_quota_sync 2645 * down_read(quota_sem) 2646 * dquot_writeback_dquots() 2647 * f2fs_dquot_commit 2648 * block_operation 2649 * down_read(quota_sem) 2650 */ 2651 f2fs_lock_op(sbi); 2652 down_read(&sbi->quota_sem); |
2565 | 2653 |
2566 ret = filemap_fdatawait(mapping); 2567 if (ret) 2568 set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR); | 2654 ret = f2fs_quota_sync_file(sbi, cnt); |
2569 | 2655 |
2570 inode_lock(dqopt->files[cnt]); 2571 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0); | 2656 up_read(&sbi->quota_sem); 2657 f2fs_unlock_op(sbi); 2658 |
2572 inode_unlock(dqopt->files[cnt]); | 2659 inode_unlock(dqopt->files[cnt]); |
2660 2661 if (ret) 2662 break; |
|
2573 } | 2663 } |
2574out: 2575 if (ret) 2576 set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR); 2577 up_read(&sbi->quota_sem); 2578 f2fs_unlock_op(sbi); | |
2579 return ret; 2580} 2581 2582static int f2fs_quota_on(struct super_block *sb, int type, int format_id, 2583 const struct path *path) 2584{ 2585 struct inode *inode; 2586 int err; --- 616 unchanged lines hidden (view full) --- 3203 raw_super->hot_ext_count) > F2FS_MAX_EXTENSION) { 3204 f2fs_info(sbi, "Corrupted extension count (%u + %u > %u)", 3205 le32_to_cpu(raw_super->extension_count), 3206 raw_super->hot_ext_count, 3207 F2FS_MAX_EXTENSION); 3208 return -EFSCORRUPTED; 3209 } 3210 | 2664 return ret; 2665} 2666 2667static int f2fs_quota_on(struct super_block *sb, int type, int format_id, 2668 const struct path *path) 2669{ 2670 struct inode *inode; 2671 int err; --- 616 unchanged lines hidden (view full) --- 3288 raw_super->hot_ext_count) > F2FS_MAX_EXTENSION) { 3289 f2fs_info(sbi, "Corrupted extension count (%u + %u > %u)", 3290 le32_to_cpu(raw_super->extension_count), 3291 raw_super->hot_ext_count, 3292 F2FS_MAX_EXTENSION); 3293 return -EFSCORRUPTED; 3294 } 3295 |
3211 if (le32_to_cpu(raw_super->cp_payload) > 3212 (blocks_per_seg - F2FS_CP_PACKS)) { 3213 f2fs_info(sbi, "Insane cp_payload (%u > %u)", | 3296 if (le32_to_cpu(raw_super->cp_payload) >= 3297 (blocks_per_seg - F2FS_CP_PACKS - 3298 NR_CURSEG_PERSIST_TYPE)) { 3299 f2fs_info(sbi, "Insane cp_payload (%u >= %u)", |
3214 le32_to_cpu(raw_super->cp_payload), | 3300 le32_to_cpu(raw_super->cp_payload), |
3215 blocks_per_seg - F2FS_CP_PACKS); | 3301 blocks_per_seg - F2FS_CP_PACKS - 3302 NR_CURSEG_PERSIST_TYPE); |
3216 return -EFSCORRUPTED; 3217 } 3218 3219 /* check reserved ino info */ 3220 if (le32_to_cpu(raw_super->node_ino) != 1 || 3221 le32_to_cpu(raw_super->meta_ino) != 2 || 3222 le32_to_cpu(raw_super->root_ino) != 3) { 3223 f2fs_info(sbi, "Invalid Fs Meta Ino: node(%u) meta(%u) root(%u)", --- 19 unchanged lines hidden (view full) --- 3243 unsigned int main_segs, blocks_per_seg; 3244 unsigned int sit_segs, nat_segs; 3245 unsigned int sit_bitmap_size, nat_bitmap_size; 3246 unsigned int log_blocks_per_seg; 3247 unsigned int segment_count_main; 3248 unsigned int cp_pack_start_sum, cp_payload; 3249 block_t user_block_count, valid_user_blocks; 3250 block_t avail_node_count, valid_node_count; | 3303 return -EFSCORRUPTED; 3304 } 3305 3306 /* check reserved ino info */ 3307 if (le32_to_cpu(raw_super->node_ino) != 1 || 3308 le32_to_cpu(raw_super->meta_ino) != 2 || 3309 le32_to_cpu(raw_super->root_ino) != 3) { 3310 f2fs_info(sbi, "Invalid Fs Meta Ino: node(%u) meta(%u) root(%u)", --- 19 unchanged lines hidden (view full) --- 3330 unsigned int main_segs, blocks_per_seg; 3331 unsigned int sit_segs, nat_segs; 3332 unsigned int sit_bitmap_size, nat_bitmap_size; 3333 unsigned int log_blocks_per_seg; 3334 unsigned int segment_count_main; 3335 unsigned int cp_pack_start_sum, cp_payload; 3336 block_t user_block_count, valid_user_blocks; 3337 block_t avail_node_count, valid_node_count; |
3338 unsigned int nat_blocks, nat_bits_bytes, nat_bits_blocks; |
|
3251 int i, j; 3252 3253 total = le32_to_cpu(raw_super->segment_count); 3254 fsmeta = le32_to_cpu(raw_super->segment_count_ckpt); 3255 sit_segs = le32_to_cpu(raw_super->segment_count_sit); 3256 fsmeta += sit_segs; 3257 nat_segs = le32_to_cpu(raw_super->segment_count_nat); 3258 fsmeta += nat_segs; --- 114 unchanged lines hidden (view full) --- 3373 le32_to_cpu(ckpt->checksum_offset) != CP_MIN_CHKSUM_OFFSET) { 3374 f2fs_warn(sbi, "using deprecated layout of large_nat_bitmap, " 3375 "please run fsck v1.13.0 or higher to repair, chksum_offset: %u, " 3376 "fixed with patch: \"f2fs-tools: relocate chksum_offset for large_nat_bitmap feature\"", 3377 le32_to_cpu(ckpt->checksum_offset)); 3378 return 1; 3379 } 3380 | 3339 int i, j; 3340 3341 total = le32_to_cpu(raw_super->segment_count); 3342 fsmeta = le32_to_cpu(raw_super->segment_count_ckpt); 3343 sit_segs = le32_to_cpu(raw_super->segment_count_sit); 3344 fsmeta += sit_segs; 3345 nat_segs = le32_to_cpu(raw_super->segment_count_nat); 3346 fsmeta += nat_segs; --- 114 unchanged lines hidden (view full) --- 3461 le32_to_cpu(ckpt->checksum_offset) != CP_MIN_CHKSUM_OFFSET) { 3462 f2fs_warn(sbi, "using deprecated layout of large_nat_bitmap, " 3463 "please run fsck v1.13.0 or higher to repair, chksum_offset: %u, " 3464 "fixed with patch: \"f2fs-tools: relocate chksum_offset for large_nat_bitmap feature\"", 3465 le32_to_cpu(ckpt->checksum_offset)); 3466 return 1; 3467 } 3468 |
3469 nat_blocks = nat_segs << log_blocks_per_seg; 3470 nat_bits_bytes = nat_blocks / BITS_PER_BYTE; 3471 nat_bits_blocks = F2FS_BLK_ALIGN((nat_bits_bytes << 1) + 8); 3472 if (__is_set_ckpt_flags(ckpt, CP_NAT_BITS_FLAG) && 3473 (cp_payload + F2FS_CP_PACKS + 3474 NR_CURSEG_PERSIST_TYPE + nat_bits_blocks >= blocks_per_seg)) { 3475 f2fs_warn(sbi, "Insane cp_payload: %u, nat_bits_blocks: %u)", 3476 cp_payload, nat_bits_blocks); 3477 return -EFSCORRUPTED; 3478 } 3479 |
|
3381 if (unlikely(f2fs_cp_error(sbi))) { 3382 f2fs_err(sbi, "A bug case: need to run fsck"); 3383 return 1; 3384 } 3385 return 0; 3386} 3387 3388static void init_sb_info(struct f2fs_sb_info *sbi) --- 16 unchanged lines hidden (view full) --- 3405 F2FS_ROOT_INO(sbi) = le32_to_cpu(raw_super->root_ino); 3406 F2FS_NODE_INO(sbi) = le32_to_cpu(raw_super->node_ino); 3407 F2FS_META_INO(sbi) = le32_to_cpu(raw_super->meta_ino); 3408 sbi->cur_victim_sec = NULL_SECNO; 3409 sbi->next_victim_seg[BG_GC] = NULL_SEGNO; 3410 sbi->next_victim_seg[FG_GC] = NULL_SEGNO; 3411 sbi->max_victim_search = DEF_MAX_VICTIM_SEARCH; 3412 sbi->migration_granularity = sbi->segs_per_sec; | 3480 if (unlikely(f2fs_cp_error(sbi))) { 3481 f2fs_err(sbi, "A bug case: need to run fsck"); 3482 return 1; 3483 } 3484 return 0; 3485} 3486 3487static void init_sb_info(struct f2fs_sb_info *sbi) --- 16 unchanged lines hidden (view full) --- 3504 F2FS_ROOT_INO(sbi) = le32_to_cpu(raw_super->root_ino); 3505 F2FS_NODE_INO(sbi) = le32_to_cpu(raw_super->node_ino); 3506 F2FS_META_INO(sbi) = le32_to_cpu(raw_super->meta_ino); 3507 sbi->cur_victim_sec = NULL_SECNO; 3508 sbi->next_victim_seg[BG_GC] = NULL_SEGNO; 3509 sbi->next_victim_seg[FG_GC] = NULL_SEGNO; 3510 sbi->max_victim_search = DEF_MAX_VICTIM_SEARCH; 3511 sbi->migration_granularity = sbi->segs_per_sec; |
3512 sbi->seq_file_ra_mul = MIN_RA_MUL; |
|
3413 3414 sbi->dir_level = DEF_DIR_LEVEL; 3415 sbi->interval_time[CP_TIME] = DEF_CP_INTERVAL; 3416 sbi->interval_time[REQ_TIME] = DEF_IDLE_INTERVAL; 3417 sbi->interval_time[DISCARD_TIME] = DEF_IDLE_INTERVAL; 3418 sbi->interval_time[GC_TIME] = DEF_IDLE_INTERVAL; 3419 sbi->interval_time[DISABLE_TIME] = DEF_DISABLE_INTERVAL; 3420 sbi->interval_time[UMOUNT_DISCARD_TIMEOUT] = --- 343 unchanged lines hidden (view full) --- 3764 3765static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) 3766{ 3767 struct f2fs_sm_info *sm_i = SM_I(sbi); 3768 3769 /* adjust parameters according to the volume size */ 3770 if (sm_i->main_segments <= SMALL_VOLUME_SEGMENTS) { 3771 F2FS_OPTION(sbi).alloc_mode = ALLOC_MODE_REUSE; | 3513 3514 sbi->dir_level = DEF_DIR_LEVEL; 3515 sbi->interval_time[CP_TIME] = DEF_CP_INTERVAL; 3516 sbi->interval_time[REQ_TIME] = DEF_IDLE_INTERVAL; 3517 sbi->interval_time[DISCARD_TIME] = DEF_IDLE_INTERVAL; 3518 sbi->interval_time[GC_TIME] = DEF_IDLE_INTERVAL; 3519 sbi->interval_time[DISABLE_TIME] = DEF_DISABLE_INTERVAL; 3520 sbi->interval_time[UMOUNT_DISCARD_TIMEOUT] = --- 343 unchanged lines hidden (view full) --- 3864 3865static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) 3866{ 3867 struct f2fs_sm_info *sm_i = SM_I(sbi); 3868 3869 /* adjust parameters according to the volume size */ 3870 if (sm_i->main_segments <= SMALL_VOLUME_SEGMENTS) { 3871 F2FS_OPTION(sbi).alloc_mode = ALLOC_MODE_REUSE; |
3772 sm_i->dcc_info->discard_granularity = 1; | 3872 if (f2fs_block_unit_discard(sbi)) 3873 sm_i->dcc_info->discard_granularity = 1; |
3773 sm_i->ipu_policy = 1 << F2FS_IPU_FORCE; 3774 } 3775 3776 sbi->readdir_ra = 1; 3777} 3778 3779static int f2fs_fill_super(struct super_block *sb, void *data, int silent) 3780{ --- 104 unchanged lines hidden (view full) --- 3885 init_rwsem(&sbi->cp_global_sem); 3886 init_rwsem(&sbi->node_write); 3887 init_rwsem(&sbi->node_change); 3888 3889 /* disallow all the data/node/meta page writes */ 3890 set_sbi_flag(sbi, SBI_POR_DOING); 3891 spin_lock_init(&sbi->stat_lock); 3892 | 3874 sm_i->ipu_policy = 1 << F2FS_IPU_FORCE; 3875 } 3876 3877 sbi->readdir_ra = 1; 3878} 3879 3880static int f2fs_fill_super(struct super_block *sb, void *data, int silent) 3881{ --- 104 unchanged lines hidden (view full) --- 3986 init_rwsem(&sbi->cp_global_sem); 3987 init_rwsem(&sbi->node_write); 3988 init_rwsem(&sbi->node_change); 3989 3990 /* disallow all the data/node/meta page writes */ 3991 set_sbi_flag(sbi, SBI_POR_DOING); 3992 spin_lock_init(&sbi->stat_lock); 3993 |
3893 /* init iostat info */ 3894 spin_lock_init(&sbi->iostat_lock); 3895 sbi->iostat_enable = false; 3896 sbi->iostat_period_ms = DEFAULT_IOSTAT_PERIOD_MS; 3897 | |
3898 for (i = 0; i < NR_PAGE_TYPE; i++) { 3899 int n = (i == META) ? 1 : NR_TEMP_TYPE; 3900 int j; 3901 3902 sbi->write_io[i] = 3903 f2fs_kmalloc(sbi, 3904 array_size(n, 3905 sizeof(struct f2fs_bio_info)), --- 14 unchanged lines hidden (view full) --- 3920 } 3921 } 3922 3923 init_rwsem(&sbi->cp_rwsem); 3924 init_rwsem(&sbi->quota_sem); 3925 init_waitqueue_head(&sbi->cp_wait); 3926 init_sb_info(sbi); 3927 | 3994 for (i = 0; i < NR_PAGE_TYPE; i++) { 3995 int n = (i == META) ? 1 : NR_TEMP_TYPE; 3996 int j; 3997 3998 sbi->write_io[i] = 3999 f2fs_kmalloc(sbi, 4000 array_size(n, 4001 sizeof(struct f2fs_bio_info)), --- 14 unchanged lines hidden (view full) --- 4016 } 4017 } 4018 4019 init_rwsem(&sbi->cp_rwsem); 4020 init_rwsem(&sbi->quota_sem); 4021 init_waitqueue_head(&sbi->cp_wait); 4022 init_sb_info(sbi); 4023 |
3928 err = init_percpu_info(sbi); | 4024 err = f2fs_init_iostat(sbi); |
3929 if (err) 3930 goto free_bio_info; 3931 | 4025 if (err) 4026 goto free_bio_info; 4027 |
4028 err = init_percpu_info(sbi); 4029 if (err) 4030 goto free_iostat; 4031 |
|
3932 if (F2FS_IO_ALIGNED(sbi)) { 3933 sbi->write_io_dummy = 3934 mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0); 3935 if (!sbi->write_io_dummy) { 3936 err = -ENOMEM; 3937 goto free_percpu; 3938 } 3939 } --- 315 unchanged lines hidden (view full) --- 4255free_page_array_cache: 4256 f2fs_destroy_page_array_cache(sbi); 4257free_xattr_cache: 4258 f2fs_destroy_xattr_caches(sbi); 4259free_io_dummy: 4260 mempool_destroy(sbi->write_io_dummy); 4261free_percpu: 4262 destroy_percpu_info(sbi); | 4032 if (F2FS_IO_ALIGNED(sbi)) { 4033 sbi->write_io_dummy = 4034 mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0); 4035 if (!sbi->write_io_dummy) { 4036 err = -ENOMEM; 4037 goto free_percpu; 4038 } 4039 } --- 315 unchanged lines hidden (view full) --- 4355free_page_array_cache: 4356 f2fs_destroy_page_array_cache(sbi); 4357free_xattr_cache: 4358 f2fs_destroy_xattr_caches(sbi); 4359free_io_dummy: 4360 mempool_destroy(sbi->write_io_dummy); 4361free_percpu: 4362 destroy_percpu_info(sbi); |
4363free_iostat: 4364 f2fs_destroy_iostat(sbi); |
|
4263free_bio_info: 4264 for (i = 0; i < NR_PAGE_TYPE; i++) 4265 kvfree(sbi->write_io[i]); 4266 4267#ifdef CONFIG_UNICODE 4268 utf8_unload(sb->s_encoding); 4269 sb->s_encoding = NULL; 4270#endif --- 126 unchanged lines hidden (view full) --- 4397 goto free_sysfs; 4398 err = register_filesystem(&f2fs_fs_type); 4399 if (err) 4400 goto free_shrinker; 4401 f2fs_create_root_stats(); 4402 err = f2fs_init_post_read_processing(); 4403 if (err) 4404 goto free_root_stats; | 4365free_bio_info: 4366 for (i = 0; i < NR_PAGE_TYPE; i++) 4367 kvfree(sbi->write_io[i]); 4368 4369#ifdef CONFIG_UNICODE 4370 utf8_unload(sb->s_encoding); 4371 sb->s_encoding = NULL; 4372#endif --- 126 unchanged lines hidden (view full) --- 4499 goto free_sysfs; 4500 err = register_filesystem(&f2fs_fs_type); 4501 if (err) 4502 goto free_shrinker; 4503 f2fs_create_root_stats(); 4504 err = f2fs_init_post_read_processing(); 4505 if (err) 4506 goto free_root_stats; |
4405 err = f2fs_init_bio_entry_cache(); | 4507 err = f2fs_init_iostat_processing(); |
4406 if (err) 4407 goto free_post_read; | 4508 if (err) 4509 goto free_post_read; |
4510 err = f2fs_init_bio_entry_cache(); 4511 if (err) 4512 goto free_iostat; |
|
4408 err = f2fs_init_bioset(); 4409 if (err) 4410 goto free_bio_enrty_cache; 4411 err = f2fs_init_compress_mempool(); 4412 if (err) 4413 goto free_bioset; 4414 err = f2fs_init_compress_cache(); 4415 if (err) --- 5 unchanged lines hidden (view full) --- 4421free_compress_cache: 4422 f2fs_destroy_compress_cache(); 4423free_compress_mempool: 4424 f2fs_destroy_compress_mempool(); 4425free_bioset: 4426 f2fs_destroy_bioset(); 4427free_bio_enrty_cache: 4428 f2fs_destroy_bio_entry_cache(); | 4513 err = f2fs_init_bioset(); 4514 if (err) 4515 goto free_bio_enrty_cache; 4516 err = f2fs_init_compress_mempool(); 4517 if (err) 4518 goto free_bioset; 4519 err = f2fs_init_compress_cache(); 4520 if (err) --- 5 unchanged lines hidden (view full) --- 4526free_compress_cache: 4527 f2fs_destroy_compress_cache(); 4528free_compress_mempool: 4529 f2fs_destroy_compress_mempool(); 4530free_bioset: 4531 f2fs_destroy_bioset(); 4532free_bio_enrty_cache: 4533 f2fs_destroy_bio_entry_cache(); |
4534free_iostat: 4535 f2fs_destroy_iostat_processing(); |
|
4429free_post_read: 4430 f2fs_destroy_post_read_processing(); 4431free_root_stats: 4432 f2fs_destroy_root_stats(); 4433 unregister_filesystem(&f2fs_fs_type); 4434free_shrinker: 4435 unregister_shrinker(&f2fs_shrinker_info); 4436free_sysfs: --- 18 unchanged lines hidden (view full) --- 4455 4456static void __exit exit_f2fs_fs(void) 4457{ 4458 f2fs_destroy_casefold_cache(); 4459 f2fs_destroy_compress_cache(); 4460 f2fs_destroy_compress_mempool(); 4461 f2fs_destroy_bioset(); 4462 f2fs_destroy_bio_entry_cache(); | 4536free_post_read: 4537 f2fs_destroy_post_read_processing(); 4538free_root_stats: 4539 f2fs_destroy_root_stats(); 4540 unregister_filesystem(&f2fs_fs_type); 4541free_shrinker: 4542 unregister_shrinker(&f2fs_shrinker_info); 4543free_sysfs: --- 18 unchanged lines hidden (view full) --- 4562 4563static void __exit exit_f2fs_fs(void) 4564{ 4565 f2fs_destroy_casefold_cache(); 4566 f2fs_destroy_compress_cache(); 4567 f2fs_destroy_compress_mempool(); 4568 f2fs_destroy_bioset(); 4569 f2fs_destroy_bio_entry_cache(); |
4570 f2fs_destroy_iostat_processing(); |
|
4463 f2fs_destroy_post_read_processing(); 4464 f2fs_destroy_root_stats(); 4465 unregister_filesystem(&f2fs_fs_type); 4466 unregister_shrinker(&f2fs_shrinker_info); 4467 f2fs_exit_sysfs(); 4468 f2fs_destroy_garbage_collection_cache(); 4469 f2fs_destroy_extent_cache(); 4470 f2fs_destroy_recovery_cache(); --- 14 unchanged lines hidden --- | 4571 f2fs_destroy_post_read_processing(); 4572 f2fs_destroy_root_stats(); 4573 unregister_filesystem(&f2fs_fs_type); 4574 unregister_shrinker(&f2fs_shrinker_info); 4575 f2fs_exit_sysfs(); 4576 f2fs_destroy_garbage_collection_cache(); 4577 f2fs_destroy_extent_cache(); 4578 f2fs_destroy_recovery_cache(); --- 14 unchanged lines hidden --- |