1. 29 8月, 2012 3 次提交
    • S
      Btrfs: revert checksum error statistic which can cause a BUG() · 5ee0844d
      Stefan Behrens 提交于
      Commit 442a4f63 added btrfs device
      statistic counters for detected IO and checksum errors to Linux 3.5.
      The statistic part that counts checksum errors in
      end_bio_extent_readpage() can cause a BUG() in a subfunction:
      "kernel BUG at fs/btrfs/volumes.c:3762!"
      That part is reverted with the current patch.
      However, the counting of checksum errors in the scrub context remains
      active, and the counting of detected IO errors (read, write or flush
      errors) in all contexts remains active.
      
      Cc: stable <stable@vger.kernel.org> # 3.5
      Signed-off-by: NStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      5ee0844d
    • J
      Btrfs: barrier before waitqueue_active · 66657b31
      Josef Bacik 提交于
      We need a barrir before calling waitqueue_active otherwise we will miss
      wakeups.  So in places that do atomic_dec(); then atomic_read() use
      atomic_dec_return() which imply a memory barrier (see memory-barriers.txt)
      and then add an explicit memory barrier everywhere else that need them.
      Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      66657b31
    • J
      Btrfs: do not strdup non existent strings · 99f5944b
      Josef Bacik 提交于
      When we close devices we add back empty devices for some reason that escapes
      me.  In the case of a missing dev we don't allocate an rcu_string for it's
      name, so check to see if the device has a name and if it doesn't don't
      bother strdup()'ing it.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      99f5944b
  2. 24 7月, 2012 4 次提交
  3. 03 7月, 2012 3 次提交
  4. 15 6月, 2012 1 次提交
    • J
      Btrfs: use rcu to protect device->name · 606686ee
      Josef Bacik 提交于
      Al pointed out that we can just toss out the old name on a device and add a
      new one arbitrarily, so anybody who uses device->name in printk could
      possibly use free'd memory.  Instead of adding locking around all of this he
      suggested doing it with RCU, so I've introduced a struct rcu_string that
      does just that and have gone through and protected all accesses to
      device->name that aren't under the uuid_mutex with rcu_read_lock().  This
      protects us and I will use it for dealing with removing the device that we
      used to mount the file system in a later patch.  Thanks,
      Reviewed-by: NDavid Sterba <dsterba@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      606686ee
  5. 30 5月, 2012 4 次提交
  6. 28 4月, 2012 1 次提交
  7. 19 4月, 2012 2 次提交
  8. 13 4月, 2012 1 次提交
  9. 29 3月, 2012 1 次提交
    • C
      Btrfs: flush out and clean up any block device pages during mount · 3c4bb26b
      Chris Mason 提交于
      Btrfs puts the filesystem metadata into its own address space, and
      somehow the block device address space isn't getting onto disk properly
      before a mount.  The end result is that a loop of mkfs and mounting the
      filesystem will sometimes find stale or incorrect data.
      
      This commit should fix it by sprinkling fdatawrites and invalidate_bdev
      calls around.  This is a short term measure to make sure it is fixed.
      The block devices really should be flushed and cleaned up higher in the
      stack.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3c4bb26b
  10. 27 3月, 2012 7 次提交
  11. 22 3月, 2012 6 次提交
  12. 23 2月, 2012 1 次提交
    • C
      Btrfs: make sure we update latest_bdev · a6b0d5c8
      Chris Mason 提交于
      When we are setting up the mount, we close all the
      devices that were not actually part of the metadata we found.
      
      But, we don't make sure that one of those devices wasn't
      fs_devices->latest_bdev, which means we can do a use after free
      on the one we closed.
      
      This updates latest_bdev as it goes.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      a6b0d5c8
  13. 17 2月, 2012 1 次提交
  14. 15 2月, 2012 1 次提交
    • D
      btrfs: silence warning in raid array setup · 8a334426
      David Sterba 提交于
      Raid array setup code creates an extent buffer in an usual way. When the
      PAGE_CACHE_SIZE is > super block size, the extent pages are not marked
      up-to-date, which triggers a WARN_ON in the following
      write_extent_buffer call. Add an explicit up-to-date call to silence the
      warning.
      Signed-off-by: NDavid Sterba <dsterba@suse.cz>
      8a334426
  15. 17 1月, 2012 4 次提交