1. 19 10月, 2017 1 次提交
    • D
      fscrypt: clean up include file mess · 734f0d24
      Dave Chinner 提交于
      Filesystems have to include different header files based on whether they
      are compiled with encryption support or not. That's nasty and messy.
      
      Instead, rationalise the headers so we have a single include fscrypt.h
      and let it decide what internal implementation to include based on the
      __FS_HAS_ENCRYPTION define.  Filesystems set __FS_HAS_ENCRYPTION to 1
      before including linux/fscrypt.h if they are built with encryption
      support.  Otherwise, they must set __FS_HAS_ENCRYPTION to 0.
      
      Add guards to prevent fscrypt_supp.h and fscrypt_notsupp.h from being
      directly included by filesystems.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      [EB: use 1 and 0 rather than defined/undefined]
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      734f0d24
  2. 29 9月, 2017 3 次提交
  3. 27 9月, 2017 8 次提交
  4. 26 9月, 2017 25 次提交
  5. 25 9月, 2017 1 次提交
    • L
      fs: Fix page cache inconsistency when mixing buffered and AIO DIO · 332391a9
      Lukas Czerner 提交于
      Currently when mixing buffered reads and asynchronous direct writes it
      is possible to end up with the situation where we have stale data in the
      page cache while the new data is already written to disk. This is
      permanent until the affected pages are flushed away. Despite the fact
      that mixing buffered and direct IO is ill-advised it does pose a thread
      for a data integrity, is unexpected and should be fixed.
      
      Fix this by deferring completion of asynchronous direct writes to a
      process context in the case that there are mapped pages to be found in
      the inode. Later before the completion in dio_complete() invalidate
      the pages in question. This ensures that after the completion the pages
      in the written area are either unmapped, or populated with up-to-date
      data. Also do the same for the iomap case which uses
      iomap_dio_complete() instead.
      
      This has a side effect of deferring the completion to a process context
      for every AIO DIO that happens on inode that has pages mapped. However
      since the consensus is that this is ill-advised practice the performance
      implication should not be a problem.
      
      This was based on proposal from Jeff Moyer, thanks!
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      332391a9
  6. 23 9月, 2017 2 次提交