1. 06 Nov, 2014 1 commit
  2. 05 Nov, 2014 2 commits
  3. 04 Nov, 2014 5 commits
  4. 07 Oct, 2014 2 commits
    • Jaegeuk Kim's avatar
      f2fs: support volatile operations for transient data · 02a1335f
      Jaegeuk Kim authored
      
      
      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: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      02a1335f
    • Jaegeuk Kim's avatar
      f2fs: support atomic writes · 88b88a66
      Jaegeuk Kim authored
      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: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      88b88a66
  5. 30 Sep, 2014 2 commits
  6. 23 Sep, 2014 4 commits
    • Chao Yu's avatar
      f2fs: skip punching hole in special condition · 14cecc5c
      Chao Yu authored
      
      
      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: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      14cecc5c
    • Chao Yu's avatar
      f2fs: fix to truncate blocks past EOF in ->setattr · 09db6a2e
      Chao Yu authored
      
      
      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: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      09db6a2e
    • Jaegeuk Kim's avatar
      f2fs: do not skip latest inode information · 19c9c466
      Jaegeuk Kim authored
      
      
      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: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      19c9c466
    • Jaegeuk Kim's avatar
      f2fs: fix conditions to remain recovery information in f2fs_sync_file · 88bd02c9
      Jaegeuk Kim authored
      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: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      88bd02c9
  7. 16 Sep, 2014 1 commit
    • Jaegeuk Kim's avatar
      f2fs: give an option to enable in-place-updates during fsync to users · c1ce1b02
      Jaegeuk Kim authored
      
      
      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: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      c1ce1b02
  8. 11 Sep, 2014 1 commit
  9. 09 Sep, 2014 2 commits
  10. 04 Sep, 2014 1 commit
  11. 21 Aug, 2014 2 commits
  12. 19 Aug, 2014 2 commits
  13. 04 Aug, 2014 1 commit
  14. 31 Jul, 2014 1 commit
  15. 30 Jul, 2014 2 commits
  16. 09 Jul, 2014 2 commits
  17. 23 Jun, 2014 2 commits
  18. 12 Jun, 2014 1 commit
    • Al Viro's avatar
      ->splice_write() via ->write_iter() · 8d020765
      Al Viro authored
      
      
      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: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8d020765
  19. 07 Jun, 2014 1 commit
  20. 06 Jun, 2014 1 commit
  21. 07 May, 2014 4 commits