1. 23 4月, 2013 7 次提交
  2. 22 4月, 2013 1 次提交
  3. 09 4月, 2013 5 次提交
    • N
      f2fs: fix typo mistakes · 6224da87
      Namjae Jeon 提交于
      Fix typo mistakes.
      1. I think that it should be 'L' instead of 'V'.
      2. and try to fix 'Front' instead of 'Frone'
      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>
      6224da87
    • J
      f2fs: write checkpoint before starting FG_GC · d64f8047
      Jaegeuk Kim 提交于
      In order to be aware of prefree and free sections during FG_GC, let's start with
      write_checkpoint().
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      d64f8047
    • Z
      f2fs: fix the logic of IS_DNODE() · 3315101f
      Zhihui Zhang 提交于
      If (ofs % (NIDS_PER_BLOCK + 1) == 0), the node is an indirect node block.
      Signed-off-by: NZhihui Zhang <zzhsuny@gmail.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      3315101f
    • J
      f2fs: introduce a new global lock scheme · 39936837
      Jaegeuk Kim 提交于
      In the previous version, f2fs uses global locks according to the usage types,
      such as directory operations, block allocation, block write, and so on.
      
      Reference the following lock types in f2fs.h.
      enum lock_type {
      	RENAME,		/* for renaming operations */
      	DENTRY_OPS,	/* for directory operations */
      	DATA_WRITE,	/* for data write */
      	DATA_NEW,	/* for data allocation */
      	DATA_TRUNC,	/* for data truncate */
      	NODE_NEW,	/* for node allocation */
      	NODE_TRUNC,	/* for node truncate */
      	NODE_WRITE,	/* for node write */
      	NR_LOCK_TYPE,
      };
      
      In that case, we lose the performance under the multi-threading environment,
      since every types of operations must be conducted one at a time.
      
      In order to address the problem, let's share the locks globally with a mutex
      array regardless of any types.
      So, let users grab a mutex and perform their jobs in parallel as much as
      possbile.
      
      For this, I propose a new global lock scheme as follows.
      
      0. Data structure
       - f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
       - f2fs_sb_info -> node_write
      
      1. mutex_lock_op(sbi)
       - try to get an avaiable lock from the array.
       - returns the index of the gottern lock variable.
      
      2. mutex_unlock_op(sbi, index of the lock)
       - unlock the given index of the lock.
      
      3. mutex_lock_all(sbi)
       - grab all the locks in the array before the checkpoint.
      
      4. mutex_unlock_all(sbi)
       - release all the locks in the array after checkpoint.
      
      5. block_operations()
       - call mutex_lock_all()
       - sync_dirty_dir_inodes()
       - grab node_write
       - sync_node_pages()
      
      Note that,
       the pairs of mutex_lock_op()/mutex_unlock_op() and
       mutex_lock_all()/mutex_unlock_all() should be used together.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      39936837
    • J
      f2fs: move f2fs_balance_fs from truncate to punch_hole · 1127a3d4
      Jason Hrycay 提交于
      Move the f2fs_balance_fs out of the truncate_hole function and only
      perform that in punch_hole use case.  The commit:
      
        ed60b1644e7f7e5dd67d21caf7e4425dff05dad0
      
      intended to do this but moved it into truncate_hole to cover more
      cases.  However, a deadlock scenario is possible when deleting an inode
      entry under specific conditions:
      
       f2fs_delete_entry()
           mutex_lock_op(sbi, DENTRY_OPS);
           truncate_hole()
               f2fs_balance_fs()
                   mutex_lock(&sbi->gc_mutex);
                   f2fs_gc()
                       write_checkpoint()
                           block_operations()
                               mutex_lock_op(sbi, DENTRY_OPS);
      
      Lets move it into the punch_hole case to cover the original intent of
      avoiding it during fallocate's expand_inode_data case.
      
      Change-Id: I29f8ea1056b0b88b70ba8652d901b6e8431bb27e
      Signed-off-by: NJason Hrycay <jason.hrycay@motorola.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      1127a3d4
  4. 03 4月, 2013 12 次提交
  5. 31 3月, 2013 1 次提交
  6. 27 3月, 2013 4 次提交
  7. 20 3月, 2013 10 次提交