1. 25 4月, 2017 1 次提交
    • J
      f2fs: fix out-of free segments · a7881893
      Jaegeuk Kim 提交于
      This patch also reverts d0db7703 ("f2fs: do SSR in higher priority").
      
      This patch fixes out of free segments caused by many small file creation by
      1) mkfs -s 1 2G
      2) mount
      3) untar
       - preoduce 60000 small files burstly
      4) sync
       - flush node pages
       - flush imeta
      
      Here, when we do f2fs_balance_fs, we missed # of imeta blocks, resulting in
      skipping to check has_not_enough_free_secs.
      
      Another test is done by
      1) mkfs -s 12 2G
      2) mount
      3) untar
       - preoduce 60000 small files burstly
      4) sync
       - flush node pages
       - flush imeta
      
      In this case, this patch also fixes wrong block allocation under large section
      size.
      Reported-by: NWilliam Brana <wbrana@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a7881893
  2. 20 4月, 2017 2 次提交
    • H
      f2fs: introduce async IPU policy · 04485987
      Hou Pengyang 提交于
      This patch introduces an ASYNC IPU policy.
      
      Under senario of large # of async updating(e.g. log writing in Android),
      disk would be seriously fragmented, and higher frequent gc would be triggered.
      
      This patch uses IPU to rewrite the async update writting, since async is
      NOT sensitive to io latency.
      Signed-off-by: NHou Pengyang <houpengyang@huawei.com>
      04485987
    • C
      f2fs: unlock cp_rwsem early for IPU writes · 001c584c
      Chao Yu 提交于
      For IPU writes, there won't be any udpates in dnode page since we
      will reuse old block address instead of allocating new one, so we
      don't need to lock cp_rwsem during IPU IO submitting.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      001c584c
  3. 11 4月, 2017 1 次提交
  4. 06 4月, 2017 3 次提交
  5. 25 3月, 2017 1 次提交
  6. 22 3月, 2017 2 次提交
    • K
      f2fs: fix bad prefetchw of NULL page · a83d50bc
      Kinglong Mee 提交于
      For f2fs_read_data_pages, the f2fs_mpage_readpages gets "page == NULL",
      so that, the prefetchw(&page->flags) is operated on NULL.
      
      Fixes: f1e88660 ("f2fs: expose f2fs_mpage_readpages")
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a83d50bc
    • J
      f2fs: fix stale ATOMIC_WRITTEN_PAGE private pointer · 8c242db9
      Jaegeuk Kim 提交于
      When I forced to enable atomic operations intentionally, I could hit the below
      panic, since we didn't clear page->private in f2fs_invalidate_page called by
      file truncation.
      
      The panic occurs due to NULL mapping having page->private.
      
      BUG: unable to handle kernel paging request at ffffffffffffffff
      IP: drop_buffers+0x38/0xe0
      PGD 5d00c067
      PUD 5d00e067
      PMD 0
      CPU: 3 PID: 1648 Comm: fsstress Tainted: G      D    OE   4.10.0+ #5
      Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
      task: ffff9151952863c0 task.stack: ffffaaec40db4000
      RIP: 0010:drop_buffers+0x38/0xe0
      RSP: 0018:ffffaaec40db74c8 EFLAGS: 00010292
      Call Trace:
       ? page_referenced+0x8b/0x170
       try_to_free_buffers+0xc5/0xe0
       try_to_release_page+0x49/0x50
       shrink_page_list+0x8bc/0x9f0
       shrink_inactive_list+0x1dd/0x500
       ? shrink_active_list+0x2c0/0x430
       shrink_node_memcg+0x5eb/0x7c0
       shrink_node+0xe1/0x320
       do_try_to_free_pages+0xef/0x2e0
       try_to_free_pages+0xe9/0x190
       __alloc_pages_slowpath+0x390/0xe70
       __alloc_pages_nodemask+0x291/0x2b0
       alloc_pages_current+0x95/0x140
       __page_cache_alloc+0xc4/0xe0
       pagecache_get_page+0xab/0x2a0
       grab_cache_page_write_begin+0x20/0x40
       get_read_data_page+0x2e6/0x4c0 [f2fs]
       ? f2fs_mark_inode_dirty_sync+0x16/0x30 [f2fs]
       ? truncate_data_blocks_range+0x238/0x2b0 [f2fs]
       get_lock_data_page+0x30/0x190 [f2fs]
       __exchange_data_block+0xaaf/0xf40 [f2fs]
       f2fs_fallocate+0x418/0xd00 [f2fs]
       vfs_fallocate+0x157/0x220
       SyS_fallocate+0x48/0x80
      Signed-off-by: NYunlei He <heyunlei@huawei.com>
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      [Chao Yu: use INMEM_INVALIDATE for better tracing]
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      8c242db9
  7. 02 3月, 2017 1 次提交
  8. 28 2月, 2017 5 次提交
  9. 24 2月, 2017 5 次提交
  10. 23 2月, 2017 4 次提交
  11. 29 1月, 2017 3 次提交
  12. 12 12月, 2016 1 次提交
  13. 30 11月, 2016 1 次提交
  14. 26 11月, 2016 6 次提交
  15. 24 11月, 2016 4 次提交
    • D
      f2fs: Use generic zoned block device terminology · 0bfd7a09
      Damien Le Moal 提交于
      SMR stands for "Shingled Magnetic Recording" which makes sense
      only for hard disk drives (spinning rust). The ZBC/ZAC standards
      enable management of SMR disks, but solid state drives may also
      support those standards. So rename the HMSMR feature to BLKZONED
      to avoid a HDD centric terminology. For the same reason, rename
      f2fs_sb_mounted_hmsmr to f2fs_sb_mounted_blkzoned.
      Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0bfd7a09
    • A
      f2fs: hide a maybe-uninitialized warning · 230436b3
      Arnd Bergmann 提交于
      gcc is unsure about the use of last_ofs_in_node, which might happen
      without a prior initialization:
      
      fs/f2fs//git/arm-soc/fs/f2fs/data.c: In function ‘f2fs_map_blocks’:
      fs/f2fs/data.c:799:54: warning: ‘last_ofs_in_node’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (prealloc && dn.ofs_in_node != last_ofs_in_node + 1) {
      
      As pointed out by Chao Yu, the code is actually correct as 'prealloc'
      is only set if the last_ofs_in_node has been set, the two always
      get updated together.
      
      This initializes last_ofs_in_node to dn.ofs_in_node for each
      new dnode at the start of the 'next_block' loop, which at that
      point is a correct initialization as well. I assume that compilers
      that correctly track the contents of the variables and do not
      warn about the condition also figure out that they can eliminate
      the extra assignment here.
      
      Fixes: 46008c6d ("f2fs: support in batch multi blocks preallocation")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      230436b3
    • J
      f2fs: use BIO_MAX_PAGES for bio allocation · 664ba972
      Jaegeuk Kim 提交于
      We don't need to allocate bio partially in order to maximize sequential writes.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      664ba972
    • C
      f2fs: be aware of extent beyond EOF in fiemap · 58736fa6
      Chao Yu 提交于
      f2fs can support fallocating blocks beyond file size without changing the
      size, but ->fiemap of f2fs was restricted and can't detect these extents
      fallocated past EOF, now relieve the restriction.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      58736fa6