f2fs.h (b2efb3f0a1db62aff5e824125785ec6731143b6d) f2fs.h (a7ffdbe22cecaed59b5d76a5f003d68907d64240)
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 7 unchanged lines hidden (view full) ---

16#include <linux/buffer_head.h>
17#include <linux/slab.h>
18#include <linux/crc32.h>
19#include <linux/magic.h>
20#include <linux/kobject.h>
21#include <linux/sched.h>
22
23#ifdef CONFIG_F2FS_CHECK_FS
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 7 unchanged lines hidden (view full) ---

16#include <linux/buffer_head.h>
17#include <linux/slab.h>
18#include <linux/crc32.h>
19#include <linux/magic.h>
20#include <linux/kobject.h>
21#include <linux/sched.h>
22
23#ifdef CONFIG_F2FS_CHECK_FS
24#define f2fs_bug_on(condition) BUG_ON(condition)
24#define f2fs_bug_on(sbi, condition) BUG_ON(condition)
25#define f2fs_down_write(x, y) down_write_nest_lock(x, y)
26#else
25#define f2fs_down_write(x, y) down_write_nest_lock(x, y)
26#else
27#define f2fs_bug_on(condition) WARN_ON(condition)
27#define f2fs_bug_on(sbi, condition) \
28 do { \
29 if (unlikely(condition)) { \
30 WARN_ON(1); \
31 sbi->need_fsck = true; \
32 } \
33 } while (0)
28#define f2fs_down_write(x, y) down_write(x)
29#endif
30
31/*
32 * For mount options
33 */
34#define F2FS_MOUNT_BG_GC 0x00000001
35#define F2FS_MOUNT_DISABLE_ROLL_FORWARD 0x00000002

--- 114 unchanged lines hidden (view full) ---

150
151static inline int update_sits_in_cursum(struct f2fs_summary_block *rs, int i)
152{
153 int before = sits_in_cursum(rs);
154 rs->n_sits = cpu_to_le16(before + i);
155 return before;
156}
157
34#define f2fs_down_write(x, y) down_write(x)
35#endif
36
37/*
38 * For mount options
39 */
40#define F2FS_MOUNT_BG_GC 0x00000001
41#define F2FS_MOUNT_DISABLE_ROLL_FORWARD 0x00000002

--- 114 unchanged lines hidden (view full) ---

156
157static inline int update_sits_in_cursum(struct f2fs_summary_block *rs, int i)
158{
159 int before = sits_in_cursum(rs);
160 rs->n_sits = cpu_to_le16(before + i);
161 return before;
162}
163
164static inline bool __has_cursum_space(struct f2fs_summary_block *sum, int size,
165 int type)
166{
167 if (type == NAT_JOURNAL)
168 return nats_in_cursum(sum) + size <= NAT_JOURNAL_ENTRIES;
169
170 return sits_in_cursum(sum) + size <= SIT_JOURNAL_ENTRIES;
171}
172
158/*
159 * ioctl commands
160 */
161#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS
162#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS
163
164#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
165/*

--- 51 unchanged lines hidden (view full) ---

217 unsigned char i_dir_level; /* use for dentry level for large dir */
218 unsigned int i_current_depth; /* use only in directory structure */
219 unsigned int i_pino; /* parent inode number */
220 umode_t i_acl_mode; /* keep file acl mode temporarily */
221
222 /* Use below internally in f2fs*/
223 unsigned long flags; /* use to pass per-file flags */
224 struct rw_semaphore i_sem; /* protect fi info */
173/*
174 * ioctl commands
175 */
176#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS
177#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS
178
179#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
180/*

--- 51 unchanged lines hidden (view full) ---

232 unsigned char i_dir_level; /* use for dentry level for large dir */
233 unsigned int i_current_depth; /* use only in directory structure */
234 unsigned int i_pino; /* parent inode number */
235 umode_t i_acl_mode; /* keep file acl mode temporarily */
236
237 /* Use below internally in f2fs*/
238 unsigned long flags; /* use to pass per-file flags */
239 struct rw_semaphore i_sem; /* protect fi info */
225 atomic_t dirty_dents; /* # of dirty dentry pages */
240 atomic_t dirty_pages; /* # of dirty pages */
226 f2fs_hash_t chash; /* hash value of given file name */
227 unsigned int clevel; /* maximum level of given file name */
228 nid_t i_xattr_nid; /* node id that contains xattrs */
229 unsigned long long xattr_ver; /* cp version of xattr modification */
230 struct extent_info ext; /* in-memory extent cache entry */
231 struct dir_inode_entry *dirty_dir; /* the pointer of dirty dir */
232};
233

