1. 28 2月, 2017 2 次提交
    • C
      f2fs: show simple call stack in fault injection message · 55523519
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      55523519
    • J
      f2fs: add bitmaps for empty or full NAT blocks · 22ad0b6a
      Jaegeuk Kim 提交于
      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: NJaegeuk Kim <jaegeuk@kernel.org>
      22ad0b6a
  2. 24 2月, 2017 6 次提交
  3. 23 2月, 2017 1 次提交
  4. 29 1月, 2017 1 次提交
  5. 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
  6. 24 11月, 2016 9 次提交
  7. 03 11月, 2016 1 次提交
  8. 01 11月, 2016 1 次提交
  9. 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
  10. 16 9月, 2016 1 次提交
  11. 14 9月, 2016 1 次提交
  12. 30 8月, 2016 1 次提交
  13. 19 8月, 2016 1 次提交
  14. 21 7月, 2016 1 次提交
  15. 16 7月, 2016 2 次提交
  16. 09 7月, 2016 5 次提交
  17. 07 7月, 2016 1 次提交
  18. 08 6月, 2016 1 次提交