1. 10 1月, 2015 5 次提交
  2. 09 12月, 2014 3 次提交
  3. 24 11月, 2014 2 次提交
  4. 07 11月, 2014 1 次提交
  5. 06 11月, 2014 1 次提交
  6. 05 11月, 2014 1 次提交
  7. 04 11月, 2014 8 次提交
  8. 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
  9. 01 10月, 2014 2 次提交
    • J
      f2fs: check the use of macros on block counts and addresses · 7cd8558b
      Jaegeuk Kim 提交于
      This patch cleans up the existing and new macros for readability.
      
      Rule is like this.
      
               ,-----------------------------------------> MAX_BLKADDR -,
               |  ,------------- TOTAL_BLKS ----------------------------,
               |  |                                                     |
               |  ,- seg0_blkaddr   ,----- sit/nat/ssa/main blkaddress  |
      block    |  | (SEG0_BLKADDR)  | | | |   (e.g., MAIN_BLKADDR)      |
      address  0..x................ a b c d .............................
                  |                                                     |
      global seg# 0...................... m .............................
                  |                       |                             |
                  |                       `------- MAIN_SEGS -----------'
                  `-------------- TOTAL_SEGS ---------------------------'
                                          |                             |
       seg#                               0..........xx..................
      
      = Note =
       o GET_SEGNO_FROM_SEG0 : blk address -> global segno
       o GET_SEGNO           : blk address -> segno
       o START_BLOCK         : segno -> starting block address
      Reviewed-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      7cd8558b
    • J
      f2fs: introduce FITRIM in f2fs_ioctl · 4b2fecc8
      Jaegeuk Kim 提交于
      This patch introduces FITRIM in f2fs_ioctl.
      In this case, f2fs will issue small discards and prefree discards as many as
      possible for the given area.
      Reviewed-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      4b2fecc8
  10. 24 9月, 2014 3 次提交
  11. 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
  12. 10 9月, 2014 6 次提交
    • G
      f2fs: use lock-less list(llist) to simplify the flush cmd management · 721bd4d5
      Gu Zheng 提交于
      We use flush cmd control to collect many flush cmds, and flush them
      together. In this case, we use two list to manage the flush cmds
      (collect and dispatch), and one spin lock is used to protect this.
      In fact, the lock-less list(llist) is very suitable to this case,
      and we use simplify this routine.
      
      -
      v2:
      -use llist_for_each_entry_safe to fix possible use-after-free issue.
      -remove the unused field from struct flush_cmd.
      Thanks for Yu's suggestion.
      -
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      721bd4d5
    • C
      f2fs: refactor flush_sit_entries codes for reducing SIT writes · 184a5cd2
      Chao Yu 提交于
      In commit aec71382 ("f2fs: refactor flush_nat_entries codes for reducing NAT
      writes"), we descripte the issue as below:
      
      "Although building NAT journal in cursum reduce the read/write work for NAT
      block, but previous design leave us lower performance when write checkpoint
      frequently for these cases:
      1. if journal in cursum has already full, it's a bit of waste that we flush all
         nat entries to page for persistence, but not to cache any entries.
      2. if journal in cursum is not full, we fill nat entries to journal util
         journal is full, then flush the left dirty entries to disk without merge
         journaled entries, so these journaled entries may be flushed to disk at next
         checkpoint but lost chance to flushed last time."
      
      Actually, we have the same problem in using SIT journal area.
      
      In this patch, firstly we will update sit journal with dirty entries as many as
      possible. Secondly if there is no space in sit journal, we will remove all
      entries in journal and walk through the whole dirty entry bitmap of sit,
      accounting dirty sit entries located in same SIT block to sit entry set. All
      entry sets are linked to list sit_entry_set in sm_info, sorted ascending order
      by count of entries in set. Later we flush entries in set which have fewest
      entries into journal as many as we can, and then flush dense set with merged
      entries to disk.
      
      In this way we can use sit journal area more effectively, also we will reduce
      SIT update, result in gaining in performance and saving lifetime of flash
      device.
      
      In my testing environment, it shows this patch can help to reduce SIT block
      update obviously.
      
      virtual machine + hard disk:
      fsstress -p 20 -n 400 -l 5
      		sit page num	cp count	sit pages/cp
      based		2006.50		1349.75		1.486
      patched		1566.25		1463.25		1.070
      
      Our latency of merging op is small when handling a great number of dirty SIT
      entries in flush_sit_entries:
      latency(ns)	dirty sit count
      36038		2151
      49168		2123
      37174		2232
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      184a5cd2
    • C
      f2fs: remove unneeded sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO · d3a14afd
      Chao Yu 提交于
      sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO is not used, remove it.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d3a14afd
    • J
      f2fs: handle bug cases by letting fsck.f2fs initiate · ec325b52
      Jaegeuk Kim 提交于
      This patch adds to handle corner buggy cases for fsck.f2fs.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ec325b52
    • J
      f2fs: add BUG cases to initiate fsck.f2fs · 05796763
      Jaegeuk Kim 提交于
      This patch replaces BUG cases with f2fs_bug_on to remain fsck.f2fs information.
      And it implements some void functions to initiate fsck.f2fs too.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      05796763
    • J
      f2fs: need fsck.f2fs when f2fs_bug_on is triggered · 9850cf4a
      Jaegeuk Kim 提交于
      If any f2fs_bug_on is triggered, fsck.f2fs is needed.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      9850cf4a
  13. 04 9月, 2014 1 次提交
  14. 22 8月, 2014 1 次提交
    • J
      f2fs: remove rewrite_node_page · 202095a7
      Jaegeuk Kim 提交于
      I think we need to let the dirty node pages remain in the page cache instead
      of rewriting them in their places.
      So, after done with successful recovery, write_checkpoint will flush all of them
      through the normal write path.
      Through this, we can avoid potential error cases in terms of block allocation.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      202095a7
  15. 20 8月, 2014 1 次提交
  16. 05 8月, 2014 1 次提交
  17. 31 7月, 2014 2 次提交
    • D
      f2fs: remove redundant lines in allocate_data_block · 33be828a
      Dongho Sim 提交于
      There are redundant lines in allocate_data_block.
      
      In this function, we call refresh_sit_entry with old seg and old curseg.
      After that, we call locate_dirty_segment with old curseg.
      
      But, the new address is always allocated from old curseg and
      we call locate_dirty_segment with old curseg in refresh_sit_entry.
      So, we do not need to call locate_dirty_segment with old curseg again.
      
      We've discussed like below:
      
      Jaegeuk said:
       "When considering SSR, we need to take care of the following scenario.
        - old segno : X
        - new address : Z
        - old curseg : Y
        This means, a new block is supposed to be written to Z from X.
        And Z is newly allocated in the same path from Y.
      
        In that case, we should trigger locate_dirty_segment for Y, since
        it was a current_segment and can be dirty owing to SSR.
        But that was not included in the dirty list."
      
      Changman said:
       "We already choosed old curseg(Y) and then we allocate new address(Z) from old
        curseg(Y). After that we call refresh_sit_entry(old address, new address).
        In the funcation, we call locate_dirty_segment with old seg and old curseg.
        So calling locate_dirty_segment after refresh_sit_entry again is redundant."
      
      Jaegeuk said:
       "Right. The new address is always allocated from old_curseg."
      Reviewed-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NDongho Sim <dh.sim@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      33be828a
    • J
      f2fs: add tracepoint for f2fs_issue_flush · 24a9ee0f
      Jaegeuk Kim 提交于
      This patch adds a tracepoint for f2fs_issue_flush.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      24a9ee0f