hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/fs/f2fs/node.h
....@@ -38,6 +38,9 @@
3838 /* return value for read_node_page */
3939 #define LOCKED_PAGE 1
4040
41
+/* check pinned file's alignment status of physical blocks */
42
+#define FILE_NOT_ALIGNED 1
43
+
4144 /* For flag in struct node_info */
4245 enum {
4346 IS_CHECKPOINTED, /* is it checkpointed before? */
....@@ -126,13 +129,13 @@
126129
127130 static inline bool excess_dirty_nats(struct f2fs_sb_info *sbi)
128131 {
129
- return NM_I(sbi)->dirty_nat_cnt >= NM_I(sbi)->max_nid *
132
+ return NM_I(sbi)->nat_cnt[DIRTY_NAT] >= NM_I(sbi)->max_nid *
130133 NM_I(sbi)->dirty_nats_ratio / 100;
131134 }
132135
133136 static inline bool excess_cached_nats(struct f2fs_sb_info *sbi)
134137 {
135
- return NM_I(sbi)->nat_cnt >= DEF_NAT_CACHE_THRESHOLD;
138
+ return NM_I(sbi)->nat_cnt[TOTAL_NAT] >= DEF_NAT_CACHE_THRESHOLD;
136139 }
137140
138141 static inline bool excess_dirty_nodes(struct f2fs_sb_info *sbi)
....@@ -145,8 +148,11 @@
145148 NAT_ENTRIES, /* indicates the cached nat entry */
146149 DIRTY_DENTS, /* indicates dirty dentry pages */
147150 INO_ENTRIES, /* indicates inode entries */
148
- EXTENT_CACHE, /* indicates extent cache */
151
+ READ_EXTENT_CACHE, /* indicates read extent cache */
152
+ AGE_EXTENT_CACHE, /* indicates age extent cache */
149153 INMEM_PAGES, /* indicates inmemory pages */
154
+ DISCARD_CACHE, /* indicates memory of cached discard cmds */
155
+ COMPRESS_PAGE, /* indicates memory of cached compressed pages */
150156 BASE_CHECK, /* check kernel status */
151157 };
152158
....@@ -388,20 +394,6 @@
388394 * - Mark cold node blocks in their node footer
389395 * - Mark cold data pages in page cache
390396 */
391
-static inline int is_cold_data(struct page *page)
392
-{
393
- return PageChecked(page);
394
-}
395
-
396
-static inline void set_cold_data(struct page *page)
397
-{
398
- SetPageChecked(page);
399
-}
400
-
401
-static inline void clear_cold_data(struct page *page)
402
-{
403
- ClearPageChecked(page);
404
-}
405397
406398 static inline int is_node(struct page *page, int type)
407399 {
....@@ -412,21 +404,6 @@
412404 #define is_cold_node(page) is_node(page, COLD_BIT_SHIFT)
413405 #define is_fsync_dnode(page) is_node(page, FSYNC_BIT_SHIFT)
414406 #define is_dent_dnode(page) is_node(page, DENT_BIT_SHIFT)
415
-
416
-static inline int is_inline_node(struct page *page)
417
-{
418
- return PageChecked(page);
419
-}
420
-
421
-static inline void set_inline_node(struct page *page)
422
-{
423
- SetPageChecked(page);
424
-}
425
-
426
-static inline void clear_inline_node(struct page *page)
427
-{
428
- ClearPageChecked(page);
429
-}
430407
431408 static inline void set_cold_node(struct page *page, bool is_dir)
432409 {