--- 93 unchanged lines hidden (view full) ---

327 CURSEG_COLD_DATA, /* multimedia or GCed data blocks */
328 CURSEG_HOT_NODE, /* direct node blocks of directory files */
329 CURSEG_WARM_NODE, /* direct node blocks of normal files */
330 CURSEG_COLD_NODE, /* indirect node blocks */
331 NO_CHECK_TYPE
332};
333
334struct flush_cmd {
241 f2fs_hash_t chash; /* hash value of given file name */
242 unsigned int clevel; /* maximum level of given file name */
243 nid_t i_xattr_nid; /* node id that contains xattrs */
244 unsigned long long xattr_ver; /* cp version of xattr modification */
245 struct extent_info ext; /* in-memory extent cache entry */
246 struct dir_inode_entry *dirty_dir; /* the pointer of dirty dir */
247};
248

--- 93 unchanged lines hidden (view full) ---

342 CURSEG_COLD_DATA, /* multimedia or GCed data blocks */
343 CURSEG_HOT_NODE, /* direct node blocks of directory files */
344 CURSEG_WARM_NODE, /* direct node blocks of normal files */
345 CURSEG_COLD_NODE, /* indirect node blocks */
346 NO_CHECK_TYPE
347};
348
349struct flush_cmd {
335 struct flush_cmd *next;
336 struct completion wait;
350 struct completion wait;
351 struct llist_node llnode;
337 int ret;
338};
339
340struct flush_cmd_control {
341 struct task_struct *f2fs_issue_flush; /* flush thread */
342 wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */
352 int ret;
353};
354
355struct flush_cmd_control {
356 struct task_struct *f2fs_issue_flush; /* flush thread */
357 wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */
343 struct flush_cmd *issue_list; /* list for command issue */
344 struct flush_cmd *dispatch_list; /* list for command dispatch */
345 spinlock_t issue_lock; /* for issue list lock */
346 struct flush_cmd *issue_tail; /* list tail of issue list */
358 struct llist_head issue_list; /* list for command issue */
359 struct llist_node *dispatch_list; /* list for command dispatch */
347};
348
349struct f2fs_sm_info {
350 struct sit_info *sit_info; /* whole segment information */
351 struct free_segmap_info *free_info; /* free segment information */
352 struct dirty_seglist_info *dirty_info; /* dirty segment information */
353 struct curseg_info *curseg_array; /* active segment information */
354

--- 9 unchanged lines hidden (view full) ---

364 /* a threshold to reclaim prefree segments */
365 unsigned int rec_prefree_segments;
366
367 /* for small discard management */
368 struct list_head discard_list; /* 4KB discard list */
369 int nr_discards; /* # of discards in the list */
370 int max_discards; /* max. discards to be issued */
371
360};
361
362struct f2fs_sm_info {
363 struct sit_info *sit_info; /* whole segment information */
364 struct free_segmap_info *free_info; /* free segment information */
365 struct dirty_seglist_info *dirty_info; /* dirty segment information */
366 struct curseg_info *curseg_array; /* active segment information */
367

--- 9 unchanged lines hidden (view full) ---

377 /* a threshold to reclaim prefree segments */
378 unsigned int rec_prefree_segments;
379
380 /* for small discard management */
381 struct list_head discard_list; /* 4KB discard list */
382 int nr_discards; /* # of discards in the list */
383 int max_discards; /* max. discards to be issued */
384
385 struct list_head sit_entry_set; /* sit entry set list */
386
372 unsigned int ipu_policy; /* in-place-update policy */
373 unsigned int min_ipu_util; /* in-place-update threshold */
374
375 /* for flush command control */
376 struct flush_cmd_control *cmd_control_info;
377
378};
379

--- 49 unchanged lines hidden (view full) ---

