From: Jaegeuk Kim Date: Mon, 30 Jul 2018 21:30:19 +0000 (-0700) Subject: Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73421a4345943a86e04da8625de6e43056341d25;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14 Cherry-picked from origin/upstream-f2fs-stable-linux-4.14.y: 1bb3cca12624 treewide: Use array_size in f2fs_kvzalloc() cf663a62b177 treewide: Use array_size() in f2fs_kzalloc() eac699e689d5 treewide: Use array_size() in f2fs_kmalloc() fc8ab902e92c overflow.h: Add allocation size calculation helpers ccd39d96d179 f2fs: fix to clear FI_VOLATILE_FILE correctly 57344fb5931e f2fs: let sync node IO interrupt async one 6cf9490912e1 f2fs: don't change wbc->sync_mode c4a1d7bb2799 f2fs: fix to update mtime correctly b693f29b245e fs: f2fs: insert space around that ':' and ', ' 9449a17f3306 fs: f2fs: add missing blank lines after declarations b6f703cbed02 fs: f2fs: changed variable type of offset "unsigned" to "loff_t" 9919f98051f9 f2fs: clean up symbol namespace 1a37234c5ed7 f2fs: make set_de_type() static 57d24d20b77b f2fs: make __f2fs_write_data_pages() static e269eadf64b6 f2fs: fix to avoid accessing cross the boundary 3e1842e7ca6c f2fs: fix to let caller retry allocating block address b97a9b930802 disable loading f2fs module on PAGE_SIZE > 4KB 46df5fe2bad4 f2fs: fix error path of move_data_page 1b8f49aeb0e4 f2fs: don't drop dentry pages after fs shutdown 5dbd21b17b63 f2fs: fix to avoid race during access gc_thread pointer b6f0cb185000 f2fs: clean up with clear_radix_tree_dirty_tag b9272dd4161a f2fs: fix to don't trigger writeback during recovery d46792d624ef f2fs: clear discard_wake earlier 161d1c91b80a f2fs: let discard thread wait a little longer if dev is busy 4329d61ca5df f2fs: avoid stucking GC due to atomic write 223d239c6d08 f2fs: introduce sbi->gc_mode to determine the policy c5f57523fcd1 f2fs: keep migration IO order in LFS mode 4a4f98b7e161 f2fs: fix to wait page writeback during revoking atomic write 6c5d01ab37e7 f2fs: Fix deadlock in shutdown ioctl 1f315091b862 f2fs: detect synchronous writeback more earlier c806c4187a0b mm: remove nr_pages argument from pagevec_lookup_{,range}_tag() 8aa71a329503 ceph: use pagevec_lookup_range_nr_tag() b44cc9e860cf mm: add variant of pagevec_lookup_range_tag() taking number of pages af44f89b900b mm: use pagevec_lookup_range_tag() in write_cache_pages() a01f2023a837 mm: use pagevec_lookup_range_tag() in __filemap_fdatawait_range() ed5739e31ed8 nilfs2: use pagevec_lookup_range_tag() 95954b0dbbbb gfs2: use pagevec_lookup_range_tag() 8d62b4b25b8a f2fs: use find_get_pages_tag() for looking up single page 53f38f268a9a f2fs: simplify page iteration loops b0310cc6e6dd f2fs: use pagevec_lookup_range_tag() e62fbfd6d4dd ext4: use pagevec_lookup_range_tag() 106221492410 ceph: use pagevec_lookup_range_tag() 4b65630c0da7 btrfs: use pagevec_lookup_range_tag() 8e8455a68cc2 mm: implement find_get_pages_range_tag() a9a6eb48b7cf f2fs: clean up with is_valid_blkaddr() 992fa7bd773f f2fs: fix to initialize min_mtime with ULLONG_MAX 9af9ec1b6cf5 f2fs: fix to let checkpoint guarantee atomic page persistence d5f8aab3aee8 f2fs: fix to initialize i_current_depth according to inode type 12dab4e61baf Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc" 34f089c52881 f2fs: don't drop any page on f2fs_cp_error() case 76dffc9986e3 f2fs: fix spelling mistake: "extenstion" -> "extension" a5a897aabdbd f2fs: enhance sanity_check_raw_super() to avoid potential overflows f0b5d76682cd f2fs: treat volatile file's data as hot one 50644840d860 f2fs: introduce release_discard_addr() for cleanup 39b292a40288 f2fs: fix potential overflow 76ddd4ff06b8 f2fs: rename dio_rwsem to i_gc_rwsem c75638d5f569 f2fs: move mnt_want_write_file after range check cc7e70c07023 f2fs: fix missing clear FI_NO_PREALLOC in some error case c9b3f46fd20e f2fs: enforce fsync_mode=strict for renamed directory cbbd81cf17fe f2fs: sanity check for total valid node blocks bbd9c950fdec f2fs: sanity check on sit entry d921ced41c40 f2fs: avoid bug_on on corrupted inode 32c00c538e51 f2fs: give message and set need_fsck given broken node id 568765d739df f2fs: clean up commit_inmem_pages() ac2074b52e87 f2fs: do not check F2FS_INLINE_DOTS in recover 1f1473916089 f2fs: remove duplicated dquot_initialize and fix error handling 913efaeca9c6 f2fs: fix to detect failure of dquot_initialize f60d3b8fcc92 f2fs: stop issue discard if something wrong with f2fs 4470ece5c075 f2fs: fix return value in f2fs_ioc_commit_atomic_write 318a9d5ae78c f2fs: allocate hot_data for atomic write more strictly bd5f1c23a7d0 f2fs: check if inmem_pages list is empty correctly 2e405acc866a f2fs: fix race in between GC and atomic open 408e9720d894 f2fs: change le32 to le16 of f2fs_inode->i_extra_size 2f3cee5b22b4 f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries 8cd907eea55d f2fs: correct return value of f2fs_trim_fs 0be91d342a81 f2fs: fix to show missing bits in FS_IOC_GETFLAGS dbfe915c2cf6 f2fs: remove unneeded F2FS_PROJINHERIT_FL ee8586bbd61d f2fs: don't use GFP_ZERO for page caches 50332ac97dd0 f2fs: issue all big range discards in umount process 1c3ec702f06f f2fs: remove redundant block plug 694cd12fe9e4 f2fs: remove unmatched zero_user_segment when convert inline dentry 39c9aacbcdbf f2fs: introduce private inode status mapping 755a8a8a3bfc fscrypt: log the crypto algorithm implementations e81950ade16d fscrypt: add Speck128/256 support 9637768c618d fscrypt: only derive the needed portion of the key deba2007d2a1 fscrypt: separate key lookup from key derivation 04566cd68241 fscrypt: use a common logging function 2a95469530f3 fscrypt: remove internal key size constants fc161f445010 fscrypt: remove unnecessary check for non-logon key type ab8345a11caa fscrypt: make fscrypt_operations.max_namelen an integer 65702a6ef79b fscrypt: drop empty name check from fname_decrypt() 219e65410cae fscrypt: drop max_namelen check from fname_decrypt() ef1def58e2fd fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info() 49ddcfcdd73a fscrypt: don't clear flags on crypto transform ff8225b62ca0 fscrypt: remove stale comment from fscrypt_d_revalidate() 712401bc77ff fscrypt: remove error messages for skcipher_request_alloc() failure 6e4e39cc922c fscrypt: remove unnecessary NULL check when allocating skcipher 42b3feb2bd76 fscrypt: clean up after fscrypt_prepare_lookup() conversions e43a072723f7 ubifs: switch to fscrypt_prepare_lookup() f76b2cb6733b ext4: switch to fscrypt_prepare_lookup() fc30ddc3b039 fscrypt: use unbound workqueue for decryption Change-Id: I3912aa38b2bf515ef8af8ed4945e54bc63945c86 Signed-off-by: Jaegeuk Kim --- 73421a4345943a86e04da8625de6e43056341d25 diff --cc fs/f2fs/inline.c index 156ac4ff491a,043830be5662..3f0c74d23642 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@@ -86,21 -86,8 +87,21 @@@ int f2fs_read_inline_data(struct inode { struct page *ipage; + if (trace_android_fs_dataread_start_enabled()) { + char *path, pathbuf[MAX_TRACE_PATHBUF_LEN]; + + path = android_fstrace_get_pathname(pathbuf, + MAX_TRACE_PATHBUF_LEN, + inode); + trace_android_fs_dataread_start(inode, page_offset(page), + PAGE_SIZE, current->pid, + path, current->comm); + } + - ipage = get_node_page(F2FS_I_SB(inode), inode->i_ino); + ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino); if (IS_ERR(ipage)) { + trace_android_fs_dataread_end(inode, page_offset(page), + PAGE_SIZE); unlock_page(page); return PTR_ERR(ipage); } diff --cc fs/f2fs/namei.c index 75e37fd720b2,5d2d822092a2..64050c84d353 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@@ -292,9 -295,10 +295,9 @@@ static int f2fs_create(struct inode *di goto out; f2fs_unlock_op(sbi); - alloc_nid_done(sbi, ino); + f2fs_alloc_nid_done(sbi, ino); - unlock_new_inode(inode); - d_instantiate(dentry, inode); + d_instantiate_new(dentry, inode); if (IS_DIRSYNC(dir)) f2fs_sync_fs(sbi->sb, 1); @@@ -657,9 -662,10 +660,9 @@@ static int f2fs_mkdir(struct inode *dir goto out_fail; f2fs_unlock_op(sbi); - alloc_nid_done(sbi, inode->i_ino); + f2fs_alloc_nid_done(sbi, inode->i_ino); - unlock_new_inode(inode); - d_instantiate(dentry, inode); + d_instantiate_new(dentry, inode); if (IS_DIRSYNC(dir)) f2fs_sync_fs(sbi->sb, 1); @@@ -708,9 -714,10 +711,9 @@@ static int f2fs_mknod(struct inode *dir goto out; f2fs_unlock_op(sbi); - alloc_nid_done(sbi, inode->i_ino); + f2fs_alloc_nid_done(sbi, inode->i_ino); - unlock_new_inode(inode); - d_instantiate(dentry, inode); + d_instantiate_new(dentry, inode); if (IS_DIRSYNC(dir)) f2fs_sync_fs(sbi->sb, 1);