1. 24 9月, 2014 4 次提交
    • 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
    • J
      f2fs: update i_size when __allocate_data_block · 976e4c50
      Jaegeuk Kim 提交于
      The f2fs_direct_IO uses __allocate_data_block, but inside the allocation path,
      we should update i_size at the changed time to update its inode page.
      Otherwise, we can get wrong i_size after roll-forward recovery.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      976e4c50
    • J
      f2fs: use MAX_BIO_BLOCKS(sbi) · 90a893c7
      Jaegeuk Kim 提交于
      This patch cleans up a simple macro.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      90a893c7
    • J
      f2fs: fix conditions to remain recovery information in f2fs_sync_file · 88bd02c9
      Jaegeuk Kim 提交于
      This patch revisited whole the recovery information during the f2fs_sync_file.
      
      In this patch, there are three information to make a decision.
      
      a) IS_CHECKPOINTED,	/* is it checkpointed before? */
      b) HAS_FSYNCED_INODE,	/* is the inode fsynced before? */
      c) HAS_LAST_FSYNC,	/* has the latest node fsync mark? */
      
      And, the scenarios for our rule are based on:
      
      [Term] F: fsync_mark, D: dentry_mark
      
      1. inode(x) | CP | inode(x) | dnode(F)
      2. inode(x) | CP | inode(F) | dnode(F)
      3. inode(x) | CP | dnode(F) | inode(x) | inode(F)
      4. inode(x) | CP | dnode(F) | inode(F)
      5. CP | inode(x) | dnode(F) | inode(DF)
      6. CP | inode(DF) | dnode(F)
      7. CP | dnode(F) | inode(DF)
      8. CP | dnode(F) | inode(x) | inode(DF)
      
      For example, #3, the three conditions should be changed as follows.
      
         inode(x) | CP | dnode(F) | inode(x) | inode(F)
      a)    x       o      o          o          o
      b)    x       x      x          x          o
      c)    x       o      o          x          o
      
      If f2fs_sync_file stops   ------^,
       it should write inode(F)    --------------^
      
      So, the need_inode_block_update should return true, since
       c) get_nat_flag(e, HAS_LAST_FSYNC), is false.
      
      For example, #8,
            CP | alloc | dnode(F) | inode(x) | inode(DF)
      a)    o      x        x          x          x
      b)    x               x          x          o
      c)    o               o          x          o
      
      If f2fs_sync_file stops   -------^,
       it should write inode(DF)    --------------^
      
      Note that, the roll-forward policy should follow this rule, which means,
      if there are any missing blocks, we doesn't need to recover that inode.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      88bd02c9
  2. 16 9月, 2014 1 次提交
  3. 10 9月, 2014 1 次提交
  4. 04 9月, 2014 1 次提交
  5. 22 8月, 2014 2 次提交
    • J
      f2fs: avoid double lock in truncate_blocks · 764aa3e9
      Jaegeuk Kim 提交于
      The init_inode_metadata calls truncate_blocks when error is occurred.
      The callers holds f2fs_lock_op, so we should not call it again in
      truncate_blocks.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      764aa3e9
    • 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
  6. 20 8月, 2014 2 次提交
  7. 02 8月, 2014 1 次提交
  8. 29 7月, 2014 2 次提交
  9. 25 7月, 2014 1 次提交
  10. 10 7月, 2014 2 次提交
  11. 23 6月, 2014 1 次提交
  12. 08 6月, 2014 1 次提交
  13. 04 6月, 2014 1 次提交
  14. 07 5月, 2014 15 次提交
  15. 02 4月, 2014 1 次提交
  16. 01 4月, 2014 1 次提交
  17. 18 3月, 2014 3 次提交