<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/btrfs/inode-map.c, branch linux-3.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2016-03-21T01:17:39+00:00</updated>
<entry>
<title>Btrfs: use kmem_cache_free when freeing entry in inode cache</title>
<updated>2016-03-21T01:17:39+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2015-06-13T05:52:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=38464cd9b38b43ef757da18bc8b9badcd2b70dfb'/>
<id>urn:sha1:38464cd9b38b43ef757da18bc8b9badcd2b70dfb</id>
<content type='text'>
commit c3f4a1685bb87e59c886ee68f7967eae07d4dffa upstream.

The free space entries are allocated using kmem_cache_zalloc(),
through __btrfs_add_free_space(), therefore we should use
kmem_cache_free() and not kfree() to avoid any confusion and
any potential problem. Looking at the kfree() definition at
mm/slab.c it has the following comment:

  /*
   * (...)
   *
   * Don't free memory not originally allocated by kmalloc()
   * or you will run into trouble.
   */

So better be safe and use kmem_cache_free().

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: show useful info in space reservation tracepoint</title>
<updated>2012-03-29T13:57:44+00:00</updated>
<author>
<name>Liu Bo</name>
<email>liubo2009@cn.fujitsu.com</email>
</author>
<published>2012-03-29T13:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2bcc0328c3a043880796a602c75fbeb1537aa1e1'/>
<id>urn:sha1:2bcc0328c3a043880796a602c75fbeb1537aa1e1</id>
<content type='text'>
o For space info, the type of space info is useful for debug.
o For transaction handle, its transid is useful.

Signed-off-by: Liu Bo &lt;liubo2009@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>btrfs: replace many BUG_ONs with proper error handling</title>
<updated>2012-03-22T10:52:54+00:00</updated>
<author>
<name>Jeff Mahoney</name>
<email>jeffm@suse.com</email>
</author>
<published>2012-03-12T15:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=79787eaab46121d4713ed03c8fc63b9ec3eaec76'/>
<id>urn:sha1:79787eaab46121d4713ed03c8fc63b9ec3eaec76</id>
<content type='text'>
 btrfs currently handles most errors with BUG_ON. This patch is a work-in-
 progress but aims to handle most errors other than internal logic
 errors and ENOMEM more gracefully.

 This iteration prevents most crashes but can run into lockups with
 the page lock on occasion when the timing "works out."

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix compiler warnings on 32 bit systems</title>
<updated>2012-02-24T15:39:05+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2012-02-24T15:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e77266e4c4be6f9dc91bf688bce015a8babd5fe0'/>
<id>urn:sha1:e77266e4c4be6f9dc91bf688bce015a8babd5fe0</id>
<content type='text'>
The enospc tracing code added some interesting uses of
u64 pointer casts.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: space leak tracepoints</title>
<updated>2012-01-16T20:29:43+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2012-01-10T15:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8c2a3ca20f6233677ac3222c6506174010eb414f'/>
<id>urn:sha1:8c2a3ca20f6233677ac3222c6506174010eb414f</id>
<content type='text'>
This in addition to a script in my btrfs-tracing tree will help track down space
leaks when we're getting space left over in block groups on umount.  Thanks,

Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix no reserved space for writing out inode cache</title>
<updated>2011-11-11T01:45:04+00:00</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2011-11-11T01:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ba38eb4de354d228f2792f93cde2c748a3a3f3b2'/>
<id>urn:sha1:ba38eb4de354d228f2792f93cde2c748a3a3f3b2</id>
<content type='text'>
I-node cache forgets to reserve the space when writing out it. And when
we do some stress test, such as synctest, it will trigger WARN_ON() in
use_block_rsv().

