1. 29 1月, 2014 1 次提交
  2. 12 11月, 2013 3 次提交
    • D
      btrfs: Use WARN_ON()'s return value in place of WARN_ON(1) · fae7f21c
      Dulshani Gunawardhana 提交于
      Use WARN_ON()'s return value in place of WARN_ON(1) for cleaner source
      code that outputs a more descriptive warnings. Also fix the styling
      warning of redundant braces that came up as a result of this fix.
      Signed-off-by: NDulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
      Reviewed-by: NZach Brown <zab@redhat.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      fae7f21c
    • L
      Btrfs: fix a crash when running balance and defrag concurrently · 48ec4736
      Liu Bo 提交于
      Running balance and defrag concurrently can end up with a crash:
      
      kernel BUG at fs/btrfs/relocation.c:4528!
      RIP: 0010:[<ffffffffa01ac33b>]  [<ffffffffa01ac33b>] btrfs_reloc_cow_block+ 0x1eb/0x230 [btrfs]
      Call Trace:
        [<ffffffffa01398c1>] ? update_ref_for_cow+0x241/0x380 [btrfs]
        [<ffffffffa0180bad>] ? copy_extent_buffer+0xad/0x110 [btrfs]
        [<ffffffffa0139da1>] __btrfs_cow_block+0x3a1/0x520 [btrfs]
        [<ffffffffa013a0b6>] btrfs_cow_block+0x116/0x1b0 [btrfs]
        [<ffffffffa013ddad>] btrfs_search_slot+0x43d/0x970 [btrfs]
        [<ffffffffa0153c57>] btrfs_lookup_file_extent+0x37/0x40 [btrfs]
        [<ffffffffa0172a5e>] __btrfs_drop_extents+0x11e/0xae0 [btrfs]
        [<ffffffffa013b3fd>] ? generic_bin_search.constprop.39+0x8d/0x1a0 [btrfs]
        [<ffffffff8117d14a>] ? kmem_cache_alloc+0x1da/0x200
        [<ffffffffa0138e7a>] ? btrfs_alloc_path+0x1a/0x20 [btrfs]
        [<ffffffffa0173ef0>] btrfs_drop_extents+0x60/0x90 [btrfs]
        [<ffffffffa016b24d>] relink_extent_backref+0x2ed/0x780 [btrfs]
        [<ffffffffa0162fe0>] ? btrfs_submit_bio_hook+0x1e0/0x1e0 [btrfs]
        [<ffffffffa01b8ed7>] ? iterate_inodes_from_logical+0x87/0xa0 [btrfs]
        [<ffffffffa016b909>] btrfs_finish_ordered_io+0x229/0xac0 [btrfs]
        [<ffffffffa016c3b5>] finish_ordered_fn+0x15/0x20 [btrfs]
        [<ffffffffa018cbe5>] worker_loop+0x125/0x4e0 [btrfs]
        [<ffffffffa018cac0>] ? btrfs_queue_worker+0x300/0x300 [btrfs]
        [<ffffffff81075ea0>] kthread+0xc0/0xd0
        [<ffffffff81075de0>] ? insert_kthread_work+0x40/0x40
        [<ffffffff8164796c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81075de0>] ? insert_kthread_work+0x40/0x40
      ----------------------------------------------------------------------
      
      It turns out to be that balance operation will bump root's @last_snapshot,
      which enables snapshot-aware defrag path, and backref walking stuff will
      find data reloc tree as refs' parent, and hit the BUG_ON() during COW.
      
      As data reloc tree's data is just for relocation purpose, and will be deleted right
      after relocation is done, it's unnecessary to walk those refs belonged to data reloc
      tree, it'd be better to skip them.
      Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      48ec4736
    • R
      btrfs: drop unused parameter from btrfs_item_nr · dd3cc16b
      Ross Kirk 提交于
      Remove unused eb parameter from btrfs_item_nr
      Signed-off-by: NRoss Kirk <ross.kirk@gmail.com>
      Reviewed-by: NDavid Sterba <dsterba@suse.cz>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      dd3cc16b
  3. 01 9月, 2013 6 次提交
  4. 10 8月, 2013 2 次提交
    • J
      Btrfs: make sure the backref walker catches all refs to our extent · ed8c4913
      Josef Bacik 提交于
      Because we don't mess with the offset into the extent for compressed we will
      properly find both extents for this case
      
      [extent a][extent b][rest of extent a]
      
      but because we already added a ref for the front half we won't add the inode
      information for the second half.  This causes us to leak that memory and not
      print out the other offset when we do logical-resolve.  So fix this by calling
      ulist_add_merge and then add our eie to the existing entry if there is one.
      With this patch we get both offsets out of logical-resolve.  With this and the
      other 2 patches I've sent we now pass btrfs/276 on my vm with compress-force=lzo
      set.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      ed8c4913
    • J
      Btrfs: fix backref walking when we hit a compressed extent · 8ca15e05
      Josef Bacik 提交于
      If you do btrfs inspect-internal logical-resolve on a compressed extent that has
      been partly overwritten it won't find anything.  This is because we try and
      match the extent offset we've searched for based on the extent offset in the
      data extent entry.  However this doesn't work for compressed extents because the
      offsets are for the uncompressed size, not the compressed size.  So instead only
      do this check if we are not compressed, that way we can get an actual entry for
      the physical offset rather than nothing for compressed.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      8ca15e05
  5. 02 7月, 2013 1 次提交
  6. 01 7月, 2013 1 次提交
    • J
      Btrfs: cleanup backref search commit root flag stuff · da61d31a
      Josef Bacik 提交于
      Looking into this backref problem I noticed we're using a macro to what turns
      out to essentially be a NULL check to see if we need to search the commit root.
      I'm killing this, let's just do what everybody else does and checks if trans ==
      NULL.  I've also made it so we pass in the path to __resolve_indirect_refs which
      will have the search_commit_root flag set properly already and that way we can
      avoid allocating another path when we have a perfectly good one to use.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      da61d31a
  7. 18 5月, 2013 1 次提交
  8. 07 5月, 2013 8 次提交
  9. 27 2月, 2013 1 次提交
  10. 13 12月, 2012 2 次提交
  11. 26 10月, 2012 2 次提交
  12. 24 10月, 2012 1 次提交
  13. 09 10月, 2012 2 次提交
    • M
      btrfs: extended inode ref iteration · d24bec3a
      Mark Fasheh 提交于
      The iterate_irefs in backref.c is used to build path components from inode
      refs. This patch adds code to iterate extended refs as well.
      
      I had modify the callback function signature to abstract out some of the
      differences between ref structures. iref_to_path() also needed similar
      changes.
      Signed-off-by: NMark Fasheh <mfasheh@suse.de>
      d24bec3a
    • M
      btrfs: extended inode refs · f186373f
      Mark Fasheh 提交于
      This patch adds basic support for extended inode refs. This includes support
      for link and unlink of the refs, which basically gets us support for rename
      as well.
      
      Inode creation does not need changing - extended refs are only added after
      the ref array is full.
      Signed-off-by: NMark Fasheh <mfasheh@suse.de>
      f186373f
  14. 02 10月, 2012 4 次提交
  15. 29 8月, 2012 1 次提交
  16. 26 7月, 2012 1 次提交
  17. 10 7月, 2012 1 次提交
  18. 27 6月, 2012 2 次提交