1. 08 7月, 2020 9 次提交
  2. 19 6月, 2020 6 次提交
  3. 09 6月, 2020 6 次提交
  4. 05 6月, 2020 1 次提交
    • S
      f2fs: fix retry logic in f2fs_write_cache_pages() · e78790f8
      Sahitya Tummala 提交于
      In case a compressed file is getting overwritten, the current retry
      logic doesn't include the current page to be retried now as it sets
      the new start index as 0 and new end index as writeback_index - 1.
      This causes the corresponding cluster to be uncompressed and written
      as normal pages without compression. Fix this by allowing writeback to
      be retried for the current page as well (in case of compressed page
      getting retried due to index mismatch with cluster index). So that
      this cluster can be written compressed in case of overwrite.
      
      Also, align f2fs_write_cache_pages() according to the change -
      <64081362>("mm/page-writeback.c: fix range_cyclic writeback vs
      writepages deadlock").
      Signed-off-by: NSahitya Tummala <stummala@codeaurora.org>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      e78790f8
  5. 04 6月, 2020 3 次提交
  6. 03 6月, 2020 4 次提交
  7. 30 5月, 2020 1 次提交
    • C
      f2fs: fix wrong discard space · ca7f76e6
      Chao Yu 提交于
      Under heavy fsstress, we may triggle panic while issuing discard,
      because __check_sit_bitmap() detects that discard command may earse
      valid data blocks, the root cause is as below race stack described,
      since we removed lock when flushing quota data, quota data writeback
      may race with write_checkpoint(), so that it causes inconsistency in
      between cached discard entry and segment bitmap.
      
      - f2fs_write_checkpoint
       - block_operations
        - set_sbi_flag(sbi, SBI_QUOTA_SKIP_FLUSH)
       - f2fs_flush_sit_entries
        - add_discard_addrs
         - __set_bit_le(i, (void *)de->discard_map);
      						- f2fs_write_data_pages
      						 - f2fs_write_single_data_page
      						   : inode is quota one, cp_rwsem won't be locked
      						  - f2fs_do_write_data_page
      						   - f2fs_allocate_data_block
      						    - f2fs_wait_discard_bio
      						      : discard entry has not been added yet.
      						    - update_sit_entry
       - f2fs_clear_prefree_segments
        - f2fs_issue_discard
        : add discard entry
      
      In order to fix this, this patch uses node_write to serialize
      f2fs_allocate_data_block and checkpoint.
      
      Fixes: 435cbab9 ("f2fs: fix quota_sync failure due to f2fs_lock_op")
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ca7f76e6
  8. 29 5月, 2020 4 次提交
  9. 27 5月, 2020 1 次提交
  10. 25 5月, 2020 1 次提交
  11. 19 5月, 2020 3 次提交
    • E
      fscrypt: support test_dummy_encryption=v2 · ed318a6c
      Eric Biggers 提交于
      v1 encryption policies are deprecated in favor of v2, and some new
      features (e.g. encryption+casefolding) are only being added for v2.
      
      Therefore, the "test_dummy_encryption" mount option (which is used for
      encryption I/O testing with xfstests) needs to support v2 policies.
      
      To do this, extend its syntax to be "test_dummy_encryption=v1" or
      "test_dummy_encryption=v2".  The existing "test_dummy_encryption" (no
      argument) also continues to be accepted, to specify the default setting
      -- currently v1, but the next patch changes it to v2.
      
      To cleanly support both v1 and v2 while also making it easy to support
      specifying other encryption settings in the future (say, accepting
      "$contents_mode:$filenames_mode:v2"), make ext4 and f2fs maintain a
      pointer to the dummy fscrypt_context rather than using mount flags.
      
      To avoid concurrency issues, don't allow test_dummy_encryption to be set
      or changed during a remount.  (The former restriction is new, but
      xfstests doesn't run into it, so no one should notice.)
      
      Tested with 'gce-xfstests -c {ext4,f2fs}/encrypt -g auto'.  On ext4,
      there are two regressions, both of which are test bugs: ext4/023 and
      ext4/028 fail because they set an xattr and expect it to be stored
      inline, but the increase in size of the fscrypt_context from
      24 to 40 bytes causes this xattr to be spilled into an external block.
      
      Link: https://lore.kernel.org/r/20200512233251.118314-4-ebiggers@kernel.orgAcked-by: NJaegeuk Kim <jaegeuk@kernel.org>
      Reviewed-by: NTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      ed318a6c
    • J
      f2fs: flush dirty meta pages when flushing them · 9c30df7c
      Jaegeuk Kim 提交于
      Let's guarantee flusing dirty meta pages to avoid infinite loop.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      9c30df7c
    • J
      f2fs: fix checkpoint=disable:%u%% · 1ae18f71
      Jaegeuk Kim 提交于
      When parsing the mount option, we don't have sbi->user_block_count.
      Should do it after getting it.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1ae18f71
  12. 12 5月, 2020 1 次提交