1. 05 5月, 2015 1 次提交
  2. 16 4月, 2015 1 次提交
  3. 11 4月, 2015 4 次提交
  4. 04 3月, 2015 3 次提交
    • C
      f2fs: enable rb-tree extent cache · 1dcc336b
      Chao Yu 提交于
      This patch enables rb-tree based extent cache in f2fs.
      
      When we mount with "-o extent_cache", f2fs will try to add recently accessed
      page-block mappings into rb-tree based extent cache as much as possible, instead
      of original one extent info cache.
      
      By this way, f2fs can support more effective cache between dnode page cache and
      disk. It will supply high hit ratio in the cache with fewer memory when dnode
      page cache are reclaimed in environment of low memory.
      
      Storage: Sandisk sd card 64g
      1.append write file (offset: 0, size: 128M);
      2.override write file (offset: 2M, size: 1M);
      3.override write file (offset: 4M, size: 1M);
      ...
      4.override write file (offset: 48M, size: 1M);
      ...
      5.override write file (offset: 112M, size: 1M);
      6.sync
      7.echo 3 > /proc/sys/vm/drop_caches
      8.read file (size:128M, unit: 4k, count: 32768)
      (time dd if=/mnt/f2fs/128m bs=4k count=32768)
      
      Extent Hit Ratio:
      		before		patched
      Hit Ratio	121 / 1071	1071 / 1071
      
      Performance:
      		before		patched
      real    	0m37.051s	0m35.556s
      user    	0m0.040s	0m0.026s
      sys     	0m2.990s	0m2.251s
      
      Memory Cost:
      		before		patched
      Tree Count:	0		1 (size: 24 bytes)
      Node Count:	0		45 (size: 1440 bytes)
      
      v3:
       o retest and given more details of test result.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1dcc336b
    • C
      f2fs: add a mount option for rb-tree extent cache · 89672159
      Chao Yu 提交于
      This patch adds a mount option 'extent_cache' in f2fs.
      
      It is try to use a rb-tree based extent cache to cache more mapping information
      with less memory if this option is set, otherwise we will use the original one
      extent info cache.
      Suggested-by: NChangman Lee <cm224.lee@samsung.com>
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      89672159
    • C
      f2fs: move ext_lock out of struct extent_info · 0c872e2d
      Chao Yu 提交于
      Move ext_lock out of struct extent_info, then in the following patches we can
      use variables with struct extent_info type as a parameter to pass pure data.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0c872e2d
  5. 12 2月, 2015 8 次提交
  6. 10 1月, 2015 4 次提交
  7. 20 11月, 2014 2 次提交
  8. 05 11月, 2014 1 次提交
  9. 04 11月, 2014 3 次提交
  10. 07 10月, 2014 1 次提交
    • J
      f2fs: support atomic writes · 88b88a66
      Jaegeuk Kim 提交于
      This patch introduces a very limited functionality for atomic write support.
      In order to support atomic write, this patch adds two ioctls:
       o F2FS_IOC_START_ATOMIC_WRITE
       o F2FS_IOC_COMMIT_ATOMIC_WRITE
      
      The database engine should be aware of the following sequence.
      1. open
       -> ioctl(F2FS_IOC_START_ATOMIC_WRITE);
      2. writes
        : all the written data will be treated as atomic pages.
      3. commit
       -> ioctl(F2FS_IOC_COMMIT_ATOMIC_WRITE);
        : this flushes all the data blocks to the disk, which will be shown all or
        nothing by f2fs recovery procedure.
      4. repeat to #2.
      
      The IO pattens should be:
      
        ,- START_ATOMIC_WRITE                  ,- COMMIT_ATOMIC_WRITE
       CP | D D D D D D | FSYNC | D D D D | FSYNC ...
                            `- COMMIT_ATOMIC_WRITE
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      88b88a66
  11. 01 10月, 2014 2 次提交
  12. 24 9月, 2014 2 次提交
    • C
      f2fs: fix to clean previous mount option when remount_fs · 26666c8a
      Chao Yu 提交于
      In manual of mount, we descript remount as below:
      
      "mount -o remount,rw /dev/foo /dir
      After  this call all old mount options are replaced and arbitrary stuff from
      fstab is ignored, except the loop= option which is internally generated and
      maintained by the mount command."
      
      Previously f2fs do not clear up old mount options when remount_fs, so we have no
      chance of disabling previous option (e.g. flush_merge). Fix it.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      26666c8a
    • C
      f2fs: support large sector size · 55cf9cb6
      Chao Yu 提交于
      Block size in f2fs is 4096 bytes, so theoretically, f2fs can support 4096 bytes
      sector device at maximum. But now f2fs only support 512 bytes size sector, so
      block device such as zRAM which uses page cache as its block storage space will
      not be mounted successfully as mismatch between sector size of zRAM and sector
      size of f2fs supported.
      
      In this patch we support large sector size in f2fs, so block device with sector
      size of 512/1024/2048/4096 bytes can be supported in f2fs.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      55cf9cb6
  13. 16 9月, 2014 2 次提交
  14. 10 9月, 2014 2 次提交
  15. 29 8月, 2014 1 次提交
  16. 22 8月, 2014 3 次提交
    • C
      f2fs: fix incorrect calculation with total/free inode num · c200b1aa
      Chao Yu 提交于
      Theoretically, our total inodes number is the same as total node number, but
      there are three node ids are reserved in f2fs, they are 0, 1 (node nid), and 2
      (meta nid), and they should never be used by user, so our total/free inode
      number calculated in ->statfs is wrong.
      
      This patch indroduces F2FS_RESERVED_NODE_NUM and then fixes this issue by
      recalculating total/free inode number with the macro.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      c200b1aa
    • J
      f2fs: handle EIO not to break fs consistency · cf779cab
      Jaegeuk Kim 提交于
      There are two rules when EIO is occurred.
      1. don't write any checkpoint data to preserve the previous checkpoint
      2. don't lose the cached dentry/node/meta pages
      
      So, at first, this patch adds set_page_dirty in f2fs_write_end_io's failure.
      Then, writing checkpoint/dentry/node blocks is not allowed.
      
      Note that, for the data pages, we can't just throw away by redirtying them.
      Otherwise, kworker can fall into infinite loop to flush them.
      (Ref. xfstests/019)
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      cf779cab
    • J
      f2fs: check s_dirty under cp_mutex · 8501017e
      Jaegeuk Kim 提交于
      It needs to check s_dirty under cp_mutex, since s_dirty is reset under that
      mutex.
      And previous condition was not correct, since we can omit doing checkpoint
      when checkpoint was done followed by all the node pages were written back.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      8501017e