1. 08 Jul, 2016 1 commit
    • Chao Yu's avatar
      f2fs: fix to avoid reading out encrypted data in page cache · 78682f79
      Chao Yu authored
      For encrypted inode, if user overwrites data of the inode, f2fs will read
      encrypted data into page cache, and then do the decryption.
      
      However reader can race with overwriter, and it will see encrypted data
      which has not been decrypted by overwriter yet. Fix it by moving decrypting
      work to background and keep page non-uptodated until data is decrypted.
      
      Thread A				Thread B
      - f2fs_file_write_iter
       - __generic_file_write_iter
        - generic_perform_write
         - f2fs_write_begin
          - f2fs_submit_page_bio
      					- generic_file_read_iter
      					 - do_generic_file_read
      					  - lock_page_killable
      					  - unlock_page
      					  - copy_page_to_iter
      					  hit the encrypted data in updated page
          - lock_page
          - fscrypt_decrypt_page
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      78682f79
  2. 06 Jul, 2016 6 commits
  3. 15 Jun, 2016 1 commit
  4. 13 Jun, 2016 2 commits
    • Jaegeuk Kim's avatar
      f2fs: fix deadlock in add_link failure · c92737ce
      Jaegeuk Kim authored
      mkdir                        sync_dirty_inode
       - init_inode_metadata
         - lock_page(node)
         - make_empty_dir
                                   - filemap_fdatawrite()
                                    - do_writepages
                                    - lock_page(data)
                                    - write_page(data)
                                     - lock_page(node)
         - f2fs_init_acl
          - error
         - truncate_inode_pages
          - lock_page(data)
      
      So, we don't need to truncate data pages in this error case, which will
      be done by f2fs_evict_inode.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      c92737ce
    • Jaegeuk Kim's avatar
      f2fs: introduce mode=lfs mount option · 36abef4e
      Jaegeuk Kim authored
      This mount option is to enable original log-structured filesystem forcefully.
      So, there should be no random writes for main area.
      
      Especially, this supports host-managed SMR device.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      36abef4e
  5. 08 Jun, 2016 4 commits
  6. 07 Jun, 2016 6 commits
  7. 03 Jun, 2016 20 commits