1. 18 2月, 2016 1 次提交
    • K
      btrfs: fix memory leak of fs_info in block group cache · aa66b0bb
      Kinglong Mee 提交于
      When starting up linux with btrfs filesystem, I got many memory leak
      messages by kmemleak as,
      
      unreferenced object 0xffff880066882000 (size 4096):
        comm "modprobe", pid 730, jiffies 4294690024 (age 196.599s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff8174d52e>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff811d09aa>] kmem_cache_alloc_trace+0xea/0x1e0
          [<ffffffffa03620fb>] btrfs_alloc_dummy_fs_info+0x6b/0x2a0 [btrfs]
          [<ffffffffa03624fc>] btrfs_alloc_dummy_block_group+0x5c/0x120 [btrfs]
          [<ffffffffa0360aa9>] btrfs_test_free_space_cache+0x39/0xed0 [btrfs]
          [<ffffffffa03b5a74>] trace_raw_output_xfs_attr_class+0x54/0xe0 [xfs]
          [<ffffffff81002122>] do_one_initcall+0xb2/0x1f0
          [<ffffffff811765aa>] do_init_module+0x5e/0x1e9
          [<ffffffff810fec09>] load_module+0x20a9/0x2690
          [<ffffffff810ff439>] SyS_finit_module+0xb9/0xf0
          [<ffffffff81757daf>] entry_SYSCALL_64_fastpath+0x12/0x76
          [<ffffffffffffffff>] 0xffffffffffffffff
      unreferenced object 0xffff8800573f8000 (size 10256):
        comm "modprobe", pid 730, jiffies 4294690185 (age 196.460s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff8174d52e>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff8119ca6e>] kmalloc_order+0x5e/0x70
          [<ffffffff8119caa4>] kmalloc_order_trace+0x24/0x90
          [<ffffffffa03620b3>] btrfs_alloc_dummy_fs_info+0x23/0x2a0 [btrfs]
          [<ffffffffa03624fc>] btrfs_alloc_dummy_block_group+0x5c/0x120 [btrfs]
          [<ffffffffa036603d>] run_test+0xfd/0x320 [btrfs]
          [<ffffffffa0366f34>] btrfs_test_free_space_tree+0x94/0xee [btrfs]
          [<ffffffffa03b5aab>] trace_raw_output_xfs_attr_class+0x8b/0xe0 [xfs]
          [<ffffffff81002122>] do_one_initcall+0xb2/0x1f0
          [<ffffffff811765aa>] do_init_module+0x5e/0x1e9
          [<ffffffff810fec09>] load_module+0x20a9/0x2690
          [<ffffffff810ff439>] SyS_finit_module+0xb9/0xf0
          [<ffffffff81757daf>] entry_SYSCALL_64_fastpath+0x12/0x76
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      This patch lets btrfs using fs_info stored in btrfs_root for
      block group cache directly without allocating a new one.
      
      Fixes: d0bd4560 ("Btrfs: add fragment=* debug mount option")
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      aa66b0bb
  2. 22 1月, 2016 1 次提交
  3. 18 12月, 2015 1 次提交
  4. 14 6月, 2014 1 次提交
  5. 10 6月, 2014 1 次提交
    • J
      Btrfs: add sanity tests for new qgroup accounting code · faa2dbf0
      Josef Bacik 提交于
      This exercises the various parts of the new qgroup accounting code.  We do some
      basic stuff and do some things with the shared refs to make sure all that code
      works.  I had to add a bunch of infrastructure because I needed to be able to
      insert items into a fake tree without having to do all the hard work myself,
      hopefully this will be usefull in the future.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NChris Mason <clm@fb.com>
      faa2dbf0
  6. 12 11月, 2013 2 次提交
    • J
      Btrfs: add tests for btrfs_get_extent · aaedb55b
      Josef Bacik 提交于
      I'm going to be removing hole extents in the near future so I wanted to make a
      sanity test for btrfs_get_extent to make sure I don't break anything in the
      meantime.  This patch just puts btrfs_get_extent through its paces by giving it
      a completely unreasonable mapping to look at and make sure it is giving us back
      maps that make sense.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      aaedb55b
    • J
      Btrfs: add tests for find_lock_delalloc_range · 294e30fe
      Josef Bacik 提交于
      So both Liu and I made huge messes of find_lock_delalloc_range trying to fix
      stuff, me first by fixing extent size, then him by fixing something I broke and
      then me again telling him to fix it a different way.  So this is obviously a
      candidate for some testing.  This patch adds a pseudo fs so we can allocate fake
      inodes for tests that need an inode or pages.  Then it addes a bunch of tests to
      make sure find_lock_delalloc_range is acting the way it is supposed to.  With
      this patch and all of our previous patches to find_lock_delalloc_range I am sure
      it is working as expected now.  Thanks,
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      294e30fe