aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ANDROID: Put KUSER_HELPERS disable behind configmspector2017-04-132-4/+22
| | | | | | | | | | | | | This change puts the KUSER_HELPERS selective disable behind the KCONFIG KUSER_HELPERS_SELECTIVE_DISABLE. Original patch adding KUSER_HELPERS: 2bed8acb3c3d44c66d979fed9bdd4ea69cb8650b I8d6d75cc8e1b2280f2436fd3334ff3779ae3539a Signed-off-by: mspector <mspector@google.com> Change-Id: I54c606f1f39823abf0a754eef69569cbfb63f8af Bug: 34815073
* ANDROID: Fixing incorrect return value on errormspector2017-04-131-2/+6
| | | | | | | | | | | | This fixes an incorrect return value from should_call_arch_setup_additional_pages when kernel_read returns a different length than expected, the length is returned. The fix is to return -EIO instead. Signed-off-by: mspector <mspector@google.com> Bug: 34749002 Change-Id: I484ad801ce114b4dfe9f62b8b83c960cb693c9b6
* ANDROID: Fix for building non-arm64mspector2017-04-131-0/+2
| | | | | | | | This patch fixes the build break for arch=um Signed-off-by: mspector <mspector@google.com> Bug: 33689037 Change-Id: I245cd39a5ed41c884422b69720afcba7a55b42e1
* ANDROID: Support to disable arm32 Kuser_Helpersmspector2017-04-131-5/+102
| | | | | | | | | | This patch adds support to disable kuser_helpers from being mapped into 32 bit processes on arm64. It also adds an ELF note that tells the kernel to map the page in for the specific process. Signed-off-by: mspector <mspector@google.com> Bug: 33689037 Change-Id: I8d6d75cc8e1b2280f2436fd3334ff3779ae3539a
* ANDROID: base-cfg: enable CONFIG_IP_NF_NATAmit Pundir2017-04-131-0/+1
| | | | | | | | | | | | | | IP_NF_TARGET_{MASQUERADE,NETMAP,REDIRECT} configs, already enabled in android-base.cfg for tethering, are of no use if CONFIG_IP_NF_NAT is not enabled. Don't rely on platform config for that and enable CONFIG_IP_NF_NAT in android-base.cfg as well. Change-Id: Ic72bcebbd925b142b09539466bf963188c83108a Signed-off-by: Amit Pundir <amit.pundir@linaro.org> (cherry picked from commit 9f6bbb427fc67e5caceec70741def34234078f97) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* android: base-cfg: Add CONFIG_INET_DIAG_DESTROYDmitry Shmidt2017-04-131-0/+1
| | | | | | | Change-Id: I67430b05eca8fd520d2795d3db60faf2ec0fab9e Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit 03fbd079bac71e15a414082cb5aee980ce2935be) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* defconfig: remove CONFIG_IPV6_PRIVACYMister Oyster2017-04-131-1/+0
|
* config/android: Remove CONFIG_IPV6_PRIVACYBorislav Petkov2017-04-131-1/+0
| | | | | | | | | | | | | Option is long gone, see commit 5d9efa7ee99e ("ipv6: Remove privacy config option.") Link: http://lkml.kernel.org/r/20160811170340.9859-1-bp@alien8.de Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit a2c6a235dbf4318fc7f7981932478e6c47f093ab) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* ipv6: Remove privacy config option.David S. Miller2017-04-134-62/+4
| | | | | | | | The code for privacy extentions is very mature, and making it configurable only gives marginal memory/code savings in exchange for obfuscation and hard to read code via CPP ifdef'ery. Signed-off-by: David S. Miller <davem@davemloft.net>
* defconfig: regenMister Oyster2017-04-131-13/+17
|
* f2fs: use __set{__clear}_bit_leJaegeuk Kim2017-04-131-3/+3
| | | | | | | This patch uses __set{__clear}_bit_le for highter speed. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: update_free_nid_bitmap() can be statickbuild test robot2017-04-131-2/+2
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: __update_nat_bits() can be statickbuild test robot2017-04-131-1/+1
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: le16_to_cpu for xattr->e_value_sizeJaegeuk Kim2017-04-131-1/+3
| | | | | | | This patch fixes missing le16 conversion, reported by kbuild test robot. Fixes: 5f35a2cd5 ("f2fs: Don't update the xattr data that same as the exist") Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: don't overwrite node block by SSRJaegeuk Kim2017-04-131-0/+6
| | | | | | | | | This patch fixes that SSR can overwrite previous warm node block consisting of a node chain since the last checkpoint. Fixes: 5b6c6be2d878 ("f2fs: use SSR for warm node as well") Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: don't need to invalidate wrong node pageJaegeuk Kim2017-04-131-1/+4
| | | | | | | | If f2fs_new_inode() is failed, the bad inode will invalidate 0'th node page during f2fs_evict_inode(), which doesn't need to do. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: fix an error return value in truncate_partial_data_pageYunlei He2017-04-131-1/+1
| | | | | | | This patch fix a error return value in truncate_partial_data_page Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* fscrypt: catch up to v4.11-rc1Jaegeuk Kim2017-04-1317-812/+896
| | | | | | | | | | | | | | | Keep validate_user_key() due to kasprintf() panic. fscrypt: - skcipher_ -> ablkcipher_ - fs/crypto/bio.c changes f2fs: - fscrypt: use ENOKEY when file cannot be created w/o key - fscrypt: split supp and notsupp declarations into their own headers - fscrypt: make fscrypt_operations.key_prefix a string Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: avoid to flush nat journal entriesJaegeuk Kim2017-04-131-1/+1
| | | | | | | | | | This patch adds a missing condition which flushes nat journal entries unnecessarily introduced by: f2fs: add bitmaps for empty or full NAT blocks Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: avoid to issue redundant discard commandsJaegeuk Kim2017-04-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If segs_per_sec is over 1 like under SMR, previously f2fs issues discard commands redundantly on the same section, since we didn't move end position for the previous discard command. E.g., start end | | prefree_bitmap = [01111100111100] And, after issue discard for this section, end start | | prefree_bitmap = [01111100111100] Select this section again by searching from (end + 1), start end | | prefree_bitmap = [01111100111100] Fixes: 36abef4e796d38 ("f2fs: introduce mode=lfs mount option") Cc: <stable@vger.kernel.org> Cc: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: fix a plint compile warningHou Pengyang2017-04-131-1/+1
| | | | | | | | | fix such pclint warning: ... Loss of precision (arg. no. 2) (unsigned long long to unsigned int)) Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: add f2fs_drop_inode tracepointHou Pengyang2017-04-132-2/+12
| | | | | Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: Fix zoned block device supportMasato Suzuki2017-04-131-23/+48
| | | | | | | | | | | | | | | | | | | | | | | The introduction of the multi-device feature partially broke the support for zoned block devices. In the function f2fs_scan_devices, sbi->devs allocation and initialization is skipped in the case of a single device mount. This result in no device information structure being allocated for the device. This is fine if the device is a regular device, but in the case of a zoned block device, the device zone type array is not initialized, which causes the function __f2fs_issue_discard_zone to fail as get_blkz_type is unable to determine the zone type of a section. Fix this by always allocating and initializing the sbi->devs device information array even in the case of a single device if that device is zoned. For this particular case, make sure to obtain a reference on the single device so that the call to blkdev_put() in destroy_device_list operates as expected. Fixes: 3c62be17d4f562f4 ("f2fs: support multiple devices") Cc: <stable@vger.kernel.org> # v4.10 Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: remove redundant set_page_dirty()Yunlei He2017-04-131-2/+1
| | | | | | | This patch remove redundant set_page_dirty in truncate_blocks Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: fix to enlarge size of write_io_dummy mempoolChao Yu2017-04-131-1/+1
| | | | | | | | It needs to double cache size of write_io_dummy mempool, otherwise we may run out of cache in scenraio of Data/Node IOs were issued concurrently. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: fix memory leak of write_io_dummy mempool during umountChao Yu2017-04-131-1/+2
| | | | | Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: fix to update F2FS_{CP_}WB_DATA count correctlyChao Yu2017-04-131-1/+2
| | | | | | | We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: use MAX_FREE_NIDS for the free nids targetKinglong Mee2017-04-131-5/+3
| | | | | | | | F2FS has define MAX_FREE_NIDS for maximum of cached free nids target. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: introduce free nid bitmapChao Yu2017-04-134-11/+121
| | | | | | | | | | | | | | | | | | | | | | In scenario of intensively node allocation, free nids will be ran out soon, then it needs to stop to load free nids by traversing NAT blocks, in worse case, if NAT blocks does not be cached in memory, it generates IOs which slows down our foreground operations. In order to speed up node allocation, in this patch we introduce a new free_nid_bitmap array, so there is an bitmap table for each NAT block, Once the NAT block is loaded, related bitmap cache will be switched on, and bitmap will be set during traversing nat entries in NAT block, later we can query and update nid usage status in memory completely. With such implementation, I expect performance of node allocation can be improved in the long-term after filesystem image is mounted. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: include/linux/f2fs_fs.h
* f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpointKinglong Mee2017-04-134-19/+15
| | | | | | | | There are four places that getting the crc value in f2fs_checkpoint, just add a new helper cur_cp_crc for them. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: update the comment of default nr_pages to skippingKinglong Mee2017-04-131-2/+2
| | | | | | Fixes: 2c237ebaa4 ("f2fs: avoid writing node/metapages during writes") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: drop the duplicate pval in f2fs_getxattrKinglong Mee2017-04-131-3/+0
| | | | | | Fixes: ba38c27eb9 ("f2fs: enhance lookup xattr") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: Don't update the xattr data that same as the existKinglong Mee2017-04-131-4/+16
| | | | | | | | f2fs removes the old xattr data and appends the new data although the new data is same as the exist. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: kill __is_extent_sameChao Yu2017-04-132-12/+3
| | | | | | | | | | | | | | Since commit ee6d182f2a19 ("f2fs: remove syncing inode page in all the cases") delayed inode element updating from inode cache to node page cache, so once largest cached extent is updated, we can make inode dirty immediately instead of checking and updating it in the end of extent cache update. The above commit didn't clean up unneeded codes in extent_cache.c, let's finish the job in this patch. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: avoid bggc->fggc when enough free segments are avaliable after cpHou Pengyang2017-04-131-8/+9
| | | | | | | | | | | | | | | | | | | We use has_not_enough_free_secs to check if there are enough free segments, (free_sections(sbi) + freed) <= (node_secs + 2 * dent_secs + imeta_secs + reserved_sections(sbi) + needed); Under scenario with large number of dirty nodes, these nodes would be flushed during cp, as a result, right side of the inequality would be decreased, while left side stays unchanged if these nodes are flushed in SSR way, which means there are enough free segments after this cp. For this case, we just do a bggc instead of fggc. Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: select target segment with closer temperature in SSR modeChao Yu2017-04-131-6/+17
| | | | | | | | | | | | In SSR mode, we can allocate target segment which has different temperature type from the type of current block, in order to avoid mixing coldest and hottest data/node as much as possible, change SSR allocation policy to select closer temperature for current block prior. Signed-off-by: Yunlong Song <yunlong.song@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: show simple call stack in fault injection messageChao Yu2017-04-138-13/+32
| | | | | | | | | | | | | Previously kernel message can show that in which function we do the injection, but unfortunately, most of the caller are the same, for tracking more information of injection path, it needs to show upper caller's name. This patch supports that ability. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: fs/f2fs/data.c
* fscrypt: catch fscrypto_get_policy in v4.10-rc6Jaegeuk Kim2017-04-134-42/+53
| | | | Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: use __clear_bit_leJaegeuk Kim2017-04-131-1/+1
| | | | Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: no need lock_op in f2fs_write_inline_dataYunlei He2017-04-131-2/+5
| | | | | | | | | Similar as f2fs_write_inode, f2fs_write_inline_data just mark inode page dirty, so it's no need to write inline data under read lock of cp_rwsem. Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: add bitmaps for empty or full NAT blocksJaegeuk Kim2017-04-136-20/+231
| | | | | | | | | | | | | | | | | This patches adds bitmaps to represent empty or full NAT blocks containing free nid entries. If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll use these bitmaps when building free nids. In order to avoid checkpointing burden, up-to-date bitmaps will be flushed only during umount time. So, normally we can get this gain, but when power-cut happens, we rely on fsck.f2fs which recovers this bitmap again. After this patch, we build free nids from nid #0 at mount time to make more full NAT blocks, but in runtime, we check empty NAT blocks to load free nids without loading any NAT pages from disk. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: replace rw semaphore extent_tree_lock with mutex lockYunlei He2017-04-132-12/+12
| | | | | | | | This patch replace rw semaphore extent_tree_lock with mutex lock for no read cases with this lock. Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: avoid m_flags overlay when allocating more data blocksKinglong Mee2017-04-131-1/+1
| | | | | | | | When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED flags will be overlapped by F2FS_MAP_NEW at the later times. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: remove unsafe bitmap checkingHou Pengyang2017-04-131-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | proc A: proc B: - writeback_sb_inodes - __writeback_single_inode - do_writepages - f2fs_write_node_pages - f2fs_balance_fs_bg - write_checkpoint - build_free_nids - flush_nat_entries - __build_free_nids - __flush_nat_entry_set - ra_meta_pages - get_next_nat_page - current_nat_addr - set_to_next_nat [do nat_bitmap checking] - f2fs_change_bit For proc A, nat_bitmap and nat_bitmap_mir would be compared without lock_op and nm_i->nat_tree_lock, while proc B is changing nat_bitmap/nat_bitmap_ver in cp. So it is normal for nat_bitmap/nat_bitmap diffrence under such scenario. This patch fix this by removing the monitoring point. [Fix: 599a09b f2fs: check in-memory nat version bitmap] Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: init local extent_info to avoid stale stack info in tpHou Pengyang2017-04-132-5/+5
| | | | | | | | | | | To avoid such stale(fops, blk, len) info in f2fs_lookup_extent_tree_end tp dio-23095 [005] ...1 17878.856859: f2fs_lookup_extent_tree_end: dev = (259,30), ino = 856, pgofs = 0, ext_info(fofs: 3441207040, blk: 4294967232, len: 3481143808) Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: remove unnecessary condition check for write_checkpoint in f2fs_gcYunlong Song2017-04-131-9/+3
| | | | | | | | | Since has_not_enough_free_secs(sbi, 0, 0) must be true if has_not_enough_ free_secs(sbi, sec_freed, 0) is true, write_checkpoint is sure to execute in both conditions. Signed-off-by: Yunlong Song <yunlong.song@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: do SSR for node segments more aggresivelyJaegeuk Kim2017-04-131-5/+10
| | | | | | This patch gives more SSR chances for node blocks. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: check discard alignment only for SEQWRITE zonesJaegeuk Kim2017-04-131-12/+12
| | | | | | | | | | For converntional zones, we don't need to align discard commands to exact zone size. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: fs/f2fs/segment.c
* f2fs: wait for discard completion after submissionJaegeuk Kim2017-04-131-3/+13
| | | | | | We don't need to wait for each discard commands when unmounting the image. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: much larger batched trim_fs jobJaegeuk Kim2017-04-131-1/+1
| | | | | | | We have a kernel thread to issue discard commands, so we can increase the number of batched discard sections. By default, now it becomes 4GB range. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>