429};
430
431struct f2fs_sb_info {
432 struct super_block *sb; /* pointer to VFS super block */
433 struct proc_dir_entry *s_proc; /* proc entry */
434 struct buffer_head *raw_super_buf; /* buffer head of raw sb */
435 struct f2fs_super_block *raw_super; /* raw super block pointer */
436 int s_dirty; /* dirty flag for checkpoint */
387 unsigned int ipu_policy; /* in-place-update policy */
388 unsigned int min_ipu_util; /* in-place-update threshold */
389
390 /* for flush command control */
391 struct flush_cmd_control *cmd_control_info;
392
393};
394

--- 49 unchanged lines hidden (view full) ---

444};
445
446struct f2fs_sb_info {
447 struct super_block *sb; /* pointer to VFS super block */
448 struct proc_dir_entry *s_proc; /* proc entry */
449 struct buffer_head *raw_super_buf; /* buffer head of raw sb */
450 struct f2fs_super_block *raw_super; /* raw super block pointer */
451 int s_dirty; /* dirty flag for checkpoint */
452 bool need_fsck; /* need fsck.f2fs to fix */
437
438 /* for node-related operations */
439 struct f2fs_nm_info *nm_info; /* node manager */
440 struct inode *node_inode; /* cache node blocks */
441
442 /* for segment-related operations */
443 struct f2fs_sm_info *sm_info; /* segment manager */
444

--- 89 unchanged lines hidden (view full) ---

534 return container_of(inode, struct f2fs_inode_info, vfs_inode);
535}
536
537static inline struct f2fs_sb_info *F2FS_SB(struct super_block *sb)
538{
539 return sb->s_fs_info;
540}
541
453
454 /* for node-related operations */
455 struct f2fs_nm_info *nm_info; /* node manager */
456 struct inode *node_inode; /* cache node blocks */
457
458 /* for segment-related operations */
459 struct f2fs_sm_info *sm_info; /* segment manager */
460

--- 89 unchanged lines hidden (view full) ---

