1. 26 Dec, 2018 7 commits
    • Qiuyang Sun's avatar
      f2fs: fix block address for __check_sit_bitmap · 9249dded
      Qiuyang Sun authored
      Should use lstart (logical start address) instead of start (in dev) here.
      This fixes a bug in multi-device scenarios.
      Signed-off-by: default avatarQiuyang Sun <sunqiuyang@huawei.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      9249dded
    • Sahitya Tummala's avatar
      f2fs: fix sbi->extent_list corruption issue · e4589fa5
      Sahitya Tummala authored
      When there is a failure in f2fs_fill_super() after/during
      the recovery of fsync'd nodes, it frees the current sbi and
      retries again. This time the mount is successful, but the files
      that got recovered before retry, still holds the extent tree,
      whose extent nodes list is corrupted since sbi and sbi->extent_list
      is freed up. The list_del corruption issue is observed when the
      file system is getting unmounted and when those recoverd files extent
      node is being freed up in the below context.
      
      list_del corruption. prev->next should be fffffff1e1ef5480, but was (null)
      <...>
      kernel BUG at kernel/msm-4.14/lib/list_debug.c:53!
      lr : __list_del_entry_valid+0x94/0xb4
      pc : __list_del_entry_valid+0x94/0xb4
      <...>
      Call trace:
      __list_del_entry_valid+0x94/0xb4
      __release_extent_node+0xb0/0x114
      __free_extent_tree+0x58/0x7c
      f2fs_shrink_extent_tree+0xdc/0x3b0
      f2fs_leave_shrinker+0x28/0x7c
      f2fs_put_super+0xfc/0x1e0
      generic_shutdown_super+0x70/0xf4
      kill_block_super+0x2c/0x5c
      kill_f2fs_super+0x44/0x50
      deactivate_locked_super+0x60/0x8c
      deactivate_super+0x68/0x74
      cleanup_mnt+0x40/0x78
      __cleanup_mnt+0x1c/0x28
      task_work_run+0x48/0xd0
      do_notify_resume+0x678/0xe98
      work_pending+0x8/0x14
      
      Fix this by not creating extents for those recovered files if shrinker is
      not registered yet. Once mount is successful and shrinker is registered,
      those files can have extents again.
      Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      e4589fa5
    • Chao Yu's avatar
      f2fs: clean up checkpoint flow · 8ec18bff
      Chao Yu authored
      This patch cleans up checkpoint flow a bit:
      - remove unneeded circulation of flushing meta pages.
      - don't flush nat_bits pages in prior to other checkpoint pages.
      - add bug_on to check remained meta pages after flushing.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      8ec18bff
    • Jaegeuk Kim's avatar
      f2fs: flush stale issued discard candidates · 76c7bfb3
      Jaegeuk Kim authored
      Sometimes, I could observe # of issuing_discard to be 1 which blocks background
      jobs due to is_idle()=false.
      The only way to get out of it was to trigger gc_urgent. This patch avoids that
      by checking any candidates as done in the list.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      76c7bfb3
    • Jaegeuk Kim's avatar
      f2fs: correct wrong spelling, issing_* · 72691af6
      Jaegeuk Kim authored
      Let's use "queued" instead of "issuing".
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      72691af6
    • Jaegeuk Kim's avatar
      f2fs: use kvmalloc, if kmalloc is failed · 5222595d
      Jaegeuk Kim authored
      One report says memalloc failure during mount.
      
       (unwind_backtrace) from [<c010cd4c>] (show_stack+0x10/0x14)
       (show_stack) from [<c049c6b8>] (dump_stack+0x8c/0xa0)
       (dump_stack) from [<c024fcf0>] (warn_alloc+0xc4/0x160)
       (warn_alloc) from [<c0250218>] (__alloc_pages_nodemask+0x3f4/0x10d0)
       (__alloc_pages_nodemask) from [<c0270450>] (kmalloc_order_trace+0x2c/0x120)
       (kmalloc_order_trace) from [<c03fa748>] (build_node_manager+0x35c/0x688)
       (build_node_manager) from [<c03de494>] (f2fs_fill_super+0xf0c/0x16cc)
       (f2fs_fill_super) from [<c02a5864>] (mount_bdev+0x15c/0x188)
       (mount_bdev) from [<c03da624>] (f2fs_mount+0x18/0x20)
       (f2fs_mount) from [<c02a68b8>] (mount_fs+0x158/0x19c)
       (mount_fs) from [<c02c3c9c>] (vfs_kern_mount+0x78/0x134)
       (vfs_kern_mount) from [<c02c76ac>] (do_mount+0x474/0xca4)
       (do_mount) from [<c02c8264>] (SyS_mount+0x94/0xbc)
       (SyS_mount) from [<c0108180>] (ret_fast_syscall+0x0/0x48)
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      5222595d
    • Yunlong Song's avatar
      f2fs: remove redundant comment of unused wio_mutex · af56b487
      Yunlong Song authored
      Commit 089842de ("f2fs: remove codes of unused wio_mutex") removes codes
      of unused wio_mutex, but missing the comment, so delete it.
      Signed-off-by: default avatarYunlong Song <yunlong.song@huawei.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      af56b487
  2. 14 Dec, 2018 3 commits
  3. 28 Nov, 2018 1 commit
  4. 27 Nov, 2018 4 commits
  5. 26 Nov, 2018 22 commits
  6. 25 Nov, 2018 3 commits