1. 01 10月, 2016 2 次提交
    • C
      f2fs: introduce cp_lock to protect updating of ckpt_flags · aaec2b1d
      Chao Yu 提交于
      This patch introduces spinlock to protect updating process of ckpt_flags
      field in struct f2fs_checkpoint, it avoids incorrectly updating in race
      condition.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      [Jaegeuk Kim: add __is_set_ckpt_flags likewise __set_ckpt_flags]
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      aaec2b1d
    • J
      f2fs: use crc and cp version to determine roll-forward recovery · a468f0ef
      Jaegeuk Kim 提交于
      Previously, we used cp_version only to detect recoverable dnodes.
      In order to avoid same garbage cp_version, we needed to truncate the next
      dnode during checkpoint, resulting in additional discard or data write.
      If we can distinguish this by using crc in addition to cp_version, we can
      remove this overhead.
      
      There is backward compatibility concern where it changes node_footer layout.
      So, this patch introduces a new checkpoint flag, CP_CRC_RECOVERY_FLAG, to
      detect new layout. New layout will be activated only when this flag is set.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a468f0ef
  2. 23 9月, 2016 1 次提交
  3. 30 8月, 2016 1 次提交
  4. 19 8月, 2016 1 次提交
  5. 16 7月, 2016 1 次提交
    • C
      f2fs: fix to avoid data update racing between GC and DIO · 82e0a5aa
      Chao Yu 提交于
      Datas in file can be operated by GC and DIO simultaneously, so we will
      face race case as below:
      
      For write case:
      Thread A				Thread B
      - generic_file_direct_write
       - invalidate_inode_pages2_range
       - f2fs_direct_IO
        - do_blockdev_direct_IO
         - do_direct_IO
          - get_more_blocks
      					- f2fs_gc
      					 - do_garbage_collect
      					  - gc_data_segment
      					   - move_data_page
      					    - do_write_data_page
      					    migrate data block to new block address
         - dio_bio_submit
         update user data to old block address
      
      For read case:
      Thread A                                Thread B
      - generic_file_direct_write
       - invalidate_inode_pages2_range
       - f2fs_direct_IO
        - do_blockdev_direct_IO
         - do_direct_IO
          - get_more_blocks
      					- f2fs_balance_fs
      					 - f2fs_gc
      					  - do_garbage_collect
      					   - gc_data_segment
      					    - move_data_page
      					     - do_write_data_page
      					     migrate data block to new block address
      					  - write_checkpoint
      					   - do_checkpoint
      					    - clear_prefree_segments
      					     - f2fs_issue_discard
                                                   discard old block adress
         - dio_bio_submit
         update user buffer from obsolete block address
      
      In order to fix this, for one file, we should let DIO and GC getting exclusion
      against with each other.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      82e0a5aa
  6. 09 7月, 2016 4 次提交
  7. 07 7月, 2016 2 次提交
  8. 14 6月, 2016 1 次提交
  9. 09 6月, 2016 1 次提交
  10. 08 6月, 2016 2 次提交
  11. 03 6月, 2016 8 次提交
  12. 30 5月, 2016 1 次提交
  13. 19 5月, 2016 6 次提交
  14. 17 5月, 2016 2 次提交
  15. 08 5月, 2016 7 次提交