<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/fs/btrfs/inode-map.c, branch 4.4-additional</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=4.4-additional</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=4.4-additional'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-06-30T21:36:46+00:00</updated>
<entry>
<title>Btrfs: fix race between caching kthread and returning inode to inode cache</title>
<updated>2015-06-30T21:36:46+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2015-06-13T05:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ae9d8f17118551bedd797406a6768b87c2146234'/>
<id>urn:sha1:ae9d8f17118551bedd797406a6768b87c2146234</id>
<content type='text'>
While the inode cache caching kthread is calling btrfs_unpin_free_ino(),
we could have a concurrent call to btrfs_return_ino() that adds a new
entry to the root's free space cache of pinned inodes. This concurrent
call does not acquire the fs_info-&gt;commit_root_sem before adding a new
entry if the caching state is BTRFS_CACHE_FINISHED, which is a problem
because the caching kthread calls btrfs_unpin_free_ino() after setting
the caching state to BTRFS_CACHE_FINISHED and therefore races with
the task calling btrfs_return_ino(), which is adding a new entry, while
the former (caching kthread) is navigating the cache's rbtree, removing
and freeing nodes from the cache's rbtree without acquiring the spinlock
that protects the rbtree.

This race resulted in memory corruption due to double free of struct
btrfs_free_space objects because both tasks can end up doing freeing the
same objects. Note that adding a new entry can result in merging it with
other entries in the cache, in which case those entries are freed.
This is particularly important as btrfs_free_space structures are also
used for the block group free space caches.

This memory corruption can be detected by a debugging kernel, which
reports it with the following trace:

