1. 24 2月, 2017 5 次提交
  2. 23 2月, 2017 1 次提交
  3. 29 1月, 2017 1 次提交
  4. 26 11月, 2016 2 次提交
    • C
      f2fs: fix to account total free nid correctly · 04d47e67
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      04d47e67
    • Y
      f2fs: fix an infinite loop when flush nodes in cp · d40a43af
      Yunlei He 提交于
      Thread A			Thread B
      
      - write_checkpoint
       - block_operations
         -blk_start_plug
          -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: NYunlei He <heyunlei@huawei.com>
      Signed-off-by: NPengyang Hou <houpengyang@huawei.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d40a43af
  5. 24 11月, 2016 9 次提交
  6. 03 11月, 2016 1 次提交
  7. 01 11月, 2016 1 次提交
  8. 01 10月, 2016 3 次提交
    • C
      f2fs: fix to commit bio cache after flushing node pages · 3f5f4959
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      3f5f4959
    • C
      f2fs: support configuring fault injection per superblock · 1ecc0c5c
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1ecc0c5c
    • W
      f2fs: add customized migrate_page callback · 5b7a487c
      Weichao Guo 提交于
      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: NWeichao Guo <guoweichao@huawei.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      [Jaegeuk Kim: fix some coding style]
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      5b7a487c
  9. 16 9月, 2016 1 次提交
  10. 14 9月, 2016 1 次提交
  11. 30 8月, 2016 1 次提交
  12. 19 8月, 2016 1 次提交
  13. 21 7月, 2016 1 次提交
  14. 16 7月, 2016 2 次提交
  15. 09 7月, 2016 5 次提交
  16. 07 7月, 2016 1 次提交
  17. 08 6月, 2016 2 次提交
  18. 03 6月, 2016 2 次提交
    • Y
      f2fs: return the errno to the caller to avoid using a wrong page · 0c9df7fb
      Yunlong Song 提交于
      Commit aaf96075 ("f2fs: check node page
      contents all the time") pointed out that "sometimes it was reported that
      its contents was missing", so it checks the page's mapping and contents.
      When "nid != nid_of_node(page)", ERR_PTR(-EIO) will be returned to the
      caller. However, commit e1c51b9f ("f2fs:
      clean up node page updating flow") moves "nid != nid_of_node(page)" test
      to "f2fs_bug_on(sbi, nid != nid_of_node(page))", this will return a
      wrong page to the caller when F2FS_CHECK_FS is off when "sometimes it
      was reported that its contents was missing" happens.
      
      This patch restores to check node page contents all the time, and
      returns the errno to make the caller known something is wrong and avoid
      to use the page. This patch also moves f2fs_bug_on to its proper location.
      Signed-off-by: NYunlong Song <yunlong.song@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0c9df7fb
    • J
      f2fs: avoid unnecessary updating inode during fsync · 26de9b11
      Jaegeuk Kim 提交于
      If roll-forward recovery can recover i_size, we don't need to update inode's
      metadata during fsync.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      26de9b11