1. 05 11月, 2014 2 次提交
  2. 04 11月, 2014 5 次提交
  3. 08 10月, 2014 1 次提交
    • J
      f2fs: support volatile operations for transient data · 02a1335f
      Jaegeuk Kim 提交于
      This patch adds support for volatile writes which keep data pages in memory
      until f2fs_evict_inode is called by iput.
      
      For instance, we can use this feature for the sqlite database as follows.
      While supporting atomic writes for main database file, we can keep its journal
      data temporarily in the page cache by the following sequence.
      
      1. open
       -> ioctl(F2FS_IOC_START_VOLATILE_WRITE);
      2. writes
       : keep all the data in the page cache.
      3. flush to the database file with atomic writes
        a. ioctl(F2FS_IOC_START_ATOMIC_WRITE);
        b. writes
        c. ioctl(F2FS_IOC_COMMIT_ATOMIC_WRITE);
      4. close
       -> drop the cached data
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      02a1335f
  4. 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
  5. 01 10月, 2014 2 次提交
  6. 24 9月, 2014 4 次提交
    • C
      f2fs: skip punching hole in special condition · 14cecc5c
      Chao Yu 提交于
      Now punching hole in directory is not supported in f2fs, so let's limit file
      type in punch_hole().
      
      In addition, in punch_hole if offset is exceed file size, we should skip
      punching hole.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      14cecc5c
    • C
      f2fs: fix to truncate blocks past EOF in ->setattr · 09db6a2e
      Chao Yu 提交于
      By using FALLOC_FL_KEEP_SIZE in ->fallocate of f2fs, we can fallocate block past
      EOF without changing i_size of inode. These blocks past EOF will not be
      truncated in ->setattr as we truncate them only when change the file size.
      
      We should give a chance to truncate blocks out of filesize in setattr().
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      09db6a2e
    • J
      f2fs: do not skip latest inode information · 19c9c466
      Jaegeuk Kim 提交于
      In f2fs_sync_file, if there is no written appended writes, it skips
      to write its node blocks.
      But, if there is up-to-date inode page, we should write it to update
      its metadata during the roll-forward recovery.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      19c9c466
    • 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
  7. 16 9月, 2014 1 次提交
    • J
      f2fs: give an option to enable in-place-updates during fsync to users · c1ce1b02
      Jaegeuk Kim 提交于
      If user wrote F2FS_IPU_FSYNC:4 in /sys/fs/f2fs/ipu_policy, f2fs_sync_file
      only starts to try in-place-updates.
      And, if the number of dirty pages is over /sys/fs/f2fs/min_fsync_blocks, it
      keeps out-of-order manner. Otherwise, it triggers in-place-updates.
      
      This may be used by storage showing very high random write performance.
      
      For example, it can be used when,
      
      Seq. writes (Data) + wait + Seq. writes (Node)
      
      is pretty much slower than,
      
      Rand. writes (Data)
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      c1ce1b02
  8. 11 9月, 2014 1 次提交
  9. 10 9月, 2014 2 次提交
  10. 04 9月, 2014 1 次提交
  11. 22 8月, 2014 2 次提交
  12. 20 8月, 2014 2 次提交
  13. 05 8月, 2014 1 次提交
  14. 31 7月, 2014 3 次提交
  15. 10 7月, 2014 2 次提交
  16. 23 6月, 2014 2 次提交
  17. 12 6月, 2014 1 次提交
    • A
      ->splice_write() via ->write_iter() · 8d020765
      Al Viro 提交于
      iter_file_splice_write() - a ->splice_write() instance that gathers the
      pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
      it to ->write_iter().  A bunch of simple cases coverted to that...
      
      [AV: fixed the braino spotted by Cyrill]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8d020765
  18. 08 6月, 2014 1 次提交
  19. 07 6月, 2014 1 次提交
  20. 07 5月, 2014 5 次提交