1. 28 Feb, 2017 1 commit
  2. 27 Feb, 2017 5 commits
  3. 23 Feb, 2017 7 commits
  4. 29 Jan, 2017 1 commit
  5. 25 Nov, 2016 2 commits
    • Chao Yu's avatar
      f2fs: fix to account total free nid correctly · 04d47e67
      Chao Yu authored
      Thread A		Thread B		Thread C
      - f2fs_create
       - f2fs_new_inode
        - f2fs_lock_op
         - alloc_nid
          alloc last nid
        - f2fs_unlock_op
      			- f2fs_create
      			 - f2fs_new_inode
      			  - f2fs_lock_op
      			   - alloc_nid
      			    as node count still not
      			    be increased, we will
      			    loop in alloc_nid
      						- f2fs_write_node_pages
      						 - f2fs_balance_fs_bg
      						  - f2fs_sync_fs
      						   - write_checkpoint
      						    - block_operations
      						     - f2fs_lock_all
       - f2fs_lock_op
      While creating new inode, we do not allocate and account nid atomically,
      so that when there is almost no free nids left, we may encounter deadloop
      like above stack.
      In order to avoid that, reuse nm_i::available_nids for accounting free nids
      and make nid allocation and counting being atomical during node creation.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    • Yunlei He's avatar
      f2fs: fix an infinite loop when flush nodes in cp · d40a43af
      Yunlei He authored
      Thread A			Thread B
      - write_checkpoint
       - block_operations
          -sync_node_pages		- f2fs_do_sync_file
      				 - fsync_node_pages
      				  - f2fs_wait_on_page_writeback
      Thread A wait for global F2FS_DIRTY_NODES decreased to zero,
      it start a plug list, some requests have been added to this list.
      Thread B lock one dirty node page, and wait this page write back.
      But this page has been in plug list of thread A with PG_writeback flag.
      Thread A keep on running and its plug list has no chance to finish,
      so it seems a deadlock between cp and fsync path.
      This patch add a wait on page write back before set node page dirty
      to avoid this problem.
      Signed-off-by: default avatarYunlei He <heyunlei@huawei.com>
      Signed-off-by: default avatarPengyang Hou <houpengyang@huawei.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
  6. 23 Nov, 2016 9 commits
  7. 02 Nov, 2016 1 commit
  8. 01 Nov, 2016 1 commit
  9. 01 Oct, 2016 3 commits
    • Chao Yu's avatar
      f2fs: fix to commit bio cache after flushing node pages · 3f5f4959
      Chao Yu authored
      In sync_node_pages, we won't check and commit last merged pages in private
      bio cache of f2fs, as these pages were taged as writeback, someone who is
      waiting for writebacking of the page will be blocked until the cache was
      committed by someone else.
      We need to commit node type bio cache to avoid potential deadlock or long
      delay of waiting writeback.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    • Chao Yu's avatar
      f2fs: support configuring fault injection per superblock · 1ecc0c5c
      Chao Yu authored
      Previously, we only support global fault injection configuration, so that
      when we configure type/rate of fault injection through sysfs, mount
      option, it will influence all f2fs partition which is being used.
      It is not make sence, since it will be not convenient if developer want
      to test separated partitions with different fault injection rate/type
      simultaneously, also it's not possible to enable fault injection in one
      partition and disable fault injection in other one.
      >From now on, we move global configuration of fault injection in module
      into per-superblock, hence injection testing can be more flexible.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    • Weichao Guo's avatar
      f2fs: add customized migrate_page callback · 5b7a487c
      Weichao Guo authored
      This patch improves the migration of dirty pages and allows migrating atomic
      written pages that F2FS uses in Page Cache. Instead of the fallback releasing
      page path, it provides better performance for memory compaction, CMA and other
      users of memory page migrating. For dirty pages, there is no need to write back
      first when migrating. For an atomic written page before committing, we can
      migrate the page and update the related 'inmem_pages' list at the same time.
      Signed-off-by: default avatarWeichao Guo <guoweichao@huawei.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      [Jaegeuk Kim: fix some coding style]
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
  10. 16 Sep, 2016 1 commit
  11. 13 Sep, 2016 1 commit
  12. 30 Aug, 2016 1 commit
  13. 19 Aug, 2016 1 commit
  14. 20 Jul, 2016 1 commit
  15. 15 Jul, 2016 2 commits
  16. 08 Jul, 2016 3 commits