1. 20 3月, 2014 4 次提交
  2. 18 3月, 2014 8 次提交
  3. 12 3月, 2014 2 次提交
  4. 11 3月, 2014 1 次提交
  5. 10 3月, 2014 4 次提交
  6. 05 3月, 2014 1 次提交
  7. 03 3月, 2014 1 次提交
  8. 28 2月, 2014 1 次提交
    • C
      f2fs: fix dirty page accounting when redirty · 9cf3c389
      Chao Yu 提交于
      We should de-account dirty counters for page when redirty in ->writepage().
      
      Wu Fengguang described in 'commit 971767ca':
      "writeback: fix dirtied pages accounting on redirty
      De-account the accumulative dirty counters on page redirty.
      
      Page redirties (very common in ext4) will introduce mismatch between
      counters (a) and (b)
      
      a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied
      b) NR_WRITTEN, BDI_WRITTEN
      
      This will introduce systematic errors in balanced_rate and result in
      dirty page position errors (ie. the dirty pages are no longer balanced
      around the global/bdi setpoints)."
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      9cf3c389
  9. 27 2月, 2014 5 次提交
    • C
      f2fs: use existing macro to clean up some codes · 695fd1ed
      Chao Yu 提交于
      This patch use existing macro F2FS_INODE/NEXT_FREE_BLKADDR to clean up some
      codes.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      695fd1ed
    • C
      f2fs: readahead contiguous SSA blocks for f2fs_gc · 81c1a0f1
      Chao Yu 提交于
      If there are multi segments in one section, we will read those SSA blocks which
      have contiguous address one by one in f2fs_gc. It may lost performance, let's
      read ahead SSA blocks by merge multi read request.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      81c1a0f1
    • J
      f2fs: add an sysfs entry to control the directory level · ab9fa662
      Jaegeuk Kim 提交于
      This patch adds an sysfs entry to control dir_level used by the large directory.
      
      The description of this entry is:
      
       dir_level                    This parameter controls the directory level to
      			      support large directory. If a directory has a
      			      number of files, it can reduce the file lookup
      			      latency by increasing this dir_level value.
      			      Otherwise, it needs to decrease this value to
      			      reduce the space overhead. The default value is 0.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      ab9fa662
    • J
      f2fs: introduce large directory support · 38431545
      Jaegeuk Kim 提交于
      This patch introduces an i_dir_level field to support large directory.
      
      Previously, f2fs maintains multi-level hash tables to find a dentry quickly
      from a bunch of chiild dentries in a directory, and the hash tables consist of
      the following tree structure as below.
      
      In Documentation/filesystems/f2fs.txt,
      
      ----------------------
      A : bucket
      B : block
      N : MAX_DIR_HASH_DEPTH
      ----------------------
      
      level #0   | A(2B)
                 |
      level #1   | A(2B) - A(2B)
                 |
      level #2   | A(2B) - A(2B) - A(2B) - A(2B)
           .     |   .       .       .       .
      level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
      
      But, if we can guess that a directory will handle a number of child files,
      we don't need to traverse the tree from level #0 to #N all the time.
      Since the lower level tables contain relatively small number of dentries,
      the miss ratio of the target dentry is likely to be high.
      
      In order to avoid that, we can configure the hash tables sparsely from level #0
      like this.
      
      level #0   | A(2B) - A(2B) - A(2B) - A(2B)
      
      level #1   | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
      
      With this structure, we can skip the ineffective tree searches in lower level
      hash tables.
      
      This patch adds just a facility for this by introducing i_dir_level in
      f2fs_inode.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      38431545
    • J
      f2fs: remove costly bit operations for f2fs_find_entry · 5d0c6671
      Jaegeuk Kim 提交于
      It turns out that a bit operation like find_next_bit is not always fast enough
      for f2fs_find_entry.
      Instead, it is pretty much simple and fast to traverse each dentries.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      5d0c6671
  10. 24 2月, 2014 6 次提交
    • J
      f2fs: implement a lock-free stat_show · 8b8343fa
      Jaegeuk Kim 提交于
      The stat_show is just to show the current status of f2fs.
      So, we can remove all the there-in locks.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8b8343fa
    • J
      f2fs: introduce a radix_tree for the free_nid list · 8a7ed66a
      Jaegeuk Kim 提交于
      This patch introduces a radix tree for the list of free_nids, which enhances
      the performance on free nid management.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8a7ed66a
    • G
      f2fs: introduce help macro on_build_free_nids() · f978f5a0
      Gu Zheng 提交于
      Introduce help macro on_build_free_nids() which just uses build_lock
      to judge whether the building free nid is going, so that we can remove
      the on_build_free_nids field from f2fs_sb_info.
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      [Jaegeuk Kim: remove an unnecessary white line removal]
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      f978f5a0
    • J
      f2fs: fix to mark the checkpointed nat entry correctly · fffc2a00
      Jaegeuk Kim 提交于
      The nat cache entry maintains a status whether it is checkpointed or not.
      So, if a new cache entry is loaded from the last checkpoint,
      nat_entry->checkpointed should be true.
      If the cache entry is modified as being dirty, nat_entry->checkpoint should
      be false.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      fffc2a00
    • J
      f2fs: fix to do build_stat prior to the recovery procedure · 6437d1b0
      Jaegeuk Kim 提交于
      At the end of the recovery procedure, write_checkpoint is called and updates
      the cp count which is managed by f2fs stat.
      But, previously build_stat() is called after the recovery procedure, which
      results in:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000012c
      IP: [<ffffffffa03b1030>] write_checkpoint+0x720/0xbc0 [f2fs]
      Call Trace:
       [<ffffffff810a6b44>] ? mark_held_locks+0x74/0x140
       [<ffffffff8109a3e0>] ? __init_waitqueue_head+0x60/0x60
       [<ffffffffa03bf036>] recover_fsync_data+0x656/0xf20 [f2fs]
       [<ffffffff812ee3eb>] ? security_d_instantiate+0x1b/0x30
       [<ffffffffa03aeb4d>] f2fs_fill_super+0x94d/0xa00 [f2fs]
       [<ffffffff811a9825>] mount_bdev+0x1a5/0x1f0
       [<ffffffff8114915e>] ? __get_free_pages+0xe/0x40
       [<ffffffffa03ae200>] ? f2fs_remount+0x130/0x130 [f2fs]
       [<ffffffffa03aa575>] f2fs_mount+0x15/0x20 [f2fs]
       [<ffffffff811aa713>] mount_fs+0x43/0x1b0
       [<ffffffff811c7124>] vfs_kern_mount+0x74/0x160
       [<ffffffff811c5cb1>] ? __get_fs_type+0x51/0x60
       [<ffffffff811c9727>] do_mount+0x237/0xb50
       [<ffffffff811c936a>] ? copy_mount_options+0x3a/0x170
      
      So, this patche changes the order of recovery_fsync_data() and
      f2fs_build_stats().
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      6437d1b0
    • J
      f2fs: fix not to write data pages on the page reclaiming path · 8618b881
      Jaegeuk Kim 提交于
      Even if f2fs_write_data_page is called by the page reclaiming path, we should
      not write the page to provide enough free segments for the worst case scenario.
      Otherwise, f2fs can face with no free segment while gc is conducted, resulting
      in:
      
       ------------[ cut here ]------------
       kernel BUG at /home/zeus/f2fs_test/src/fs/f2fs/segment.c:565!
       RIP: 0010:[<ffffffffa02c3b11>]  [<ffffffffa02c3b11>] new_curseg+0x331/0x340 [f2fs]
       Call Trace:
        allocate_segment_by_default+0x204/0x280 [f2fs]
        allocate_data_block+0x108/0x210 [f2fs]
        write_data_page+0x8a/0xc0 [f2fs]
        do_write_data_page+0xe1/0x2a0 [f2fs]
        move_data_page+0x8a/0xf0 [f2fs]
        f2fs_gc+0x446/0x970 [f2fs]
        f2fs_balance_fs+0xb6/0xd0 [f2fs]
        f2fs_write_begin+0x50/0x350 [f2fs]
        ? unlock_page+0x27/0x30
        ? unlock_page+0x27/0x30
        generic_file_buffered_write+0x10a/0x280
        ? file_update_time+0xa3/0xf0
        __generic_file_aio_write+0x1c8/0x3d0
        ? generic_file_aio_write+0x52/0xb0
        ? generic_file_aio_write+0x52/0xb0
        generic_file_aio_write+0x65/0xb0
        do_sync_write+0x5a/0x90
        vfs_write+0xc5/0x1f0
        SyS_write+0x55/0xa0
        system_call_fastpath+0x16/0x1b
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8618b881
  11. 17 2月, 2014 7 次提交