1. 26 7月, 2016 38 次提交
  2. 21 7月, 2016 2 次提交
    • C
      Btrfs: fix delalloc accounting after copy_from_user faults · 8b8b08cb
      Chris Mason 提交于
      Commit 56244ef1 was almost but not quite enough to fix the
      reservation math after btrfs_copy_from_user returned partial copies.
      
      Some users are still seeing warnings in btrfs_destroy_inode, and with a
      long enough test run I'm able to trigger them as well.
      
      This patch fixes the accounting math again, bringing it much closer to
      the way it was before the sectorsize conversion Chandan did.  The
      problem is accounting for the offset into the page/sector when we do a
      partial copy.  This one just uses the dirty_sectors variable which
      should already be updated properly.
      Signed-off-by: NChris Mason <clm@fb.com>
      cc: stable@vger.kernel.org # v4.6+
      8b8b08cb
    • J
      Btrfs: avoid deadlocks during reservations in btrfs_truncate_block · bac357dc
      Josef Bacik 提交于
      The new enospc code makes it possible to deadlock if we don't use
      FLUSH_LIMIT during reservations inside a transaction.  This enforces
      the correct flush type to avoid both deadlocks and assertions
      Signed-off-by: NChris Mason <clm@fb.com>
      Signed-off-by: NJosef Bacik <jbacik@fb.com>
      bac357dc