1. 13 9月, 2013 3 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · b7c09ad4
      Linus Torvalds 提交于
      Pull btrfs updates from Chris Mason:
       "This is against 3.11-rc7, but was pulled and tested against your tree
        as of yesterday.  We do have two small incrementals queued up, but I
        wanted to get this bunch out the door before I hop on an airplane.
      
        This is a fairly large batch of fixes, performance improvements, and
        cleanups from the usual Btrfs suspects.
      
        We've included Stefan Behren's work to index subvolume UUIDs, which is
        targeted at speeding up send/receive with many subvolumes or snapshots
        in place.  It closes a long standing performance issue that was built
        in to the disk format.
      
        Mark Fasheh's offline dedup work is also here.  In this case offline
        means the FS is mounted and active, but the dedup work is not done
        inline during file IO.  This is a building block where utilities are
        able to ask the FS to dedup a series of extents.  The kernel takes
        care of verifying the data involved really is the same.  Today this
        involves reading both extents, but we'll continue to evolve the
        patches"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (118 commits)
        Btrfs: optimize key searches in btrfs_search_slot
        Btrfs: don't use an async starter for most of our workers
        Btrfs: only update disk_i_size as we remove extents
        Btrfs: fix deadlock in uuid scan kthread
        Btrfs: stop refusing the relocation of chunk 0
        Btrfs: fix memory leak of uuid_root in free_fs_info
        btrfs: reuse kbasename helper
        btrfs: return btrfs error code for dev excl ops err
        Btrfs: allow partial ordered extent completion
        Btrfs: convert all bug_ons in free-space-cache.c
        Btrfs: add support for asserts
        Btrfs: adjust the fs_devices->missing count on unmount
        Btrf: cleanup: don't check for root_refs == 0 twice
        Btrfs: fix for patch "cleanup: don't check the same thing twice"
        Btrfs: get rid of one BUG() in write_all_supers()
        Btrfs: allocate prelim_ref with a slab allocater
        Btrfs: pass gfp_t to __add_prelim_ref() to avoid always using GFP_ATOMIC
        Btrfs: fix race conditions in BTRFS_IOC_FS_INFO ioctl
        Btrfs: fix race between removing a dev and writing sbs
        Btrfs: remove ourselves from the cluster list under lock
        ...
      b7c09ad4
    • W
      dcache: get/release read lock in read_seqbegin_or_lock() & friend · 18129977
      Waiman Long 提交于
      This patch modifies read_seqbegin_or_lock() and need_seqretry() to use
      newly introduced read_seqlock_excl() and read_sequnlock_excl()
      primitives so that they won't change the sequence number even if they
      fall back to take the lock.  This is OK as no change to the protected
      data structure is being made.
      
      It will prevent one fallback to lock taking from cascading into a series
      of lock taking reducing performance because of the sequence number
      change.  It will also allow other sequence readers to go forward while
      an exclusive reader lock is taken.
      
      This patch also updates some of the inaccurate comments in the code.
      Signed-off-by: NWaiman Long <Waiman.Long@hp.com>
      To: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18129977
    • W
      seqlock: Add a new locking reader type · 1370e97b
      Waiman Long 提交于
      The sequence lock (seqlock) was originally designed for the cases where
      the readers do not need to block the writers by making the readers retry
      the read operation when the data change.
      
      Since then, the use cases have been expanded to include situations where
      a thread does not need to change the data (effectively a reader) at all
      but have to take the writer lock because it can't tolerate changes to
      the protected structure.  Some examples are the d_path() function and
      the getcwd() syscall in fs/dcache.c where the functions take the writer
      lock on rename_lock even though they don't need to change anything in
      the protected data structure at all.  This is inefficient as a reader is
      now blocking other sequence number reading readers from moving forward
      by pretending to be a writer.
      
      This patch tries to eliminate this inefficiency by introducing a new
      type of locking reader to the seqlock locking mechanism.  This new
      locking reader will try to take an exclusive lock preventing other
      writers and locking readers from going forward.  However, it won't
      affect the progress of the other sequence number reading readers as the
      sequence number won't be changed.
      Signed-off-by: NWaiman Long <Waiman.Long@hp.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1370e97b
  2. 12 9月, 2013 37 次提交