1. 04 11月, 2014 13 次提交
  2. 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
  3. 10 9月, 2014 1 次提交
  4. 04 9月, 2014 1 次提交
  5. 22 8月, 2014 2 次提交
  6. 20 8月, 2014 2 次提交
  7. 29 7月, 2014 1 次提交
  8. 07 5月, 2014 4 次提交
  9. 02 4月, 2014 1 次提交
  10. 14 1月, 2014 1 次提交
  11. 06 1月, 2014 6 次提交
    • C
      f2fs: avoid to read inline data except first page · 04a17fb1
      Chao Yu 提交于
      Here is a case which could read inline page data not from first page.
      
      1. write inline data
      2. lseek to offset 4096
      3. read 4096 bytes from offset 4096
      	(read_inline_data read inline data page to non-first page,
      	And previously VFS has add this page to page cache)
      4. ftruncate offset 8192
      5. read 4096 bytes from offset 4096
      	(we meet this updated page with inline data in cache)
      
      So we should leave this page with inited data and uptodate flag
      for this case.
      
      Change log from v1:
       o fix a deadlock bug
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      04a17fb1
    • C
      f2fs: avoid to left uninitialized data in page when read inline data · 18309aaa
      Chao Yu 提交于
      Change log from v1:
       o reduce unneeded memset in __f2fs_convert_inline_data
      
      >From 58796be2bd2becbe8d52305210fb2a64e7dd80b6 Mon Sep 17 00:00:00 2001
      From: Chao Yu <chao2.yu@samsung.com>
      Date: Mon, 30 Dec 2013 09:21:33 +0800
      Subject: [PATCH] f2fs: avoid to left uninitialized data in page when read
       inline data
      
      We left uninitialized data in the tail of page when we read an inline data
      page. So let's initialize left part of the page excluding inline data region.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      18309aaa
    • J
      f2fs: handle errors correctly during f2fs_reserve_block · a8865372
      Jaegeuk Kim 提交于
      The get_dnode_of_data nullifies inode and node page when error is occurred.
      
      There are two cases that passes inode page into get_dnode_of_data().
      
      1. make_empty_dir()
          -> get_new_data_page()
            -> f2fs_reserve_block(ipage)
      	-> get_dnode_of_data()
      
      2. f2fs_convert_inline_data()
          -> __f2fs_convert_inline_data()
            -> f2fs_reserve_block(ipage)
      	-> get_dnode_of_data()
      
      This patch adds correct error handling codes when get_dnode_of_data() returns
      an error.
      
      At first, f2fs_reserve_block() calls f2fs_put_dnode() whenever reserve_new_block
      returns an error.
      So, the rule of f2fs_reserve_block() is to nullify inode page when there is any
      error internally.
      
      Finally, two callers of f2fs_reserve_block() should call f2fs_put_dnode()
      appropriately if they got an error since successful f2fs_reserve_block().
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      a8865372
    • J
      f2fs: add inline_data recovery routine · 1e1bb4ba
      Jaegeuk Kim 提交于
      This patch adds a inline_data recovery routine with the following policy.
      
      [prev.] [next] of inline_data flag
         o       o  -> recover inline_data
         o       x  -> remove inline_data, and then recover data blocks
         x       o  -> remove inline_data, and then recover inline_data
         x       x  -> recover data blocks
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      1e1bb4ba
    • J
      f2fs: add the number of inline_data files to status info · 0dbdc2ae
      Jaegeuk Kim 提交于
      This patch adds the number of inline_data files into the status information.
      Note that the number is reset whenever the filesystem is newly mounted.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      0dbdc2ae
    • J
      f2fs: refactor f2fs_convert_inline_data · 9e09fc85
      Jaegeuk Kim 提交于
      Change log from v1:
       o handle NULL pointer of grab_cache_page_write_begin() pointed by Chao Yu.
      
      This patch refactors f2fs_convert_inline_data to check a couple of conditions
      internally for deciding whether it needs to convert inline_data or not.
      
      So, the new f2fs_convert_inline_data initially checks:
      1) f2fs_has_inline_data(), and
      2) the data size to be changed.
      
      If the inode has inline_data but the size to fill is less than MAX_INLINE_DATA,
      then we don't need to convert the inline_data with data allocation.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      9e09fc85
  12. 26 12月, 2013 1 次提交