[132408.501148] slab error in verify_redzone_free(): cache `btrfs_free_space': double free detected
[132408.505075] CPU: 15 PID: 12248 Comm: btrfs-ino-cache Tainted: G        W       4.1.0-rc5-btrfs-next-10+ #1
[132408.505075] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20150316_085822-nilsson.home.kraxel.org 04/01/2014
[132408.505075]  ffff880023e7d320 ffff880163d73cd8 ffffffff8145eec7 ffffffff81095dce
[132408.505075]  ffff880009735d40 ffff880163d73ce8 ffffffff81154e1e ffff880163d73d68
[132408.505075]  ffffffff81155733 ffffffffa054a95a ffff8801b6099f00 ffffffffa0505b5f
[132408.505075] Call Trace:
[132408.505075]  [&lt;ffffffff8145eec7&gt;] dump_stack+0x4f/0x7b
[132408.505075]  [&lt;ffffffff81095dce&gt;] ? console_unlock+0x356/0x3a2
[132408.505075]  [&lt;ffffffff81154e1e&gt;] __slab_error.isra.28+0x25/0x36
[132408.505075]  [&lt;ffffffff81155733&gt;] __cache_free+0xe2/0x4b6
[132408.505075]  [&lt;ffffffffa054a95a&gt;] ? __btrfs_add_free_space+0x2f0/0x343 [btrfs]
[132408.505075]  [&lt;ffffffffa0505b5f&gt;] ? btrfs_unpin_free_ino+0x8e/0x99 [btrfs]
[132408.505075]  [&lt;ffffffff810f3b30&gt;] ? time_hardirqs_off+0x15/0x28
[132408.505075]  [&lt;ffffffff81084d42&gt;] ? trace_hardirqs_off+0xd/0xf
[132408.505075]  [&lt;ffffffff811563a1&gt;] ? kfree+0xb6/0x14e
[132408.505075]  [&lt;ffffffff811563d0&gt;] kfree+0xe5/0x14e
[132408.505075]  [&lt;ffffffffa0505b5f&gt;] btrfs_unpin_free_ino+0x8e/0x99 [btrfs]
[132408.505075]  [&lt;ffffffffa0505e08&gt;] caching_kthread+0x29e/0x2d9 [btrfs]
[132408.505075]  [&lt;ffffffffa0505b6a&gt;] ? btrfs_unpin_free_ino+0x99/0x99 [btrfs]
[132408.505075]  [&lt;ffffffff8106698f&gt;] kthread+0xef/0xf7
[132408.505075]  [&lt;ffffffff810f3b08&gt;] ? time_hardirqs_on+0x15/0x28
[132408.505075]  [&lt;ffffffff810668a0&gt;] ? __kthread_parkme+0xad/0xad
[132408.505075]  [&lt;ffffffff814653d2&gt;] ret_from_fork+0x42/0x70
[132408.505075]  [&lt;ffffffff810668a0&gt;] ? __kthread_parkme+0xad/0xad
[132408.505075] ffff880023e7d320: redzone 1:0x9f911029d74e35b, redzone 2:0x9f911029d74e35b.
[132409.501654] slab: double free detected in cache 'btrfs_free_space', objp ffff880023e7d320
[132409.503355] ------------[ cut here ]------------
[132409.504241] kernel BUG at mm/slab.c:2571!

Therefore fix this by having btrfs_unpin_free_ino() acquire the lock
that protects the rbtree while doing the searches and removing entries.

Fixes: 1c70d8fb4dfa ("Btrfs: fix inode caching vs tree log")
Cc: stable@vger.kernel.org
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: use kmem_cache_free when freeing entry in inode cache</title>
<updated>2015-06-30T21:36:46+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='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c3f4a1685bb87e59c886ee68f7967eae07d4dffa'/>
<id>urn:sha1:c3f4a1685bb87e59c886ee68f7967eae07d4dffa</id>
<content type='text'>
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().

Cc: stable@vger.kernel.org
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;
</content>
</entry>
<entry>
<title>Btrfs: allow block group cache writeout outside critical section in commit</title>
<updated>2015-04-10T21:07:22+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2015-04-06T19:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1bbc621ef28462456131c035eaeb5567a1a2a2fe'/>
<id>urn:sha1:1bbc621ef28462456131c035eaeb5567a1a2a2fe</id>
<content type='text'>
We loop through all of the dirty block groups during commit and write
the free space cache.  In order to make sure the cache is currect, we do
this while no other writers are allowed in the commit.

If a large number of block groups are dirty, this can introduce long
stalls during the final stages of the commit, which can block new procs
trying to change the filesystem.

This commit changes the block group cache writeout to take appropriate
locks and allow it to run earlier in the commit.  We'll still have to
redo some of the block groups, but it means we can get most of the work
out of the way without blocking the entire FS.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix race between writing free space cache and trimming</title>
<updated>2014-12-03T02:35:09+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2014-12-01T17:04:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=55507ce3612365a5173dfb080a4baf45d1ef8cd1'/>
<id>urn:sha1:55507ce3612365a5173dfb080a4baf45d1ef8cd1</id>
<content type='text'>
Trimming is completely transactionless, and the way it operates consists
of hiding free space entries from a block group, perform the trim/discard
and then make the free space entries visible again.
Therefore while a free space entry is being trimmed, we can have free space
cache writing running in parallel (as part of a transaction commit) which
will miss the free space entry. This means that an unmount (or crash/reboot)
after that transaction commit and mount again before another transaction
starts/commits after the discard finishes, we will have some free space
that won't be used again unless the free space cache is rebuilt. After the
unmount, fsck (btrfsck, btrfs check) reports the issue like the following
example:

        *** fsck.btrfs output ***
        checking extents
        checking free space cache
        There is no free space entry for 521764864-521781248
        There is no free space entry for 521764864-1103101952
        cache appears valid but isnt 29360128
        Checking filesystem on /dev/sdc
        UUID: b4789e27-4774-4626-98e9-ae8dfbfb0fb5
        found 1235681286 bytes used err is -22
        (...)

Another issue caused by this race is a crash while writing bitmap entries
to the cache, because while the cache writeout task accesses the bitmaps,
the trim task can be concurrently modifying the bitmap or worse might
be freeing the bitmap. The later case results in the following crash:

[55650.804460] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
[55650.804835] Modules linked in: btrfs dm_flakey dm_mod crc32c_generic xor raid6_pq nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc loop parport_pc parport i2c_piix4 psmouse evdev pcspkr microcode processor i2ccore serio_raw thermal_sys button ext4 crc16 jbd2 mbcache sg sd_mod crc_t10dif sr_mod cdrom crct10dif_generic crct10dif_common ata_generic virtio_scsi floppy ata_piix libata virtio_pci virtio_ring virtio scsi_mod e1000 [last unloaded: btrfs]
[55650.806169] CPU: 1 PID: 31002 Comm: btrfs-transacti Tainted: G        W      3.17.0-rc5-btrfs-next-1+ #1
[55650.806493] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014
[55650.806867] task: ffff8800b12f6410 ti: ffff880071538000 task.ti: ffff880071538000
[55650.807166] RIP: 0010:[&lt;ffffffffa037cf45&gt;]  [&lt;ffffffffa037cf45&gt;] write_bitmap_entries+0x65/0xbb [btrfs]
[55650.807514] RSP: 0018:ffff88007153bc30  EFLAGS: 00010246
[55650.807687] RAX: 000000005d1ec000 RBX: ffff8800a665df08 RCX: 0000000000000400
[55650.807885] RDX: ffff88005d1ec000 RSI: 6b6b6b6b6b6b6b6b RDI: ffff88005d1ec000
[55650.808017] RBP: ffff88007153bc58 R08: 00000000ddd51536 R09: 00000000000001e0
[55650.808017] R10: 0000000000000000 R11: 0000000000000037 R12: 6b6b6b6b6b6b6b6b
[55650.808017] R13: ffff88007153bca8 R14: 6b6b6b6b6b6b6b6b R15: ffff88007153bc98
[55650.808017] FS:  0000000000000000(0000) GS:ffff88023ec80000(0000) knlGS:0000000000000000
[55650.808017] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[55650.808017] CR2: 0000000002273b88 CR3: 00000000b18f6000 CR4: 00000000000006e0
[55650.808017] Stack:
[55650.808017]  ffff88020e834e00 ffff880172d68db0 0000000000000000 ffff88019257c800
[55650.808017]  ffff8801d42ea720 ffff88007153bd10 ffffffffa037d2fa ffff880224e99180
[55650.808017]  ffff8801469a6188 ffff880224e99140 ffff880172d68c50 00000003000000b7
[55650.808017] Call Trace:
[55650.808017]  [&lt;ffffffffa037d2fa&gt;] __btrfs_write_out_cache+0x1ea/0x37f [btrfs]
[55650.808017]  [&lt;ffffffffa037d959&gt;] btrfs_write_out_cache+0xa1/0xd8 [btrfs]
[55650.808017]  [&lt;ffffffffa033936b&gt;] btrfs_write_dirty_block_groups+0x4b5/0x505 [btrfs]
[55650.808017]  [&lt;ffffffffa03aa98e&gt;] commit_cowonly_roots+0x15e/0x1f7 [btrfs]
[55650.808017]  [&lt;ffffffff813eb9c7&gt;] ? _raw_spin_lock+0xe/0x10
[55650.808017]  [&lt;ffffffffa0346e46&gt;] btrfs_commit_transaction+0x411/0x882 [btrfs]
[55650.808017]  [&lt;ffffffffa03432a4&gt;] transaction_kthread+0xf2/0x1a4 [btrfs]
[55650.808017]  [&lt;ffffffffa03431b2&gt;] ? btrfs_cleanup_transaction+0x3d8/0x3d8 [btrfs]
[55650.808017]  [&lt;ffffffff8105966b&gt;] kthread+0xb7/0xbf
[55650.808017]  [&lt;ffffffff810595b4&gt;] ? __kthread_parkme+0x67/0x67
[55650.808017]  [&lt;ffffffff813ebeac&gt;] ret_from_fork+0x7c/0xb0
[55650.808017]  [&lt;ffffffff810595b4&gt;] ? __kthread_parkme+0x67/0x67
[55650.808017] Code: 4c 89 ef 8d 70 ff e8 d4 fc ff ff 41 8b 45 34 41 39 45 30 7d 5c 31 f6 4c 89 ef e8 80 f6 ff ff 49 8b 7d 00 4c 89 f6 b9 00 04 00 00 &lt;f3&gt; a5 4c 89 ef 41 8b 45 30 8d 70 ff e8 a3 fc ff ff 41 8b 45 34
[55650.808017] RIP  [&lt;ffffffffa037cf45&gt;] write_bitmap_entries+0x65/0xbb [btrfs]
[55650.808017]  RSP &lt;ffff88007153bc30&gt;
[55650.815725] ---[ end trace 1c032e96b149ff86 ]---

Fix this by serializing both tasks in such a way that cache writeout
doesn't wait for the trim/discard of free space entries to finish and
doesn't miss any free space entry.

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: switch inode_cache option handling to pending changes</title>
<updated>2014-11-12T15:53:13+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-02-05T14:26:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7e1876aca815029d5c3023a66a91e249eca3e533'/>
<id>urn:sha1:7e1876aca815029d5c3023a66a91e249eca3e533</id>
<content type='text'>
The pending mount option(s) now share namespace and bits with the normal
options, and the existing one for (inode_cache) is unset unconditionally
at each transaction commit.

Introduce a separate namespace for pending changes and enhance the
descriptions of the intended change to use separate bits for each
action.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>btrfs: cleanup ino cache members of btrfs_root</title>
<updated>2014-09-17T20:37:09+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-02-05T01:37:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=57cdc8db21bf9cfa6b2e45310d56e74e263e8609'/>
<id>urn:sha1:57cdc8db21bf9cfa6b2e45310d56e74e263e8609</id>
<content type='text'>
The naming is confusing, generic yet used for a specific cache. Add a
prefix 'ino_' or rename appropriately.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: remove newline from inode cache kthread name</title>
<updated>2014-06-10T00:20:53+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-05-16T13:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=67a77eb147a36fdc346f1b9ff84649209d51f1da'/>
<id>urn:sha1:67a77eb147a36fdc346f1b9ff84649209d51f1da</id>
<content type='text'>
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix inode caching vs tree log</title>
<updated>2014-04-24T23:43:33+00:00</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2014-04-23T11:33:36+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1c70d8fb4dfa95bee491816b2a6767b5ca1080e7'/>
<id>urn:sha1:1c70d8fb4dfa95bee491816b2a6767b5ca1080e7</id>
<content type='text'>
Currently, with inode cache enabled, we will reuse its inode id immediately
after unlinking file, we may hit something like following:

|-&gt;iput inode
|-&gt;return inode id into inode cache
|-&gt;create dir,fsync
|-&gt;power off

An easy way to reproduce this problem is:

mkfs.btrfs -f /dev/sdb
mount /dev/sdb /mnt -o inode_cache,commit=100
dd if=/dev/zero of=/mnt/data bs=1M count=10 oflag=sync
inode_id=`ls -i /mnt/data | awk '{print $1}'`
rm -f /mnt/data

i=1
while [ 1 ]
do
        mkdir /mnt/dir_$i
        test1=`stat /mnt/dir_$i | grep Inode: | awk '{print $4}'`
        if [ $test1 -eq $inode_id ]
        then
		dd if=/dev/zero of=/mnt/dir_$i/data bs=1M count=1 oflag=sync
		echo b &gt; /proc/sysrq-trigger
	fi
	sleep 1
        i=$(($i+1))
done

mount /dev/sdb /mnt
umount /dev/sdb
btrfs check /dev/sdb

We fix this problem by adding unlinked inode's id into pinned tree,
and we can not reuse them until committing transaction.

Cc: stable@vger.kernel.org
Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: avoid triggering bug_on() when we fail to start inode caching task</title>
<updated>2014-04-24T23:43:32+00:00</updated>
<author>
<name>Wang Shilong</name>
<email>wangsl.fnst@cn.fujitsu.com</email>
</author>
<published>2014-04-23T11:33:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e60efa84252c059bde5f65fccc6af94478d39e3b'/>
<id>urn:sha1:e60efa84252c059bde5f65fccc6af94478d39e3b</id>
<content type='text'>
When running stress test(including snapshots,balance,fstress), we trigger
the following BUG_ON() which is because we fail to start inode caching task.

[  181.131945] kernel BUG at fs/btrfs/inode-map.c:179!
[  181.137963] invalid opcode: 0000 [#1] SMP
[  181.217096] CPU: 11 PID: 2532 Comm: btrfs Not tainted 3.14.0 #1
[  181.240521] task: ffff88013b621b30 ti: ffff8800b6ada000 task.ti: ffff8800b6ada000
[  181.367506] Call Trace:
[  181.371107]  [&lt;ffffffffa036c1be&gt;] btrfs_return_ino+0x9e/0x110 [btrfs]
[  181.379191]  [&lt;ffffffffa038082b&gt;] btrfs_evict_inode+0x46b/0x4c0 [btrfs]
[  181.387464]  [&lt;ffffffff810b5a70&gt;] ? autoremove_wake_function+0x40/0x40
[  181.395642]  [&lt;ffffffff811dc5fe&gt;] evict+0x9e/0x190
[  181.401882]  [&lt;ffffffff811dcde3&gt;] iput+0xf3/0x180
[  181.408025]  [&lt;ffffffffa03812de&gt;] btrfs_orphan_cleanup+0x1ee/0x430 [btrfs]
[  181.416614]  [&lt;ffffffffa03a6abd&gt;] btrfs_mksubvol.isra.29+0x3bd/0x450 [btrfs]
[  181.425399]  [&lt;ffffffffa03a6cd6&gt;] btrfs_ioctl_snap_create_transid+0x186/0x190 [btrfs]
[  181.435059]  [&lt;ffffffffa03a6e3b&gt;] btrfs_ioctl_snap_create_v2+0xeb/0x130 [btrfs]
[  181.444148]  [&lt;ffffffffa03a9656&gt;] btrfs_ioctl+0xf76/0x2b90 [btrfs]
[  181.451971]  [&lt;ffffffff8117e565&gt;] ? handle_mm_fault+0x475/0xe80
[  181.459509]  [&lt;ffffffff8167ba0c&gt;] ? __do_page_fault+0x1ec/0x520
[  181.467046]  [&lt;ffffffff81185b35&gt;] ? do_mmap_pgoff+0x2f5/0x3c0
[  181.474393]  [&lt;ffffffff811d4da8&gt;] do_vfs_ioctl+0x2d8/0x4b0
[  181.481450]  [&lt;ffffffff811d5001&gt;] SyS_ioctl+0x81/0xa0
[  181.488021]  [&lt;ffffffff81680b69&gt;] system_call_fastpath+0x16/0x1b

We should avoid triggering BUG_ON() here, instead, we output warning messages
and clear inode_cache option.

Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: remove transaction from send</title>
<updated>2014-04-07T00:39:30+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fb.com</email>
</author>
<published>2014-03-13T19:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9e351cc862b098d8ec8f8022d110932490794925'/>
<id>urn:sha1:9e351cc862b098d8ec8f8022d110932490794925</id>
<content type='text'>
Lets try this again.  We can deadlock the box if we send on a box and try to
write onto the same fs with the app that is trying to listen to the send pipe.
This is because the writer could get stuck waiting for a transaction commit
which is being blocked by the send.  So fix this by making sure looking at the
commit roots is always going to be consistent.  We do this by keeping track of
which roots need to have their commit roots swapped during commit, and then
taking the commit_root_sem and swapping them all at once.  Then make sure we
take a read lock on the commit_root_sem in cases where we search the commit root
to make sure we're always looking at a consistent view of the commit roots.
Previously we had problems with this because we would swap a fs tree commit root
and then swap the extent tree commit root independently which would cause the
backref walking code to screw up sometimes.  With this patch we no longer
deadlock and pass all the weird send/receive corner cases.  Thanks,

Reportedy-by: Hugo Mills &lt;hugo@carfax.org.uk&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
</feed>
