<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.8</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.8</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-08T01:06:46Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2013-02-08T01:06:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-08T01:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d19514fade54798106a60059c539501eda31b47'/>
<id>urn:sha1:8d19514fade54798106a60059c539501eda31b47</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "We've got corner cases for updating i_size that ceph was hitting,
  error handling for quotas when we run out of space, a very subtle
  snapshot deletion race, a crash while removing devices, and one
  deadlock between subvolume creation and the sb_internal code (thanks
  lockdep)."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: move d_instantiate outside the transaction during mksubvol
  Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata
  Btrfs: fix possible stale data exposure
  Btrfs: fix missing i_size update
  Btrfs: fix race between snapshot deletion and getting inode
  Btrfs: fix missing release of the space/qgroup reservation in start_transaction()
  Btrfs: fix wrong sync_writers decrement in btrfs_file_aio_write()
  Btrfs: do not merge logged extents if we've removed them from the tree
  btrfs: don't try to notify udev about missing devices
</content>
</entry>
<entry>
<title>Btrfs: move d_instantiate outside the transaction during mksubvol</title>
<updated>2013-02-06T17:11:10Z</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@fusionio.com</email>
</author>
<published>2013-02-06T17:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1a65e24b0bb7dde48cac4a2bf74d5558f9e32ba7'/>
<id>urn:sha1:1a65e24b0bb7dde48cac4a2bf74d5558f9e32ba7</id>
<content type='text'>
Dave Sterba triggered a lockdep complaint about lock ordering
between the sb_internal lock and the cleaner semaphore.

btrfs_lookup_dentry() checks for orphans if we're looking up
the inode for a subvolume, and subvolume creation is triggering
the lookup with a transaction running.

This commit moves the d_instantiate after the transaction closes.

Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata</title>
<updated>2013-02-06T14:24:40Z</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2013-01-28T06:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb6b88d92c6df083dd09a8c471011e3788dfd7c6'/>
<id>urn:sha1:eb6b88d92c6df083dd09a8c471011e3788dfd7c6</id>
<content type='text'>
When btrfs_qgroup_reserve returned a failure, we were missing a counter
operation for BTRFS_I(inode)-&gt;outstanding_extents++, leading to warning
messages about outstanding extents and space_info-&gt;bytes_may_use != 0.
Additionally, the error handling code didn't take into account that we
dropped the inode lock which might require more cleanup.

Luckily, all the cleanup code we need is already there and can be shared
with reserve_metadata_bytes, which is exactly what this patch does.

Reported-by: Lev Vainblat &lt;lev@zadarastorage.com&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git for-chris into for-linus</title>
<updated>2013-02-06T00:24:44Z</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@fusionio.com</email>
</author>
<published>2013-02-06T00:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=24f8ebe9189c91f1b3ecfaadd27ef0cb7c74907f'/>
<id>urn:sha1:24f8ebe9189c91f1b3ecfaadd27ef0cb7c74907f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Btrfs: fix possible stale data exposure</title>
<updated>2013-02-05T21:09:16Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-01-30T19:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59fe4f41976f6331b695ff049296d082cf621823'/>
<id>urn:sha1:59fe4f41976f6331b695ff049296d082cf621823</id>
<content type='text'>
We specifically do not update the disk i_size if there are ordered extents
outstanding for any area between the current disk_i_size and our ordered
extent so that we do not expose stale data.  The problem is the check we
have only checks if the ordered extent starts at or after the current
disk_i_size, which doesn't take into account an ordered extent that starts
before the current disk_i_size and ends past the disk_i_size.  Fix this by
checking if the extent ends past the disk_i_size.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix missing i_size update</title>
<updated>2013-02-05T21:09:14Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-01-30T19:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d1f40202bad12d4c70a2d40a420b30d23a72b1a'/>
<id>urn:sha1:5d1f40202bad12d4c70a2d40a420b30d23a72b1a</id>
<content type='text'>
If we have an ordered extent before the ordered extent we are currently
completing that is after the current disk_i_size we will put our i_size
update into that ordered extent so that we do not expose stale data.  The
problem is that if our disk i_size is updated past the previous ordered
extent we won't update the i_size with the pending i_size update.  So check
the pending i_size update and if its above the current disk i_size we need
to go ahead and try to update.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix race between snapshot deletion and getting inode</title>
<updated>2013-02-05T21:09:13Z</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2013-01-29T03:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f1c36055f96e80031c7fdda3fd5be826b8d7782'/>
<id>urn:sha1:6f1c36055f96e80031c7fdda3fd5be826b8d7782</id>
<content type='text'>
While running snapshot testscript created by Mitch and David,
the race between autodefrag and snapshot deletion can lead to
corruption of dead_root list so that we can get crash on
btrfs_clean_old_snapshots().

And besides autodefrag, scrub also does the same thing, ie. read
root first and get inode.

Here is the story(take autodefrag as an example):
(1) when we delete a snapshot or subvolume, it will set its root's
refs to zero and do a iput() on its own inode, and if this inode happens
to be the only active in-meory one in root's inode rbtree, it will add
itself to the global dead_roots list for later cleanup.

(2) after (1), the autodefrag thread may read another inode for defrag
and the inode is just in the deleted snapshot/subvolume, but all of these
are without checking if the root is still valid(refs &gt; 0).  So the end up
result is adding the deleted snapshot/subvolume's root to the global
dead_roots list AGAIN.

Fortunately, we already have a srcu lock to avoid the race, ie. subvol_srcu.

So all we need to do is to take the lock to protect 'read root and get inode',
since we synchronize to wait for the rcu grace period before adding something
to the global dead_roots list.

Reported-by: Mitch Harder &lt;mitch.harder@sabayonlinux.org&gt;
Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix missing release of the space/qgroup reservation in start_transaction()</title>
<updated>2013-02-05T21:09:11Z</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2013-01-28T12:36:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=843fcf35733164076a77ad833c72c32da8228ad0'/>
<id>urn:sha1:843fcf35733164076a77ad833c72c32da8228ad0</id>
<content type='text'>
When we fail to start a transaction, we need to release the reserved free space
and qgroup space, fix it.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix wrong sync_writers decrement in btrfs_file_aio_write()</title>
<updated>2013-02-05T21:09:10Z</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2013-01-28T12:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a3404dcff29a7589e8d6ce8c36f97c5411f85b4'/>
<id>urn:sha1:0a3404dcff29a7589e8d6ce8c36f97c5411f85b4</id>
<content type='text'>
If the checks at the beginning of btrfs_file_aio_write() fail, we needn't
decrease -&gt;sync_writers, because we have not increased it. Fix it.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: do not merge logged extents if we've removed them from the tree</title>
<updated>2013-02-05T21:09:03Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-01-28T14:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=222c81dc3874b4fe98371be665d0447a36447653'/>
<id>urn:sha1:222c81dc3874b4fe98371be665d0447a36447653</id>
<content type='text'>
You can run into this problem where if somebody is fsyncing and writing out
the existing extents you will have removed the extent map from the em tree,
but it's still valid for the current fsync so we go ahead and write it.  The
problem is we unconditionally try to merge it back into the em tree, but if
we've removed it from the em tree that will cause use after free problems.
Fix this to only merge if we are still a part of the tree.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
</content>
</entry>
</feed>
