1c1
< /* SPDX-License-Identifier: GPL-2.0 */
---
> // SPDX-License-Identifier: GPL-2.0
141,142c141
< bool test_dummy_encryption; /* test dummy encryption */
< block_t unusable_cap_perc; /* percentage for cap */
---
> struct fscrypt_dummy_context dummy_enc_ctx; /* test dummy encryption */
198d196
< #define CP_RESIZE 0x00000080
433,436d430
< #define F2FS_IOC_RELEASE_COMPRESS_BLOCKS \
< _IOR(F2FS_IOCTL_MAGIC, 18, __u64)
< #define F2FS_IOC_RESERVE_COMPRESS_BLOCKS \
< _IOR(F2FS_IOCTL_MAGIC, 19, __u64)
515,550d508
<
< struct f2fs_filename {
< /*
< * The filename the user specified. This is NULL for some
< * filesystem-internal operations, e.g. converting an inline directory
< * to a non-inline one, or roll-forward recovering an encrypted dentry.
< */
< const struct qstr *usr_fname;
<
< /*
< * The on-disk filename. For encrypted directories, this is encrypted.
< * This may be NULL for lookups in an encrypted dir without the key.
< */
< struct fscrypt_str disk_name;
<
< /* The dirhash of this filename */
< f2fs_hash_t hash;
<
< #ifdef CONFIG_FS_ENCRYPTION
< /*
< * For lookups in encrypted directories: either the buffer backing
< * disk_name, or a buffer that holds the decoded no-key name.
< */
< struct fscrypt_str crypto_buf;
< #endif
< #ifdef CONFIG_UNICODE
< /*
< * For casefolded directories: the casefolded name, but it's left NULL
< * if the original name is not valid Unicode or if the filesystem is
< * doing an internal operation where usr_fname is also NULL. In these
< * cases we fall back to treating the name as an opaque byte sequence.
< */
< struct fscrypt_str cf_name;
< #endif
< };
<
1133,1135c1091,1092
< /* WRITE IO */
< APP_DIRECT_IO, /* app direct write IOs */
< APP_BUFFERED_IO, /* app buffered write IOs */
---
> APP_DIRECT_IO, /* app direct IOs */
> APP_BUFFERED_IO, /* app buffered IOs */
1146,1158d1102
<
< /* READ IO */
< APP_DIRECT_READ_IO, /* app direct read IOs */
< APP_BUFFERED_READ_IO, /* app buffered read IOs */
< APP_READ_IO, /* app read IOs */
< APP_MAPPED_READ_IO, /* app mapped read IOs */
< FS_DATA_READ_IO, /* data read IOs */
< FS_GDATA_READ_IO, /* data read IOs from background gc */
< FS_CDATA_READ_IO, /* compressed data read IOs */
< FS_NODE_READ_IO, /* node read IOs */
< FS_META_READ_IO, /* meta read IOs */
<
< /* other */
1318c1262
< (unlikely(F2FS_OPTION(sbi).test_dummy_encryption))
---
> (unlikely(F2FS_OPTION(sbi).dummy_enc_ctx.ctx != NULL))
1328d1271
< COMPRESS_LZORLE,
1477a1421
> struct mutex resize_mutex; /* for resize exclusion */
1563,1564c1507
< unsigned long long rw_iostat[NR_IO_TYPE];
< unsigned long long prev_rw_iostat[NR_IO_TYPE];
---
> unsigned long long write_iostat[NR_IO_TYPE];
1566,1567d1508
< unsigned long iostat_next_period;
< unsigned int iostat_period_ms;
1569,1571d1509
< /* to attach REQ_META|REQ_FUA flags */
< unsigned int data_io_flag;
<
2967c2905
< static inline bool is_dot_dotdot(const u8 *name, size_t len)
---
> static inline bool is_dot_dotdot(const struct qstr *str)
2969c2907
< if (len == 1 && name[0] == '.')
---
> if (str->len == 1 && str->name[0] == '.')
2972c2910
< if (len == 2 && name[0] == '.' && name[1] == '.')
---
> if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.')
3061,3065d2998
< #define DEFAULT_IOSTAT_PERIOD_MS 3000
< #define MIN_IOSTAT_PERIOD_MS 100
< /* maximum period of iostat tracing is 1 day */
< #define MAX_IOSTAT_PERIOD_MS 8640000
<
3071,3074c3004,3005
< for (i = 0; i < NR_IO_TYPE; i++) {
< sbi->rw_iostat[i] = 0;
< sbi->prev_rw_iostat[i] = 0;
< }
---
> for (i = 0; i < NR_IO_TYPE; i++)
> sbi->write_iostat[i] = 0;
3078,3079d3008
< extern void f2fs_record_iostat(struct f2fs_sb_info *sbi);
<
3086c3015
< sbi->rw_iostat[type] += io_bytes;
---
> sbi->write_iostat[type] += io_bytes;
3089,3096c3018,3020
< sbi->rw_iostat[APP_BUFFERED_IO] =
< sbi->rw_iostat[APP_WRITE_IO] -
< sbi->rw_iostat[APP_DIRECT_IO];
<
< if (type == APP_READ_IO || type == APP_DIRECT_READ_IO)
< sbi->rw_iostat[APP_BUFFERED_READ_IO] =
< sbi->rw_iostat[APP_READ_IO] -
< sbi->rw_iostat[APP_DIRECT_READ_IO];
---
> sbi->write_iostat[APP_BUFFERED_IO] =
> sbi->write_iostat[APP_WRITE_IO] -
> sbi->write_iostat[APP_DIRECT_IO];
3098,3099d3021
<
< f2fs_record_iostat(sbi);
3152d3073
< int f2fs_do_truncate_blocks(struct inode *inode, u64 from, bool lock);
3187a3109,3113
> extern int f2fs_ci_compare(const struct inode *parent,
> const struct qstr *name,
> const struct qstr *entry,
> bool quick);
>
3192,3200c3118,3120
< int f2fs_init_casefolded_name(const struct inode *dir,
< struct f2fs_filename *fname);
< int f2fs_setup_filename(struct inode *dir, const struct qstr *iname,
< int lookup, struct f2fs_filename *fname);
< int f2fs_prepare_lookup(struct inode *dir, struct dentry *dentry,
< struct f2fs_filename *fname);
< void f2fs_free_filename(struct f2fs_filename *fname);
< struct f2fs_dir_entry *f2fs_find_target_dentry(const struct f2fs_dentry_ptr *d,
< const struct f2fs_filename *fname, int *max_slots);
---
> struct f2fs_dir_entry *f2fs_find_target_dentry(struct fscrypt_name *fname,
> f2fs_hash_t namehash, int *max_slots,
> struct f2fs_dentry_ptr *d);
3206c3126,3127
< const struct f2fs_filename *fname, struct page *dpage);
---
> const struct qstr *new_name,
> const struct qstr *orig_name, struct page *dpage);
3212,3213c3133
< const struct f2fs_filename *fname,
< struct page **res_page);
---
> struct fscrypt_name *fname, struct page **res_page);
3222c3142
< const struct f2fs_filename *fname);
---
> struct fscrypt_name *fname);
3224c3144
< const struct fscrypt_str *name, f2fs_hash_t name_hash,
---
> const struct qstr *name, f2fs_hash_t name_hash,
3226c3146,3147
< int f2fs_add_regular_entry(struct inode *dir, const struct f2fs_filename *fname,
---
> int f2fs_add_regular_entry(struct inode *dir, const struct qstr *new_name,
> const struct qstr *orig_name,
3228c3149
< int f2fs_add_dentry(struct inode *dir, const struct f2fs_filename *fname,
---
> int f2fs_add_dentry(struct inode *dir, struct fscrypt_name *fname,
3258c3179,3180
< void f2fs_hash_filename(const struct inode *dir, struct f2fs_filename *fname);
---
> f2fs_hash_t f2fs_dentry_hash(const struct inode *dir,
> const struct qstr *name_info, struct fscrypt_name *fname);
3290d3211
< int f2fs_flush_inline_data(struct f2fs_sb_info *sbi);
3737c3658
< static inline void f2fs_update_sit_info(struct f2fs_sb_info *sbi) {}
---
> static inline void update_sit_info(struct f2fs_sb_info *sbi) {}
3770,3771c3691
< const struct f2fs_filename *fname,
< struct page **res_page);
---
> struct fscrypt_name *fname, struct page **res_page);
3774c3694,3695
< int f2fs_add_inline_entry(struct inode *dir, const struct f2fs_filename *fname,
---
> int f2fs_add_inline_entry(struct inode *dir, const struct qstr *new_name,
> const struct qstr *orig_name,
3873d3793
< int f2fs_truncate_partial_cluster(struct inode *inode, u64 from, bool lock);
3876,3877d3795
< int f2fs_init_compress_mempool(void);
< void f2fs_destroy_compress_mempool(void);
3911,3912d3828
< static inline int f2fs_init_compress_mempool(void) { return 0; }
< static inline void f2fs_destroy_compress_mempool(void) { }
4059,4062d3974
< /* don't update i_compr_blocks if saved blocks were released */
< if (!add && !F2FS_I(inode)->i_compr_blocks)
< return;
<
4103a4016,4017
> if (f2fs_compressed_file(inode))
> return true;