1. 23 2月, 2017 4 次提交
  2. 29 1月, 2017 3 次提交
  3. 12 12月, 2016 1 次提交
  4. 30 11月, 2016 1 次提交
  5. 26 11月, 2016 6 次提交
  6. 24 11月, 2016 6 次提交
  7. 14 11月, 2016 2 次提交
  8. 03 11月, 2016 1 次提交
  9. 01 11月, 2016 1 次提交
  10. 12 10月, 2016 1 次提交
  11. 01 10月, 2016 3 次提交
    • C
      f2fs: don't submit irrelevant page · 6ca56ca4
      Chao Yu 提交于
      While we call ->writepages, there are two cases:
      a. we didn't writeout any dirty pages, since they are writebacked by other
      thread concurrently.
      b. we writeout dirty pages, and have already submitted bio to block layer.
      
      In these cases, we don't need to do additional bio flushing unnecessarily,
      it may split bio in cache into smaller one.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      6ca56ca4
    • C
      f2fs: support configuring fault injection per superblock · 1ecc0c5c
      Chao Yu 提交于
      Previously, we only support global fault injection configuration, so that
      when we configure type/rate of fault injection through sysfs, mount
      option, it will influence all f2fs partition which is being used.
      
      It is not make sence, since it will be not convenient if developer want
      to test separated partitions with different fault injection rate/type
      simultaneously, also it's not possible to enable fault injection in one
      partition and disable fault injection in other one.
      
      >From now on, we move global configuration of fault injection in module
      into per-superblock, hence injection testing can be more flexible.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1ecc0c5c
    • W
      f2fs: add customized migrate_page callback · 5b7a487c
      Weichao Guo 提交于
      This patch improves the migration of dirty pages and allows migrating atomic
      written pages that F2FS uses in Page Cache. Instead of the fallback releasing
      page path, it provides better performance for memory compaction, CMA and other
      users of memory page migrating. For dirty pages, there is no need to write back
      first when migrating. For an atomic written page before committing, we can
      migrate the page and update the related 'inmem_pages' list at the same time.
      Signed-off-by: NWeichao Guo <guoweichao@huawei.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      [Jaegeuk Kim: fix some coding style]
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      5b7a487c
  12. 23 9月, 2016 2 次提交
  13. 14 9月, 2016 1 次提交
    • J
      f2fs: fix to set PageUptodate in f2fs_write_end correctly · 649d7df2
      Jaegeuk Kim 提交于
      Previously, f2fs_write_begin sets PageUptodate all the time. But, when user
      tries to update the entire page (i.e., len == PAGE_SIZE), we need to consider
      that the page is able to be copied partially afterwards. In such the case,
      we will lose the remaing region in the page.
      
      This patch fixes this by setting PageUptodate in f2fs_write_end as given copied
      result. In the short copy case, it returns zero to let generic_perform_write
      retry copying user data again.
      
      As a result, f2fs_write_end() works:
         PageUptodate      len      copied    return   retry
      1. no                4096     4096      4096     false  -> return 4096
      2. no                4096     1024      0        true   -> goto #1 case
      3. yes               2048     2048      2048     false  -> return 2048
      4. yes               2048     1024      1024     false  -> return 1024
      Suggested-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      649d7df2
  14. 13 9月, 2016 1 次提交
  15. 08 9月, 2016 1 次提交
  16. 30 8月, 2016 3 次提交
  17. 19 8月, 2016 1 次提交
    • C
      Revert "f2fs: move i_size_write in f2fs_write_end" · 3024c9a1
      Chao Yu 提交于
      This reverts commit a2ee0a30.
      
      When testing with generic/032 of xfstest suit, failure message will be
      reported as below:
      
      generic/032 8s ... [failed, exit status 1] - output mismatch (see results/generic/032.out.bad)
          --- tests/generic/032.out	2015-01-11 16:52:27.643681072 +0800
          +++ results/generic/032.out.bad	2016-08-06 13:44:43.861330500 +0800
          @@ -1,5 +1,5 @@
           QA output created by 032
          -100 iterations
          -0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
          -*
          -0100000
          +1: [768..775]: unwritten
          +Unwritten extents found!
          ...
          (Run 'diff -u tests/generic/032.out results/generic/032.out.bad'  to see the entire diff)
      Ran: generic/032
      Failures: generic/032
      Failed 1 of 1 tests
      
      In write_end(), we should update i_size of inode before unlock page,
      otherwise, we will lose newly updated data in following race condition.
      
      Thread A			Thread B
      - write_end
       - unlock page
      				- writepages
      				 - lock_page
      				  - writepage
      				  if page is out-of-range of file size,
      				  we will skip writting the page.
       - update i_size
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      3024c9a1
  18. 05 8月, 2016 1 次提交
  19. 27 7月, 2016 1 次提交
    • M
      mm, memcg: use consistent gfp flags during readahead · 8a5c743e
      Michal Hocko 提交于
      Vladimir has noticed that we might declare memcg oom even during
      readahead because read_pages only uses GFP_KERNEL (with mapping_gfp
      restriction) while __do_page_cache_readahead uses
      page_cache_alloc_readahead which adds __GFP_NORETRY to prevent from
      OOMs.  This gfp mask discrepancy is really unfortunate and easily
      fixable.  Drop page_cache_alloc_readahead() which only has one user and
      outsource the gfp_mask logic into readahead_gfp_mask and propagate this
      mask from __do_page_cache_readahead down to read_pages.
      
      This alone would have only very limited impact as most filesystems are
      implementing ->readpages and the common implementation mpage_readpages
      does GFP_KERNEL (with mapping_gfp restriction) again.  We can tell it to
      use readahead_gfp_mask instead as this function is called only during
      readahead as well.  The same applies to read_cache_pages.
      
      ext4 has its own ext4_mpage_readpages but the path which has pages !=
      NULL can use the same gfp mask.  Btrfs, cifs, f2fs and orangefs are
      doing a very similar pattern to mpage_readpages so the same can be
      applied to them as well.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [mhocko@suse.com: restrict gfp mask in mpage_alloc]
        Link: http://lkml.kernel.org/r/20160610074223.GC32285@dhcp22.suse.cz
      Link: http://lkml.kernel.org/r/1465301556-26431-1-git-send-email-mhocko@kernel.orgSigned-off-by: NMichal Hocko <mhocko@suse.com>
      Cc: Vladimir Davydov <vdavydov@parallels.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Steve French <sfrench@samba.org>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Mike Marshall <hubcap@omnibond.com>
      Cc: Jaegeuk Kim <jaegeuk@kernel.org>
      Cc: Changman Lee <cm224.lee@samsung.com>
      Cc: Chao Yu <yuchao0@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8a5c743e