1. 17 2月, 2014 1 次提交
  2. 22 1月, 2014 3 次提交
  3. 14 1月, 2014 3 次提交
  4. 26 12月, 2013 1 次提交
  5. 23 12月, 2013 12 次提交
  6. 08 11月, 2013 1 次提交
  7. 29 10月, 2013 1 次提交
  8. 25 10月, 2013 3 次提交
  9. 22 10月, 2013 1 次提交
  10. 18 10月, 2013 2 次提交
    • J
      f2fs: avoid to write during the recovery · 87a9bd26
      Jaegeuk Kim 提交于
      This patch enhances the recovery routine not to write any data/node/meta until
      its completion.
      If any writes are sent to the disk, it could contaminate the written history
      that will be used for further recovery.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      87a9bd26
    • G
      f2fs: avoid wait if IO end up when do_checkpoint for better performance · e2340887
      Gu Zheng 提交于
      Previously, do_checkpoint() will call congestion_wait() for waiting the pages
      (previous submitted node/meta/data pages) to be written back.
      Because congestion_wait() will set a regular period (e.g. HZ / 50 ) for waiting, and
      no additional wake up mechanism was introduced if IO ends up before regular period costed.
      Yuan Zhong found there is a situation that after the pages have been written back,
      but the checkpoint thread still wait for congestion_wait to exit.
      
      So here we store checkpoint task into f2fs_sb when doing checkpoint, it'll wait for IO completes
      if there's IO going on, and in the end IO path, wake up checkpoint task when IO ends up.
      
      Thanks to Yuan Zhong's pre work about this problem.
      Reported-by: NYuan Zhong <yuan.mark.zhong@samsung.com>
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      e2340887
  11. 07 10月, 2013 1 次提交
    • G
      f2fs: use rw_sem instead of fs_lock(locks mutex) · e479556b
      Gu Zheng 提交于
      The fs_locks is used to block other ops(ex, recovery) when doing checkpoint.
      And each other operate routine(besides checkpoint) needs to acquire a fs_lock,
      there is a terrible problem here, if these are too many concurrency threads acquiring
      fs_lock, so that they will block each other and may lead to some performance problem,
      but this is not the phenomenon we want to see.
      Though there are some optimization patches introduced to enhance the usage of fs_lock,
      but the thorough solution is using a *rw_sem* to replace the fs_lock.
      Checkpoint routine takes write_sem, and other ops take read_sem, so that we can block
      other ops(ex, recovery) when doing checkpoint, and other ops will not disturb each other,
      this can avoid the problem described above completely.
      Because of the weakness of rw_sem, the above change may introduce a potential problem
      that the checkpoint thread might get starved if other threads are intensively locking
      the read semaphore for I/O.(Pointed out by Xu Jin)
      In order to avoid this, a wait_list is introduced, the appending read semaphore ops
      will be dropped into the wait_list if checkpoint thread is waiting for write semaphore,
      and will be waked up when checkpoint thread gives up write semaphore.
      Thanks to Kim's previous review and test, and will be very glad to see other guys'
      performance tests about this patch.
      
      V2:
        -fix the potential starvation problem.
        -use more suitable func name suggested by Xu Jin.
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      [Jaegeuk Kim: adjust minor coding standard]
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      e479556b
  12. 25 9月, 2013 1 次提交
  13. 09 8月, 2013 1 次提交
  14. 30 7月, 2013 2 次提交
  15. 02 7月, 2013 1 次提交
  16. 07 6月, 2013 1 次提交
    • J
      f2fs: fix iget/iput of dir during recovery · 5deb8267
      Jaegeuk Kim 提交于
      It is possible that iput is skipped after iget during the recovery.
      
      In recover_dentry(),
       dir = f2fs_iget();
       ...
       if (de && inode->i_ino == le32_to_cpu(de->ino))
      	goto out;
      
      In this case, this dir is not able to be added in dirty_dir_inode_list.
      The actual linking is done only when set_page_dirty() is called.
      
      So let's add this newly got inode into the list explicitly, and put it at the
      end of the recovery routine.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      5deb8267
  17. 28 5月, 2013 4 次提交
    • J
      f2fs: fix incorrect iputs during the dentry recovery · afc3eda2
      Jaegeuk Kim 提交于
      - iget/iput flow in the dentry recovery process
      
      1. *dir* = f2fs_iget
      2. set FI_DELAY_IPUT to *dir*
      3. add *dir* to the dirty_dir_list
      		   - __f2fs_add_link
      		     - recover_dentry)
      4. iput *dir* by remove_dirty_dir_inode
      		   - sync_dirty_dir_inodes
      		     - write_chekcpoint
      
      If *dir*'s i_count is not 1 (i.e., root dir), remove_dirty_dir_inode is called
      later and then iput is triggered again due to the FI_DELAY_IPUT flag.
      So, let's unset the flag properly once iput is triggered.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      afc3eda2
    • J
      f2fs: iput only if whole data blocks are flushed · 3b10b1fd
      Jaegeuk Kim 提交于
      If there remains some unwritten blocks from the recovery, we should not call
      iput on that directory inode.
      Otherwise, we can loose some dentry blocks after the recovery.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      3b10b1fd
    • N
      f2fs: push some variables to debug part · 35b09d82
      Namjae Jeon 提交于
      Some, counters are needed only for the statistical information
      while debugging.
      So, those can be controlled using CONFIG_F2FS_STAT_FS,
      pushing the usage for few variables under this flag.
      Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: NAmit Sahrawat <a.sahrawat@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      35b09d82
    • J
      f2fs: fix BUG_ON during f2fs_evict_inode(dir) · 74d0b917
      Jaegeuk Kim 提交于
      During the dentry recovery routine, recover_inode() triggers __f2fs_add_link
      with its directory inode.
      
      In the following scenario, a bug is captured.
       1. dir = f2fs_iget(pino)
       2. __f2fs_add_link(dir, name)
       3. iput(dir)
        -> f2fs_evict_inode() faces with BUG_ON(atomic_read(fi->dirty_dents))
      
      Kernel BUG at ffffffffa01c0676 [verbose debug info unavailable]
      [<ffffffffa01c0676>] f2fs_evict_inode+0x276/0x300 [f2fs]
      Call Trace:
       [<ffffffff8118ea00>] evict+0xb0/0x1b0
       [<ffffffff8118f1c5>] iput+0x105/0x190
       [<ffffffffa01d2dac>] recover_fsync_data+0x3bc/0x1070 [f2fs]
       [<ffffffff81692e8a>] ? io_schedule+0xaa/0xd0
       [<ffffffff81690acb>] ? __wait_on_bit_lock+0x7b/0xc0
       [<ffffffff8111a0e7>] ? __lock_page+0x67/0x70
       [<ffffffff81165e21>] ? kmem_cache_alloc+0x31/0x140
       [<ffffffff8118a502>] ? __d_instantiate+0x92/0xf0
       [<ffffffff812a949b>] ? security_d_instantiate+0x1b/0x30
       [<ffffffff8118a5b4>] ? d_instantiate+0x54/0x70
      
      This means that we should flush all the dentry pages between iget and iput().
      But, during the recovery routine, it is unallowed due to consistency, so we
      have to wait the whole recovery process.
      And then, write_checkpoint flushes all the dirty dentry blocks, and nicely we
      can put the stale dir inodes from the dirty_dir_inode_list.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      74d0b917
  18. 29 4月, 2013 1 次提交