WARNING: at fs/btrfs/extent-tree.c:5718 btrfs_alloc_free_block+0xbf/0x281 [btrfs]()
...
Call Trace:
 [&lt;ffffffff8104df86&gt;] warn_slowpath_common+0x80/0x98
 [&lt;ffffffff8104dfb3&gt;] warn_slowpath_null+0x15/0x17
 [&lt;ffffffffa0369c60&gt;] btrfs_alloc_free_block+0xbf/0x281 [btrfs]
 [&lt;ffffffff810cbcb8&gt;] ? __set_page_dirty_nobuffers+0xfe/0x108
 [&lt;ffffffffa035c040&gt;] __btrfs_cow_block+0x118/0x3b5 [btrfs]
 [&lt;ffffffffa035c7ba&gt;] btrfs_cow_block+0x103/0x14e [btrfs]
 [&lt;ffffffffa035e4c4&gt;] btrfs_search_slot+0x249/0x6a4 [btrfs]
 [&lt;ffffffffa036d086&gt;] btrfs_lookup_inode+0x2a/0x8a [btrfs]
 [&lt;ffffffffa03788b7&gt;] btrfs_update_inode+0xaa/0x141 [btrfs]
 [&lt;ffffffffa036d7ec&gt;] btrfs_save_ino_cache+0xea/0x202 [btrfs]
 [&lt;ffffffffa03a761e&gt;] ? btrfs_update_reloc_root+0x17e/0x197 [btrfs]
 [&lt;ffffffffa0373867&gt;] commit_fs_roots+0xaa/0x158 [btrfs]
 [&lt;ffffffffa03746a6&gt;] btrfs_commit_transaction+0x405/0x731 [btrfs]
 [&lt;ffffffff810690df&gt;] ? wake_up_bit+0x25/0x25
 [&lt;ffffffffa039d652&gt;] ? btrfs_log_dentry_safe+0x43/0x51 [btrfs]
 [&lt;ffffffffa0381c5f&gt;] btrfs_sync_file+0x16a/0x198 [btrfs]
 [&lt;ffffffff81122806&gt;] ? mntput+0x21/0x23
 [&lt;ffffffff8112d150&gt;] vfs_fsync_range+0x18/0x21
 [&lt;ffffffff8112d170&gt;] vfs_fsync+0x17/0x19
 [&lt;ffffffff8112d316&gt;] do_fsync+0x29/0x3e
 [&lt;ffffffff8112d348&gt;] sys_fsync+0xb/0xf
 [&lt;ffffffff81468352&gt;] system_call_fastpath+0x16/0x1b

Sometimes it causes BUG_ON() in the reservation code of the delayed inode
is triggered.

So we must reserve enough space for inode cache.

Note: If we can not reserve the enough space for inode cache, we will
give up writing out it.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: handle enospc accounting for free space inodes</title>
<updated>2011-10-19T19:12:42+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2011-08-30T14:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c09544e07f8cdc455ed8615d4c067d694c33bd18'/>
<id>urn:sha1:c09544e07f8cdc455ed8615d4c067d694c33bd18</id>
<content type='text'>
Since free space inodes now use normal checksumming we need to make sure to
account for their metadata use.  So reserve metadata space, and then if we fail
to write out the metadata we can just release it, otherwise it will be freed up
when the io completes.  Thanks,

Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
</content>
</entry>
<entry>
<title>btrfs: add helper for fs_info-&gt;closing</title>
<updated>2011-06-04T12:11:22+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2011-05-31T16:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7841cb2898f66a73062c64d0ef5733dde7279e46'/>
<id>urn:sha1:7841cb2898f66a73062c64d0ef5733dde7279e46</id>
<content type='text'>
wrap checking of filesystem 'closing' flag and fix a few missing memory
barriers.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>Btrfs: add mount -o inode_cache</title>
<updated>2011-06-04T12:03:47+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2011-06-03T13:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4b9465cb9e3859186eefa1ca3b990a5849386320'/>
<id>urn:sha1:4b9465cb9e3859186eefa1ca3b990a5849386320</id>
<content type='text'>
This makes the inode map cache default to off until we
fix the overflow problem when the free space crcs don't fit
inside a single page.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: don't save the inode cache if we are deleting this root</title>
<updated>2011-06-04T12:03:45+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2011-05-31T19:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d132a538d258f8f52fd0cd8b5017755f4e915386'/>
<id>urn:sha1:d132a538d258f8f52fd0cd8b5017755f4e915386</id>
<content type='text'>
With xfstest 254 I can panic the box every time with the inode number caching
stuff on.  This is because we clean the inodes out when we delete the subvolume,
but then we write out the inode cache which adds an inode to the subvolume inode
tree, and then when it gets evicted again the root gets added back on the dead
roots list and is deleted again, so we have a double free.  To stop this from
happening just return 0 if refs is 0 (and we're not the tree root since tree
root always has refs of 0).  With this fix 254 no longer panics.  Thanks,

Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
Tested-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
</feed>
