1. 09 7月, 2016 3 次提交
    • C
      f2fs: fix to redirty page if fail to gc data page · 72e1c797
      Chao Yu 提交于
      If we fail to move data page during foreground GC, we should give another
      chance to writeback that page which was set dirty previously by writer.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      72e1c797
    • C
      f2fs: fix to detect truncation prior rather than EIO during read · 1563ac75
      Chao Yu 提交于
      In procedure of synchonized read, after sending out the read request, reader
      will try to lock the page for waiting device to finish the read jobs and
      unlock the page, but meanwhile, truncater will race with reader, so after
      reader get lock of the page, it should check page's mapping to detect
      whether someone has truncated the page in advance, then reader has the
      chance to do the retry if truncation was done, otherwise read can be failed
      due to previous condition check.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1563ac75
    • C
      f2fs: fix to avoid reading out encrypted data in page cache · 78682f79
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      78682f79
  2. 07 7月, 2016 6 次提交
  3. 16 6月, 2016 1 次提交
  4. 14 6月, 2016 2 次提交
    • J
      f2fs: fix deadlock in add_link failure · c92737ce
      Jaegeuk Kim 提交于
      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: NJaegeuk Kim <jaegeuk@kernel.org>
      c92737ce
    • J
      f2fs: introduce mode=lfs mount option · 36abef4e
      Jaegeuk Kim 提交于
      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: NJaegeuk Kim <jaegeuk@kernel.org>
      36abef4e
  5. 09 6月, 2016 4 次提交
  6. 08 6月, 2016 6 次提交
  7. 03 6月, 2016 18 次提交