1. 23 Apr, 2013 1 commit
  2. 22 Apr, 2013 1 commit
  3. 21 Apr, 2013 1 commit
  4. 09 Apr, 2013 5 commits
    • Namjae Jeon's avatar
      f2fs: fix typo mistakes · 6224da87
      Namjae Jeon authored
      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: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: default avatarAmit Sahrawat <a.sahrawat@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      6224da87
    • Jaegeuk Kim's avatar
      f2fs: write checkpoint before starting FG_GC · d64f8047
      Jaegeuk Kim authored
      In order to be aware of prefree and free sections during FG_GC, let's start with
      write_checkpoint().
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      d64f8047
    • Zhihui Zhang's avatar
      f2fs: fix the logic of IS_DNODE() · 3315101f
      Zhihui Zhang authored
      If (ofs % (NIDS_PER_BLOCK + 1) == 0), the node is an indirect node block.
      Signed-off-by: default avatarZhihui Zhang <zzhsuny@gmail.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      3315101f
    • Jaegeuk Kim's avatar
      f2fs: introduce a new global lock scheme · 39936837
      Jaegeuk Kim authored
      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: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      39936837
    • Jason Hrycay's avatar
      f2fs: move f2fs_balance_fs from truncate to punch_hole · 1127a3d4
      Jason Hrycay authored
      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: default avatarJason Hrycay <jason.hrycay@motorola.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      1127a3d4
  5. 03 Apr, 2013 12 commits
  6. 31 Mar, 2013 1 commit
  7. 27 Mar, 2013 4 commits
  8. 20 Mar, 2013 11 commits
  9. 18 Mar, 2013 4 commits