1. 28 Jul, 2011 2 commits
    • Jan Kara's avatar
      ocfs2: Avoid livelock in ocfs2_readpage() · c7e25e6e
      Jan Kara authored
      When someone writes to an inode, readers accessing the same inode via
      ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
      do_generic_file_read() looks up the page again and retries ->readpage()
      when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
      readers, they can occupy all CPUs and in non-preempt kernel the system is
      deadlocked because writer holding ip_alloc_sem is never run to release the
      semaphore. Fix the problem by making reader block on ip_alloc_sem to break
      the busy loop.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      c7e25e6e
    • Mark Fasheh's avatar
      ocfs2: serialize unaligned aio · a11f7e63
      Mark Fasheh authored
      Fix a corruption that can happen when we have (two or more) outstanding
      aio's to an overlapping unaligned region.  Ext4
      (e9e3bcec) and xfs recently had to fix
      similar issues.
      
      In our case what happens is that we can have an outstanding aio on a region
      and if a write comes in with some bytes overlapping the original aio we may
      decide to read that region into a page before continuing (typically because
      of buffered-io fallback).  Since we have no ordering guarantees with the
      aio, we can read stale or bad data into the page and then write it back out.
      
      If the i/o is page and block aligned, then we avoid this issue as there
      won't be any need to read data from disk.
      
      I took the same approach as Eric in the ext4 patch and introduced some
      serialization of unaligned async direct i/o.  I don't expect this to have an
      effect on the most common cases of AIO.  Unaligned aio will be slower
      though, but that's far more acceptable than data corruption.
      Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      a11f7e63
  2. 01 Jun, 2011 4 commits
  3. 31 May, 2011 9 commits
  4. 30 May, 2011 20 commits
  5. 29 May, 2011 5 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 · bd1bfe40
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
        eCryptfs: Remove ecryptfs_header_cache_2
        eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()
        eCryptfs: Return useful code from contains_ecryptfs_marker
        eCryptfs: Fix new inode race condition
        eCryptfs: Cleanup inode initialization code
        eCryptfs: Consolidate inode functions into inode.c
      bd1bfe40
    • Linus Torvalds's avatar
      Merge branch 'pnfs-submit' of git://git.open-osd.org/linux-open-osd · cd1acdf1
      Linus Torvalds authored
      * 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits)
        pnfs-obj: pg_test check for max_io_size
        NFSv4.1: define nfs_generic_pg_test
        NFSv4.1: use pnfs_generic_pg_test directly by layout driver
        NFSv4.1: change pg_test return type to bool
        NFSv4.1: unify pnfs_pageio_init functions
        pnfs-obj: objlayout_encode_layoutcommit implementation
        pnfs: encode_layoutcommit
        pnfs-obj: report errors and .encode_layoutreturn Implementation.
        pnfs: encode_layoutreturn
        pnfs: layoutret_on_setattr
        pnfs: layoutreturn
        pnfs-obj: osd raid engine read/write implementation
        pnfs: support for non-rpc layout drivers
        pnfs-obj: define per-inode private structure
        pnfs: alloc and free layout_hdr layoutdriver methods
        pnfs-obj: objio_osd device information retrieval and caching
        pnfs-obj: decode layout, alloc/free lseg
        pnfs-obj: pnfs_osd XDR client implementation
        pnfs-obj: pnfs_osd XDR definitions
        pnfs-obj: objlayoutdriver module skeleton
        ...
      cd1acdf1
    • Linus Torvalds's avatar
      arm gpio drivers: make them 'depends on ARM' · fac04863
      Linus Torvalds authored
      We had a few drivers move from arch/arm into drivers/gpio, but they
      don't actually compile without the ARM platform headers etc.  As a
      result they were messing up allyesconfig on x86.
      
      Make them depend on ARM.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fac04863
    • Tyler Hicks's avatar
      eCryptfs: Remove ecryptfs_header_cache_2 · 30632870
      Tyler Hicks authored
      Now that ecryptfs_lookup_interpose() is no longer using
      ecryptfs_header_cache_2 to read in metadata, the kmem_cache can be
      removed and the ecryptfs_header_cache_1 kmem_cache can be renamed to
      ecryptfs_header_cache.
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      30632870
    • Tyler Hicks's avatar
      eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose() · 778aeb42
      Tyler Hicks authored
      ecryptfs_lookup_interpose() has turned into spaghetti code over the
      years. This is an effort to clean it up.
      
       - Shorten overly descriptive variable names such as ecryptfs_dentry
       - Simplify gotos and error paths
       - Create helper function for reading plaintext i_size from metadata
      
      It also includes an optimization when reading i_size from the metadata.
      A complete page-sized kmem_cache_alloc() was being done to read in 16
      bytes of metadata. The buffer for that is now statically declared.
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      778aeb42