1. 23 1月, 2018 6 次提交
    • S
      f2fs: avoid hungtask when GC encrypted block if io_bits is set · a9d572c7
      Sheng Yong 提交于
      When io_bits is set, GCing encrypted block may hit the following hungtask.
      Since io_bits requires aligned block address, f2fs_submit_page_write may
      return -EAGAIN if new_blkaddr does not satisify io_bits alignment. As a
      result, the encrypted page will never be writtenback.
      
      This patch makes move_data_block aware the EAGAIN error and cancel the
      writeback.
      
      [  246.751371] INFO: task kworker/u4:4:797 blocked for more than 90 seconds.
      [  246.752423]       Not tainted 4.15.0-rc4+ #11
      [  246.754176] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [  246.755336] kworker/u4:4    D25448   797      2 0x80000000
      [  246.755597] Workqueue: writeback wb_workfn (flush-7:0)
      [  246.755616] Call Trace:
      [  246.755695]  ? __schedule+0x322/0xa90
      [  246.755761]  ? blk_init_request_from_bio+0x120/0x120
      [  246.755773]  ? pci_mmcfg_check_reserved+0xb0/0xb0
      [  246.755801]  ? __radix_tree_create+0x19e/0x200
      [  246.755813]  ? delete_node+0x136/0x370
      [  246.755838]  schedule+0x43/0xc0
      [  246.755904]  io_schedule+0x17/0x40
      [  246.755939]  wait_on_page_bit_common+0x17b/0x240
      [  246.755950]  ? wake_page_function+0xa0/0xa0
      [  246.755961]  ? add_to_page_cache_lru+0x160/0x160
      [  246.755972]  ? page_cache_tree_insert+0x170/0x170
      [  246.755983]  ? __lru_cache_add+0x96/0xb0
      [  246.756086]  __filemap_fdatawait_range+0x14f/0x1c0
      [  246.756097]  ? wait_on_page_bit_common+0x240/0x240
      [  246.756120]  ? __wake_up_locked_key_bookmark+0x20/0x20
      [  246.756167]  ? wait_on_all_pages_writeback+0xc9/0x100
      [  246.756179]  ? __remove_ino_entry+0x120/0x120
      [  246.756192]  ? wait_woken+0x100/0x100
      [  246.756204]  filemap_fdatawait_range+0x9/0x20
      [  246.756216]  write_checkpoint+0x18a1/0x1f00
      [  246.756254]  ? blk_get_request+0x10/0x10
      [  246.756265]  ? cpumask_next_and+0x43/0x60
      [  246.756279]  ? f2fs_sync_inode_meta+0x160/0x160
      [  246.756289]  ? remove_element.isra.4+0xa0/0xa0
      [  246.756300]  ? __put_compound_page+0x40/0x40
      [  246.756310]  ? f2fs_sync_fs+0xec/0x1c0
      [  246.756320]  ? f2fs_sync_fs+0x120/0x1c0
      [  246.756329]  f2fs_sync_fs+0x120/0x1c0
      [  246.756357]  ? trace_event_raw_event_f2fs__page+0x260/0x260
      [  246.756393]  ? ata_build_rw_tf+0x173/0x410
      [  246.756397]  f2fs_balance_fs_bg+0x198/0x390
      [  246.756405]  ? drop_inmem_page+0x230/0x230
      [  246.756415]  ? ahci_qc_prep+0x1bb/0x2e0
      [  246.756418]  ? ahci_qc_issue+0x1df/0x290
      [  246.756422]  ? __accumulate_pelt_segments+0x42/0xd0
      [  246.756426]  ? f2fs_write_node_pages+0xd1/0x380
      [  246.756429]  f2fs_write_node_pages+0xd1/0x380
      [  246.756437]  ? sync_node_pages+0x8f0/0x8f0
      [  246.756440]  ? update_curr+0x53/0x220
      [  246.756444]  ? __accumulate_pelt_segments+0xa2/0xd0
      [  246.756448]  ? __update_load_avg_se.isra.39+0x349/0x360
      [  246.756452]  ? do_writepages+0x2a/0xa0
      [  246.756456]  do_writepages+0x2a/0xa0
      [  246.756460]  __writeback_single_inode+0x70/0x490
      [  246.756463]  ? check_preempt_wakeup+0x199/0x310
      [  246.756467]  writeback_sb_inodes+0x2a2/0x660
      [  246.756471]  ? is_empty_dir_inode+0x40/0x40
      [  246.756474]  ? __writeback_single_inode+0x490/0x490
      [  246.756477]  ? string+0xbf/0xf0
      [  246.756480]  ? down_read_trylock+0x35/0x60
      [  246.756484]  __writeback_inodes_wb+0x9f/0xf0
      [  246.756488]  wb_writeback+0x41d/0x4b0
      [  246.756492]  ? writeback_inodes_wb.constprop.55+0x150/0x150
      [  246.756498]  ? set_worker_desc+0xf7/0x130
      [  246.756502]  ? current_is_workqueue_rescuer+0x60/0x60
      [  246.756511]  ? _find_next_bit+0x2c/0xa0
      [  246.756514]  ? wb_workfn+0x400/0x5d0
      [  246.756518]  wb_workfn+0x400/0x5d0
      [  246.756521]  ? finish_task_switch+0xdf/0x2a0
      [  246.756525]  ? inode_wait_for_writeback+0x30/0x30
      [  246.756529]  process_one_work+0x3a7/0x6f0
      [  246.756533]  worker_thread+0x82/0x750
      [  246.756537]  kthread+0x16f/0x1c0
      [  246.756541]  ? trace_event_raw_event_workqueue_work+0x110/0x110
      [  246.756544]  ? kthread_create_worker_on_cpu+0xb0/0xb0
      [  246.756548]  ret_from_fork+0x1f/0x30
      Signed-off-by: NSheng Yong <shengyong1@huawei.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a9d572c7
    • J
      f2fs: allow quota to use reserved blocks · d8a9a229
      Jaegeuk Kim 提交于
      This patch allows quota to use reserved blocks all the time.
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d8a9a229
    • C
      f2fs: fix to drop all inmem pages correctly · a2e2e76b
      Chao Yu 提交于
      In commit 57864ae5 ("f2fs: limit # of inmemory pages"), we have
      limited memory footprint of all inmem pages with 20% of total memory,
      otherwise, if we exceed the threshold, we will try to drop all inmem
      pages to avoid excessive memory pressure resulting in performance
      regression.
      
      But in some unrelated error paths, we will also drop all inmem pages,
      which should be wrong, fix it in this patch.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a2e2e76b
    • C
      f2fs: speed up defragment on sparse file · f3d98e74
      Chao Yu 提交于
      We have supported to get next page offset with valid mapping crossing
      hole in f2fs_map_blocks, utilizing it to speed up defragment on sparse
      file.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      f3d98e74
    • C
      f2fs: support F2FS_IOC_PRECACHE_EXTENTS · c4020b2d
      Chao Yu 提交于
      This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache
      extent info like ext4, in order to gain better performance during
      triggering AIO by eliminating synchronous waiting of mapping info.
      
      Referred commit: 7869a4a6 ("ext4: add support for extent pre-caching")
      
      In addition, with newly added extent precache abilitiy, this patch add
      to support FIEMAP_FLAG_CACHE in ->fiemap.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      c4020b2d
    • J
      f2fs: add an ioctl to disable GC for specific file · 1ad71a27
      Jaegeuk Kim 提交于
      This patch gives a flag to disable GC on given file, which would be useful, when
      user wants to keep its block map. It also conducts in-place-update for dontmove
      file.
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1ad71a27
  2. 19 1月, 2018 6 次提交
  3. 17 1月, 2018 9 次提交
  4. 04 1月, 2018 3 次提交
  5. 03 1月, 2018 16 次提交