550 return container_of(inode, struct f2fs_inode_info, vfs_inode);
551}
552
553static inline struct f2fs_sb_info *F2FS_SB(struct super_block *sb)
554{
555 return sb->s_fs_info;
556}
557
558static inline struct f2fs_sb_info *F2FS_I_SB(struct inode *inode)
559{
560 return F2FS_SB(inode->i_sb);
561}
562
563static inline struct f2fs_sb_info *F2FS_M_SB(struct address_space *mapping)
564{
565 return F2FS_I_SB(mapping->host);
566}
567
568static inline struct f2fs_sb_info *F2FS_P_SB(struct page *page)
569{
570 return F2FS_M_SB(page->mapping);
571}
572
542static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)
543{
544 return (struct f2fs_super_block *)(sbi->raw_super);
545}
546
547static inline struct f2fs_checkpoint *F2FS_CKPT(struct f2fs_sb_info *sbi)
548{
549 return (struct f2fs_checkpoint *)(sbi->ckpt);

--- 148 unchanged lines hidden (view full) ---

698 return true;
699}
700
701static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
702 struct inode *inode,
703 blkcnt_t count)
704{
705 spin_lock(&sbi->stat_lock);
573static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)
574{
575 return (struct f2fs_super_block *)(sbi->raw_super);
576}
577
578static inline struct f2fs_checkpoint *F2FS_CKPT(struct f2fs_sb_info *sbi)
579{
580 return (struct f2fs_checkpoint *)(sbi->ckpt);

--- 148 unchanged lines hidden (view full) ---

729 return true;
730}
731
732static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
733 struct inode *inode,
734 blkcnt_t count)
735{
736 spin_lock(&sbi->stat_lock);
706 f2fs_bug_on(sbi->total_valid_block_count < (block_t) count);
707 f2fs_bug_on(inode->i_blocks < count);
737 f2fs_bug_on(sbi, sbi->total_valid_block_count < (block_t) count);
738 f2fs_bug_on(sbi, inode->i_blocks < count);
708 inode->i_blocks -= count;
709 sbi->total_valid_block_count -= (block_t)count;
710 spin_unlock(&sbi->stat_lock);
711}
712
713static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
714{
715 atomic_inc(&sbi->nr_pages[count_type]);
716 F2FS_SET_SB_DIRT(sbi);
717}
718
739 inode->i_blocks -= count;
740 sbi->total_valid_block_count -= (block_t)count;
741 spin_unlock(&sbi->stat_lock);
742}
743
744static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
745{
746 atomic_inc(&sbi->nr_pages[count_type]);
747 F2FS_SET_SB_DIRT(sbi);
748}
749
719static inline void inode_inc_dirty_dents(struct inode *inode)
750static inline void inode_inc_dirty_pages(struct inode *inode)
720{
751{
721 inc_page_count(F2FS_SB(inode->i_sb), F2FS_DIRTY_DENTS);
722 atomic_inc(&F2FS_I(inode)->dirty_dents);
752 atomic_inc(&F2FS_I(inode)->dirty_pages);
753 if (S_ISDIR(inode->i_mode))
754 inc_page_count(F2FS_I_SB(inode), F2FS_DIRTY_DENTS);
723}
724
725static inline void dec_page_count(struct f2fs_sb_info *sbi, int count_type)
726{
727 atomic_dec(&sbi->nr_pages[count_type]);
728}
729
755}
756
757static inline void dec_page_count(struct f2fs_sb_info *sbi, int count_type)
758{
759 atomic_dec(&sbi->nr_pages[count_type]);
760}
761
730static inline void inode_dec_dirty_dents(struct inode *inode)
762static inline void inode_dec_dirty_pages(struct inode *inode)
731{
763{
732 if (!S_ISDIR(inode->i_mode))
764 if (!S_ISDIR(inode->i_mode) && !S_ISREG(inode->i_mode))
733 return;
734
765 return;
766
735 dec_page_count(F2FS_SB(inode->i_sb), F2FS_DIRTY_DENTS);
736 atomic_dec(&F2FS_I(inode)->dirty_dents);
767 atomic_dec(&F2FS_I(inode)->dirty_pages);
768
769 if (S_ISDIR(inode->i_mode))
770 dec_page_count(F2FS_I_SB(inode), F2FS_DIRTY_DENTS);
737}
738
739static inline int get_pages(struct f2fs_sb_info *sbi, int count_type)
740{
741 return atomic_read(&sbi->nr_pages[count_type]);
742}
743
771}
772
773static inline int get_pages(struct f2fs_sb_info *sbi, int count_type)
774{
775 return atomic_read(&sbi->nr_pages[count_type]);
776}
777
744static inline int get_dirty_dents(struct inode *inode)
778static inline int get_dirty_pages(struct inode *inode)
745{
779{
746 return atomic_read(&F2FS_I(inode)->dirty_dents);
780 return atomic_read(&F2FS_I(inode)->dirty_pages);
747}
748
749static inline int get_blocktype_secs(struct f2fs_sb_info *sbi, int block_type)
750{
751 unsigned int pages_per_sec = sbi->segs_per_sec *
752 (1 << sbi->log_blocks_per_seg);
753 return ((get_pages(sbi, block_type) + pages_per_sec - 1)
754 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;

--- 88 unchanged lines hidden (view full) ---

843 return true;
844}
845
846static inline void dec_valid_node_count(struct f2fs_sb_info *sbi,
847 struct inode *inode)
848{
849 spin_lock(&sbi->stat_lock);
850
781}
782
783static inline int get_blocktype_secs(struct f2fs_sb_info *sbi, int block_type)
784{
785 unsigned int pages_per_sec = sbi->segs_per_sec *
786 (1 << sbi->log_blocks_per_seg);
787 return ((get_pages(sbi, block_type) + pages_per_sec - 1)
788 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;

--- 88 unchanged lines hidden (view full) ---

877 return true;
878}
879
880static inline void dec_valid_node_count(struct f2fs_sb_info *sbi,
881 struct inode *inode)
882{
883 spin_lock(&sbi->stat_lock);
884
851 f2fs_bug_on(!sbi->total_valid_block_count);
852 f2fs_bug_on(!sbi->total_valid_node_count);
853 f2fs_bug_on(!inode->i_blocks);
885 f2fs_bug_on(sbi, !sbi->total_valid_block_count);
886 f2fs_bug_on(sbi, !sbi->total_valid_node_count);
887 f2fs_bug_on(sbi, !inode->i_blocks);
854
855 inode->i_blocks--;
856 sbi->total_valid_node_count--;
857 sbi->total_valid_block_count--;
858
859 spin_unlock(&sbi->stat_lock);
860}
861
862static inline unsigned int valid_node_count(struct f2fs_sb_info *sbi)
863{
864 return sbi->total_valid_node_count;
865}
866
867static inline void inc_valid_inode_count(struct f2fs_sb_info *sbi)
868{
869 spin_lock(&sbi->stat_lock);
888
889 inode->i_blocks--;
890 sbi->total_valid_node_count--;
891 sbi->total_valid_block_count--;
892
893 spin_unlock(&sbi->stat_lock);
894}
895
896static inline unsigned int valid_node_count(struct f2fs_sb_info *sbi)
897{
898 return sbi->total_valid_node_count;
899}
900
901static inline void inc_valid_inode_count(struct f2fs_sb_info *sbi)
902{
903 spin_lock(&sbi->stat_lock);
870 f2fs_bug_on(sbi->total_valid_inode_count == sbi->total_node_count);
904 f2fs_bug_on(sbi, sbi->total_valid_inode_count == sbi->total_node_count);
871 sbi->total_valid_inode_count++;
872 spin_unlock(&sbi->stat_lock);
873}
874
875static inline void dec_valid_inode_count(struct f2fs_sb_info *sbi)
876{
877 spin_lock(&sbi->stat_lock);
905 sbi->total_valid_inode_count++;
906 spin_unlock(&sbi->stat_lock);
907}
908
909static inline void dec_valid_inode_count(struct f2fs_sb_info *sbi)
910{
911 spin_lock(&sbi->stat_lock);
878 f2fs_bug_on(!sbi->total_valid_inode_count);
912 f2fs_bug_on(sbi, !sbi->total_valid_inode_count);
879 sbi->total_valid_inode_count--;
880 spin_unlock(&sbi->stat_lock);
881}
882
883static inline unsigned int valid_inode_count(struct f2fs_sb_info *sbi)
884{
885 return sbi->total_valid_inode_count;
886}
887
888static inline void f2fs_put_page(struct page *page, int unlock)
889{
890 if (!page)
891 return;
892
893 if (unlock) {
913 sbi->total_valid_inode_count--;
914 spin_unlock(&sbi->stat_lock);
915}
916
917static inline unsigned int valid_inode_count(struct f2fs_sb_info *sbi)
918{
919 return sbi->total_valid_inode_count;
920}
921
922static inline void f2fs_put_page(struct page *page, int unlock)
923{
924 if (!page)
925 return;
926
927 if (unlock) {
894 f2fs_bug_on(!PageLocked(page));
928 f2fs_bug_on(F2FS_P_SB(page), !PageLocked(page));
895 unlock_page(page);
896 }
897 page_cache_release(page);
898}
899
900static inline void f2fs_put_dnode(struct dnode_of_data *dn)
901{
902 if (dn->node_page)

--- 363 unchanged lines hidden (view full) ---

1266void release_dirty_inode(struct f2fs_sb_info *);
1267bool exist_written_data(struct f2fs_sb_info *, nid_t, int);
1268int acquire_orphan_inode(struct f2fs_sb_info *);
1269void release_orphan_inode(struct f2fs_sb_info *);
1270void add_orphan_inode(struct f2fs_sb_info *, nid_t);
1271void remove_orphan_inode(struct f2fs_sb_info *, nid_t);
1272void recover_orphan_inodes(struct f2fs_sb_info *);
1273int get_valid_checkpoint(struct f2fs_sb_info *);
929 unlock_page(page);
930 }
931 page_cache_release(page);
932}
933
934static inline void f2fs_put_dnode(struct dnode_of_data *dn)
935{
936 if (dn->node_page)

--- 363 unchanged lines hidden (view full) ---

1300void release_dirty_inode(struct f2fs_sb_info *);
1301bool exist_written_data(struct f2fs_sb_info *, nid_t, int);
1302int acquire_orphan_inode(struct f2fs_sb_info *);
1303void release_orphan_inode(struct f2fs_sb_info *);
1304void add_orphan_inode(struct f2fs_sb_info *, nid_t);
1305void remove_orphan_inode(struct f2fs_sb_info *, nid_t);
1306void recover_orphan_inodes(struct f2fs_sb_info *);
1307int get_valid_checkpoint(struct f2fs_sb_info *);
1274void set_dirty_dir_page(struct inode *, struct page *);
1308void update_dirty_page(struct inode *, struct page *);
1275void add_dirty_dir_inode(struct inode *);
1276void remove_dirty_dir_inode(struct inode *);
1277void sync_dirty_dir_inodes(struct f2fs_sb_info *);
1278void write_checkpoint(struct f2fs_sb_info *, bool);
1279void init_ino_entry_info(struct f2fs_sb_info *);
1280int __init create_checkpoint_caches(void);
1281void destroy_checkpoint_caches(void);
1282

--- 71 unchanged lines hidden (view full) ---

1354#define stat_inc_bggc_count(sbi) ((sbi)->bg_gc++)
1355#define stat_inc_dirty_dir(sbi) ((sbi)->n_dirty_dirs++)
1356#define stat_dec_dirty_dir(sbi) ((sbi)->n_dirty_dirs--)
1357#define stat_inc_total_hit(sb) ((F2FS_SB(sb))->total_hit_ext++)
1358#define stat_inc_read_hit(sb) ((F2FS_SB(sb))->read_hit_ext++)
1359#define stat_inc_inline_inode(inode) \
1360 do { \
1361 if (f2fs_has_inline_data(inode)) \
1309void add_dirty_dir_inode(struct inode *);
1310void remove_dirty_dir_inode(struct inode *);
1311void sync_dirty_dir_inodes(struct f2fs_sb_info *);
1312void write_checkpoint(struct f2fs_sb_info *, bool);
1313void init_ino_entry_info(struct f2fs_sb_info *);
1314int __init create_checkpoint_caches(void);
1315void destroy_checkpoint_caches(void);
1316

--- 71 unchanged lines hidden (view full) ---

1388#define stat_inc_bggc_count(sbi) ((sbi)->bg_gc++)
1389#define stat_inc_dirty_dir(sbi) ((sbi)->n_dirty_dirs++)
1390#define stat_dec_dirty_dir(sbi) ((sbi)->n_dirty_dirs--)
1391#define stat_inc_total_hit(sb) ((F2FS_SB(sb))->total_hit_ext++)
1392#define stat_inc_read_hit(sb) ((F2FS_SB(sb))->read_hit_ext++)
1393#define stat_inc_inline_inode(inode) \
1394 do { \
1395 if (f2fs_has_inline_data(inode)) \
1362 ((F2FS_SB(inode->i_sb))->inline_inode++); \
1396 ((F2FS_I_SB(inode))->inline_inode++); \
1363 } while (0)
1364#define stat_dec_inline_inode(inode) \
1365 do { \
1366 if (f2fs_has_inline_data(inode)) \
1397 } while (0)
1398#define stat_dec_inline_inode(inode) \
1399 do { \
1400 if (f2fs_has_inline_data(inode)) \
1367 ((F2FS_SB(inode->i_sb))->inline_inode--); \
1401 ((F2FS_I_SB(inode))->inline_inode--); \
1368 } while (0)
1369
1370#define stat_inc_seg_type(sbi, curseg) \
1371 ((sbi)->segment_count[(curseg)->alloc_type]++)
1372#define stat_inc_block_count(sbi, curseg) \
1373 ((sbi)->block_count[(curseg)->alloc_type]++)
1374
1375#define stat_inc_seg_count(sbi, type) \

--- 73 unchanged lines hidden ---
1402 } while (0)
1403
1404#define stat_inc_seg_type(sbi, curseg) \
1405 ((sbi)->segment_count[(curseg)->alloc_type]++)
1406#define stat_inc_block_count(sbi, curseg) \
1407 ((sbi)->block_count[(curseg)->alloc_type]++)
1408
1409#define stat_inc_seg_count(sbi, type) \

--- 73 unchanged lines hidden ---