Lines Matching +full:mmp +full:- +full:timer

1 // SPDX-License-Identifier: GPL-2.0
7 * Laboratoire MASI - Institut Blaise Pascal
29 #include <linux/timer.h>
37 #include <linux/percpu-rwsem.h>
59 * with DOUBLE_CHECK defined mballoc creates persistent in-core
75 printk(KERN_DEBUG "EXT4-fs DEBUG (%s, %d): %s:", \
93 pr_debug("[%s/%d] EXT4-fs (%s): ino %lu: (%s, %d): %s:" fmt, \
94 current->comm, task_pid_nr(current), \
95 ino->i_sb->s_id, ino->i_ino, __FILE__, __LINE__, \
104 /* data type for filesystem-wide blocks number */
145 /* blocks already pre-reserved by delayed allocation */
207 * Flags for ext4_io_end->flags
222 struct list_head list; /* per-file finished IO list */
252 /* First non-reserved inode for old ext4 filesystems */
261 * Macro-instructions used to manage several block sizes
269 # define EXT4_BLOCK_SIZE(s) ((s)->s_blocksize)
271 # define EXT4_BLOCK_SIZE(s) (EXT4_MIN_BLOCK_SIZE << (s)->s_log_block_size)
275 EXT4_SB(s)->s_cluster_bits)
277 # define EXT4_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
278 # define EXT4_CLUSTER_BITS(s) (EXT4_SB(s)->s_cluster_bits)
280 # define EXT4_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
283 #define EXT4_ADDR_PER_BLOCK_BITS(s) (EXT4_SB(s)->s_addr_per_block_bits)
284 #define EXT4_INODE_SIZE(s) (EXT4_SB(s)->s_inode_size)
285 #define EXT4_FIRST_INO(s) (EXT4_SB(s)->s_first_ino)
287 #define EXT4_INODE_SIZE(s) (((s)->s_rev_level == EXT4_GOOD_OLD_REV) ? \
289 (s)->s_inode_size)
290 #define EXT4_FIRST_INO(s) (((s)->s_rev_level == EXT4_GOOD_OLD_REV) ? \
292 (s)->s_first_ino)
296 ((EXT4_BLOCK_ALIGN(size + offset, blkbits) >> blkbits) - (offset >> \
300 #define EXT4_B2C(sbi, blk) ((blk) >> (sbi)->s_cluster_bits)
302 #define EXT4_C2B(sbi, cluster) ((cluster) << (sbi)->s_cluster_bits)
304 #define EXT4_NUM_B2C(sbi, blks) (((blks) + (sbi)->s_cluster_ratio - 1) >> \
305 (sbi)->s_cluster_bits)
308 ~((ext4_fsblk_t) (s)->s_cluster_ratio - 1))
310 ~((ext4_lblk_t) (s)->s_cluster_ratio - 1))
313 ((ext4_lblk_t) (sbi)->s_cluster_ratio - 1))
316 ((ext4_fsblk_t) (s)->s_cluster_ratio - 1))
318 ((ext4_lblk_t) (s)->s_cluster_ratio - 1))
369 #define EXT4_BG_INODE_ZEROED 0x0004 /* On-disk itable initialized to zero */
372 * Macro-instructions used to manage group descriptors
377 #define EXT4_DESC_SIZE(s) (EXT4_SB(s)->s_desc_size)
379 # define EXT4_BLOCKS_PER_GROUP(s) (EXT4_SB(s)->s_blocks_per_group)
380 # define EXT4_CLUSTERS_PER_GROUP(s) (EXT4_SB(s)->s_clusters_per_group)
381 # define EXT4_DESC_PER_BLOCK(s) (EXT4_SB(s)->s_desc_per_block)
382 # define EXT4_INODES_PER_GROUP(s) (EXT4_SB(s)->s_inodes_per_group)
383 # define EXT4_DESC_PER_BLOCK_BITS(s) (EXT4_SB(s)->s_desc_per_block_bits)
385 # define EXT4_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
387 # define EXT4_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
416 /* End compression flags --- maybe not all used */
417 #define EXT4_INDEX_FL 0x00001000 /* hash-indexed directory */
482 /* Flags that are appropriate for regular files (all but dir-specific ones). */
486 /* Flags that are appropriate for non-directories/regular files. */
524 /* End compression flags --- maybe not all used */
525 EXT4_INODE_INDEX = 12, /* hash-indexed directory */
545 * build-time check to make sure that EXT4_XXX_FL is consistent with respect to
550 * with the values of FS_XXX_FL defined in include/linux/fs.h and the on-disk
554 * It's not paranoia if the Murphy's Law really *is* out to get you. :-)
707 /* note ioctl 11 reserved for filesystem-independent FIEMAP ioctl */
713 /* ioctl codes 19--39 are reserved for fscrypt */
824 __le32 i_version_hi; /* high 32 bits for 64-bit version */
838 #define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
843 * with large inodes (-I 256 or larger) and there are not currently any EAs
849 * inode-size = GOOD_OLD_INODE_SIZE + i_extra_isize
853 sizeof((ext4_inode)->field)) \
855 (einode)->i_extra_isize)) \
861 * epoch 32-bit 32-bit tv_sec to
862 * bits time decoded 64-bit tv_sec 64-bit tv_sec valid time range
863 * 0 0 1 -0x80000000..-0x00000001 0x000000000 1901-12-13..1969-12-31
864 * 0 0 0 0x000000000..0x07fffffff 0x000000000 1970-01-01..2038-01-19
865 * 0 1 1 0x080000000..0x0ffffffff 0x100000000 2038-01-19..2106-02-07
866 * 0 1 0 0x100000000..0x17fffffff 0x100000000 2106-02-07..2174-02-25
867 * 1 0 1 0x180000000..0x1ffffffff 0x200000000 2174-02-25..2242-03-16
868 * 1 0 0 0x200000000..0x27fffffff 0x200000000 2242-03-16..2310-04-04
869 * 1 1 1 0x280000000..0x2ffffffff 0x300000000 2310-04-04..2378-04-22
870 * 1 1 0 0x300000000..0x37fffffff 0x300000000 2378-04-22..2446-05-10
872 * Note that previous versions of the kernel on 64-bit systems would
880 u32 extra =((time->tv_sec - (s32)time->tv_sec) >> 32) & EXT4_EPOCH_MASK; in ext4_encode_extra_time()
881 return cpu_to_le32(extra | (time->tv_nsec << EXT4_EPOCH_BITS)); in ext4_encode_extra_time()
888 time->tv_sec += (u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK) << 32; in ext4_decode_extra_time()
889 time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS; in ext4_decode_extra_time()
895 (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \
896 (raw_inode)->xtime ## _extra = \
897 ext4_encode_extra_time(&(inode)->xtime); \
900 (raw_inode)->xtime = cpu_to_le32(clamp_t(int32_t, (inode)->xtime.tv_sec, S32_MIN, S32_MAX)); \
906 (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \
908 (raw_inode)->xtime ## _extra = \
909 ext4_encode_extra_time(&(einode)->xtime); \
914 (inode)->xtime.tv_sec = (signed)le32_to_cpu((raw_inode)->xtime); \
916 ext4_decode_extra_time(&(inode)->xtime, \
917 raw_inode->xtime ## _extra); \
920 (inode)->xtime.tv_nsec = 0; \
927 (einode)->xtime.tv_sec = \
928 (signed)le32_to_cpu((raw_inode)->xtime); \
930 (einode)->xtime.tv_sec = 0; \
932 ext4_decode_extra_time(&(einode)->xtime, \
933 raw_inode->xtime ## _extra); \
935 (einode)->xtime.tv_nsec = 0; \
973 * holding i_data_sem for a normal (non-quota) inode. Since we don't
978 * I_DATA_SEM_NORMAL - Used for most inodes
979 * I_DATA_SEM_OTHER - Used by move_inode.c for the second normal inode
982 * I_DATA_SEM_QUOTA - Used for quota inodes only
1002 * it is used for making block allocation decisions - we try to
1028 * protected by sbi->s_fc_lock.
1055 * into the on-disk inode when writing inodes out, instead of i_size.
1070 * during recovery. Hence we must fix the get_block-vs-truncate race
1119 /* on-disk additional length */
1197 #define EXT4_MOUNT_NO_UID32 0x02000 /* Disable 32-bit UIDs */
1232 #define EXT4_MOUNT2_HURD_COMPAT 0x00000004 /* Support HURD-castrated
1242 #define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \
1244 #define set_opt(sb, opt) EXT4_SB(sb)->s_mount_opt |= \
1246 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \
1249 #define clear_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 &= \
1251 #define set_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 |= \
1253 #define test_opt2(sb, opt) (EXT4_SB(sb)->s_mount_opt2 & \
1278 #define EXT4_ERRORS_RO 2 /* Remount fs read-only */
1327 __le32 s_first_ino; /* First non-reserved inode */
1332 __le32 s_feature_ro_compat; /* readonly-compatible feature set */
1333 /*68*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
1367 __le16 s_mmp_update_interval; /* # seconds to wait in MMP checking */
1368 __le64 s_mmp_block; /* Block for multi-mount protection */
1380 on-disk snapshot list */
1418 #define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
1423 #define DUMMY_ENCRYPTION_ENABLED(sbi) ((sbi)->s_dummy_enc_policy.policy != NULL)
1434 * fourth extended-fs super-block data in memory
1446 ext4_group_t s_blockfile_groups;/* Groups acceptable for non-extent files */
1531 /* where last allocation was done - for stream allocation */
1560 /* the size of zero-out chunk */
1570 /* timer for periodic error stats printing */
1606 /* Encryption policy for '-o test_dummy_encryption' */
1639 * ei->i_fc_list, s_fc_dentry_q, s_fc_q, s_fc_bytes, s_fc_bh.
1653 return sb->s_fs_info; in EXT4_SB()
1664 ino <= le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count)); in ext4_valid_inum()
1668 * Returns: sbi->field[index]
1671 * - s_group_desc
1672 * - s_group_info
1673 * - s_flex_group
1677 typeof(*((sbi)->field)) _v; \
1679 _v = ((typeof(_v)*)rcu_dereference((sbi)->field))[index]; \
1685 * run-time mount flags
1698 set_bit(bit, &EXT4_SB(sb)->s_mount_flags); in ext4_set_mount_flag()
1703 clear_bit(bit, &EXT4_SB(sb)->s_mount_flags); in ext4_clear_mount_flag()
1708 return test_bit(bit, &EXT4_SB(sb)->s_mount_flags); in ext4_test_mount_flag()
1730 if (unlikely(sbi->s_simulate_fail == code)) { in ext4_simulate_fail()
1731 sbi->s_simulate_fail = 0; in ext4_simulate_fail()
1778 EXT4_STATE_XATTR, /* has in-inode xattrs */
1783 EXT4_STATE_MAY_INLINE_DATA, /* may have in-inode data */
1785 EXT4_STATE_LUSTRE_EA_INODE, /* Lustre-style ea_inode */
1786 EXT4_STATE_VERITY_IN_PROGRESS, /* building fs-verity Merkle tree */
1793 return test_bit(bit + (offset), &EXT4_I(inode)->i_##field); \
1797 set_bit(bit + (offset), &EXT4_I(inode)->i_##field); \
1801 clear_bit(bit + (offset), &EXT4_I(inode)->i_##field); \
1821 (ei)->i_state_flags = 0; in ext4_clear_state_flags()
1833 * a kernel struct super_block. This will allow us to call the feature-test
1844 #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
1866 #define EXT4_EXTRA_TIMESTAMP_MAX (((s64)1 << 34) - 1 + S32_MIN)
1923 #define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3-lvl htree */
1933 return ((EXT4_SB(sb)->s_es->s_feature_compat & \
1939 EXT4_SB(sb)->s_es->s_feature_compat |= \
1944 EXT4_SB(sb)->s_es->s_feature_compat &= \
1951 return ((EXT4_SB(sb)->s_es->s_feature_ro_compat & \
1957 EXT4_SB(sb)->s_es->s_feature_ro_compat |= \
1962 EXT4_SB(sb)->s_es->s_feature_ro_compat &= \
1969 return ((EXT4_SB(sb)->s_es->s_feature_incompat & \
1975 EXT4_SB(sb)->s_es->s_feature_incompat |= \
1980 EXT4_SB(sb)->s_es->s_feature_incompat &= \
2015 EXT4_FEATURE_INCOMPAT_FUNCS(mmp, MMP) in EXT4_FEATURE_COMPAT_FUNCS()
2070 return ((EXT4_SB(sb)->s_es->s_feature_compat & \ in EXT4_FEATURE_COMPAT_FUNCS()
2075 return ((EXT4_SB(sb)->s_es->s_feature_ro_compat & \
2080 return ((EXT4_SB(sb)->s_es->s_feature_incompat & \
2090 return (EXT4_SB(sb)->s_es->s_feature_compat != 0);
2094 return (EXT4_SB(sb)->s_es->s_feature_ro_compat != 0); in ext4_has_ro_compat_features()
2098 return (EXT4_SB(sb)->s_es->s_feature_incompat != 0); in ext4_has_incompat_features()
2110 return test_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags); in ext4_forced_shutdown()
2196 ((blocksize) - \
2222 #define EXT4_DIR_ROUND (EXT4_DIR_PAD - 1)
2225 #define EXT4_MAX_REC_LEN ((1<<16)-1)
2269 #define is_dx(dir) (ext4_has_feature_dir_index((dir)->i_sb) && \
2271 #define EXT4_DIR_LINK_MAX(dir) unlikely((dir)->i_nlink >= EXT4_LINK_MAX && \
2272 !(ext4_has_feature_dir_nlink((dir)->i_sb) && is_dx(dir)))
2273 #define EXT4_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2 || (dir)->i_nlink == 1)
2292 BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx)); in ext4_chksum()
2294 desc.shash.tfm = sbi->s_chksum_driver; in ext4_chksum()
2315 #define EXT4_HTREE_EOF_32BIT ((1UL << (32 - 1)) - 1)
2316 #define EXT4_HTREE_EOF_64BIT ((1ULL << (64 - 1)) - 1)
2336 #define fname_name(p) ((p)->disk_name.name)
2337 #define fname_len(p) ((p)->disk_name.len)
2351 return (struct ext4_inode *) (iloc->bh->b_data + iloc->offset); in ext4_raw_inode()
2357 !(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL); in ext4_is_quota_file()
2380 le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); in ext4_group_first_block_no()
2386 #define ERR_BAD_DX_DIR (-(MAX_ERRNO - 1))
2438 * superblock. Programs that check MMP should assume that if
2442 #define EXT4_MMP_MAGIC 0x004D4D50U /* ASCII for MMP */
2448 __le32 mmp_magic; /* Magic number for MMP */
2456 char mmp_nodename[64]; /* Node which last updated MMP block */
2457 char mmp_bdevname[32]; /* Bdev which last updated MMP block */
2460 * mmp_check_interval is used to verify if the MMP block has been
2462 * maximum time to write the MMP block during an update cycle.
2471 /* arguments passed to the mmp thread */
2479 * The MMP block is written every update interval and initially checked every
2488 * Minimum interval for MMP checking in seconds.
2493 * Maximum interval for MMP checking in seconds.
2578 dst->usr_fname = src->usr_fname; in ext4_fname_from_fscrypt_name()
2579 dst->disk_name = src->disk_name; in ext4_fname_from_fscrypt_name()
2580 dst->hinfo.hash = src->hash; in ext4_fname_from_fscrypt_name()
2581 dst->hinfo.minor_hash = src->minor_hash; in ext4_fname_from_fscrypt_name()
2582 dst->crypto_buf = src->crypto_buf; in ext4_fname_from_fscrypt_name()
2600 ext4_fname_setup_ci_filename(dir, iname, &fname->cf_name); in ext4_fname_setup_filename()
2619 ext4_fname_setup_ci_filename(dir, &dentry->d_name, &fname->cf_name); in ext4_fname_prepare_lookup()
2628 name.crypto_buf = fname->crypto_buf; in ext4_fname_free_filename()
2631 fname->crypto_buf.name = NULL; in ext4_fname_free_filename()
2632 fname->usr_fname = NULL; in ext4_fname_free_filename()
2633 fname->disk_name.name = NULL; in ext4_fname_free_filename()
2636 kfree(fname->cf_name.name); in ext4_fname_free_filename()
2637 fname->cf_name.name = NULL; in ext4_fname_free_filename()
2646 fname->usr_fname = iname; in ext4_fname_setup_filename()
2647 fname->disk_name.name = (unsigned char *) iname->name; in ext4_fname_setup_filename()
2648 fname->disk_name.len = iname->len; in ext4_fname_setup_filename()
2651 ext4_fname_setup_ci_filename(dir, iname, &fname->cf_name); in ext4_fname_setup_filename()
2661 return ext4_fname_setup_filename(dir, &dentry->d_name, 1, fname); in ext4_fname_prepare_lookup()
2667 kfree(fname->cf_name.name); in ext4_fname_free_filename()
2668 fname->cf_name.name = NULL; in ext4_fname_free_filename()
2698 if (!ext4_has_feature_dir_index(inode->i_sb) && in ext4_update_dx_flag()
2701 WARN_ON_ONCE(ext4_has_feature_metadata_csum(inode->i_sb)); in ext4_update_dx_flag()
2977 extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
3019 #define dump_mmp_msg(sb, mmp, msg) \ argument
3020 __dump_mmp_msg(sb, mmp, __func__, __LINE__, msg)
3072 #define dump_mmp_msg(sb, mmp, msg) \ argument
3073 __dump_mmp_msg(sb, mmp, "", 0, "")
3121 !EXT4_SB(sb)->s_chksum_driver); in ext4_has_metadata_csum()
3124 (EXT4_SB(sb)->s_chksum_driver != NULL); in ext4_has_metadata_csum()
3133 (((es)->s_feature_incompat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_64BIT) \
3134 ? (ext4_fsblk_t)le32_to_cpu(es->name##_hi) << 32 : 0) | \
3135 le32_to_cpu(es->name##_lo))
3155 es->s_blocks_count_lo = cpu_to_le32((u32)blk); in ext4_blocks_count_set()
3156 es->s_blocks_count_hi = cpu_to_le32(blk >> 32); in ext4_blocks_count_set()
3162 es->s_free_blocks_count_lo = cpu_to_le32((u32)blk); in ext4_free_blocks_count_set()
3163 es->s_free_blocks_count_hi = cpu_to_le32(blk >> 32); in ext4_free_blocks_count_set()
3169 es->s_r_blocks_count_lo = cpu_to_le32((u32)blk); in ext4_r_blocks_count_set()
3170 es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32); in ext4_r_blocks_count_set()
3177 S_ISREG(le16_to_cpu(raw_inode->i_mode))) in ext4_isize()
3178 return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | in ext4_isize()
3179 le32_to_cpu(raw_inode->i_size_lo); in ext4_isize()
3181 return (loff_t) le32_to_cpu(raw_inode->i_size_lo); in ext4_isize()
3186 raw_inode->i_size_lo = cpu_to_le32(i_size); in ext4_isize_set()
3187 raw_inode->i_size_high = cpu_to_le32(i_size >> 32); in ext4_isize_set()
3196 BUG_ON(group >= EXT4_SB(sb)->s_groups_count); in ext4_get_group_info()
3198 indexh = group & ((EXT4_DESC_PER_BLOCK(sb)) - 1); in ext4_get_group_info()
3210 ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count; in ext4_get_groups_count()
3219 return block_group >> sbi->s_log_groups_per_flex; in ext4_flex_group()
3224 return 1 << sbi->s_log_groups_per_flex; in ext4_flex_bg_size()
3246 WARN_ON_ONCE(S_ISREG(inode->i_mode) && in ext4_update_i_disksize()
3248 down_write(&EXT4_I(inode)->i_data_sem); in ext4_update_i_disksize()
3249 if (newsize > EXT4_I(inode)->i_disksize) in ext4_update_i_disksize()
3250 WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize); in ext4_update_i_disksize()
3251 up_write(&EXT4_I(inode)->i_data_sem); in ext4_update_i_disksize()
3259 if (newsize > inode->i_size) { in ext4_update_inode_size()
3263 if (newsize > EXT4_I(inode)->i_disksize) { in ext4_update_inode_size()
3288 ext4_grpblk_t bb_counters[]; /* Nr of free power-of-two-block
3291 * 5 free 8-block regions. */
3305 (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state)))
3307 (test_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &((grp)->bb_state)))
3309 (test_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &((grp)->bb_state)))
3312 (test_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
3314 (set_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
3316 (clear_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
3318 (test_and_set_bit(EXT4_GROUP_INFO_BBITMAP_READ_BIT, &((grp)->bb_state)))
3326 return bgl_lock_ptr(EXT4_SB(sb)->s_blockgroup_lock, group); in ext4_group_lock_ptr()
3335 return (atomic_read(&sbi->s_lock_busy) > EXT4_CONTENTION_THRESHOLD); in ext4_fs_is_busy()
3346 atomic_add_unless(&EXT4_SB(sb)->s_lock_busy, -1, 0); in ext4_lock_group()
3352 atomic_add_unless(&EXT4_SB(sb)->s_lock_busy, 1, in ext4_lock_group()
3369 (__le32 *)(bh)->b_data, \
3370 EXT4_ADDR_PER_BLOCK((inode)->i_sb))
3374 EXT4_I(inode)->i_data, \
3464 EXT4_I(inode)->i_inline_off; in ext4_has_inline_data()
3502 de->file_type = ext4_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in ext4_set_de_type()
3602 /* page-io.c */
3621 /* mmp.c */
3630 * to mark the bitmap uptodate. We need to also zero-out the bitmap
3637 test_bit(BH_BITMAP_UPTODATE, &(bh)->b_state)); in bitmap_uptodate()
3641 set_bit(BH_BITMAP_UPTODATE, &(bh)->b_state); in set_bitmap_uptodate()
3644 #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)
3658 if (!(io_end->flag & EXT4_IO_END_UNWRITTEN)) { in ext4_set_io_unwritten_flag()
3659 io_end->flag |= EXT4_IO_END_UNWRITTEN; in ext4_set_io_unwritten_flag()
3660 atomic_inc(&EXT4_I(inode)->i_unwritten); in ext4_set_io_unwritten_flag()
3666 struct inode *inode = io_end->inode; in ext4_clear_io_unwritten_flag()
3668 if (io_end->flag & EXT4_IO_END_UNWRITTEN) { in ext4_clear_io_unwritten_flag()
3669 io_end->flag &= ~EXT4_IO_END_UNWRITTEN; in ext4_clear_io_unwritten_flag()
3671 if (atomic_dec_and_test(&EXT4_I(inode)->i_unwritten)) in ext4_clear_io_unwritten_flag()