<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/btrfs/backref.c, branch linux-3.3.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Btrfs: fix regression in scrub path resolving</title>
<updated>2012-04-22T22:38:53+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-03-23T16:32:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1048aff3edf4969a6b215503e22ee667de386a83'/>
<id>1048aff3edf4969a6b215503e22ee667de386a83</id>
<content type='text'>
commit 7a3ae2f8c8c8432e65467b7fc84d5deab04061a0 upstream.

In commit 4692cf58 we introduced new backref walking code for btrfs. This
assumes we're searching live roots, which requires a transaction context.
While scrubbing, however, we must not join a transaction because this could
deadlock with the commit path. Additionally, what scrub really wants to do
is resolving a logical address in the commit root it's currently checking.

This patch adds support for logical to path resolving on commit roots and
makes scrub use that.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7a3ae2f8c8c8432e65467b7fc84d5deab04061a0 upstream.

In commit 4692cf58 we introduced new backref walking code for btrfs. This
assumes we're searching live roots, which requires a transaction context.
While scrubbing, however, we must not join a transaction because this could
deadlock with the commit path. Additionally, what scrub really wants to do
is resolving a logical address in the commit root it's currently checking.

This patch adds support for logical to path resolving on commit roots and
makes scrub use that.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: fix locking issues in find_parent_nodes()</title>
<updated>2012-03-03T12:41:15+00:00</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2012-03-03T12:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d3b010640e5c59b98d3b11229ba4cc2838dc7cbf'/>
<id>d3b010640e5c59b98d3b11229ba4cc2838dc7cbf</id>
<content type='text'>
- We might unlock head-&gt;mutex while it was not locked
- We might leave the function without unlocking delayed_refs-&gt;lock

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- We might unlock head-&gt;mutex while it was not locked
- We might leave the function without unlocking delayed_refs-&gt;lock

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: avoid positive number with ERR_PTR</title>
<updated>2012-02-15T15:40:23+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-02-08T15:01:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8f24b49688281a77e8331894ed407f0cfe732303'/>
<id>8f24b49688281a77e8331894ed407f0cfe732303</id>
<content type='text'>
inode_ref_info() returns 1 when the element wasn't found and &lt; 0 on error,
just like btrfs_search_slot(). In iref_to_path() it's an error when the
inode ref can't be found, thus we return ERR_PTR(ret) in that case. In order
to avoid ERR_PTR(1), we now set ret to -ENOENT in that case.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inode_ref_info() returns 1 when the element wasn't found and &lt; 0 on error,
just like btrfs_search_slot(). In iref_to_path() it's an error when the
inode ref can't be found, thus we return ERR_PTR(ret) in that case. In order
to avoid ERR_PTR(1), we now set ret to -ENOENT in that case.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix uninit warning in backref.c</title>
<updated>2012-01-26T20:01:11+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-01-26T20:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b1375d64c539c5b76794be759b62d3f178e67c32'/>
<id>b1375d64c539c5b76794be759b62d3f178e67c32</id>
<content type='text'>
Added initialization with the declaration of ret. It isn't set later on the
switch-default branch (which should never be taken).

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added initialization with the declaration of ret. It isn't set later on the
switch-default branch (which should never be taken).

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: new backref walking code</title>
<updated>2012-01-05T09:49:43+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2011-12-02T13:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4692cf58aa7b81f721c1653d48db99ea41421d58'/>
<id>4692cf58aa7b81f721c1653d48db99ea41421d58</id>
<content type='text'>
The old backref iteration code could only safely be used on commit roots.
Besides this limitation, it had bugs in finding the roots for these
references. This commit replaces large parts of it by btrfs_find_all_roots()
which a) really finds all roots and the correct roots, b) works correctly
under heavy file system load, c) considers delayed refs.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old backref iteration code could only safely be used on commit roots.
Besides this limitation, it had bugs in finding the roots for these
references. This commit replaces large parts of it by btrfs_find_all_roots()
which a) really finds all roots and the correct roots, b) works correctly
under heavy file system load, c) considers delayed refs.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: added btrfs_find_all_roots()</title>
<updated>2012-01-04T15:26:38+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2011-11-23T17:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8da6d5815c592b713ecaf4f4f8b631f8359c96c4'/>
<id>8da6d5815c592b713ecaf4f4f8b631f8359c96c4</id>
<content type='text'>
This function gets a byte number (a data extent), collects all the leafs
pointing to it and walks up the trees to find all fs roots pointing to those
leafs. It also returns the list of all leafs pointing to that extent.

It does proper locking for the involved trees, can be used on busy file
systems and honors delayed refs.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function gets a byte number (a data extent), collects all the leafs
pointing to it and walks up the trees to find all fs roots pointing to those
leafs. It also returns the list of all leafs pointing to that extent.

It does proper locking for the involved trees, can be used on busy file
systems and honors delayed refs.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: Fix up 32/64-bit compatibility for new ioctls</title>
<updated>2011-11-20T12:42:13+00:00</updated>
<author>
<name>Jeff Mahoney</name>
<email>jeffm@suse.com</email>
</author>
<published>2011-11-20T12:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=745c4d8e160afaf6c75e887c27ea4b75c8142b26'/>
<id>745c4d8e160afaf6c75e887c27ea4b75c8142b26</id>
<content type='text'>
 This patch casts to unsigned long before casting to a pointer and fixes
 the following warnings:
fs/btrfs/extent_io.c:2289:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fs/btrfs/ioctl.c:2933:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fs/btrfs/ioctl.c:2937:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/ioctl.c:3020:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/scrub.c:275:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/backref.c:686:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 This patch casts to unsigned long before casting to a pointer and fixes
 the following warnings:
fs/btrfs/extent_io.c:2289:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fs/btrfs/ioctl.c:2933:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fs/btrfs/ioctl.c:2937:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/ioctl.c:3020:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/scrub.c:275:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
fs/btrfs/backref.c:686:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix the new inspection ioctls for 32 bit compat</title>
<updated>2011-11-06T08:08:49+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2011-11-02T19:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=740c3d226cbba6cd6a32adfb66809c94938f3e57'/>
<id>740c3d226cbba6cd6a32adfb66809c94938f3e57</id>
<content type='text'>
The new ioctls to follow backrefs are not clean for 32/64 bit
compat.  This reworks them for u64s everywhere.  They are brand new, so
there are no problems with changing the interface now.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new ioctls to follow backrefs are not clean for 32/64 bit
compat.  This reworks them for u64s everywhere.  They are brand new, so
there are no problems with changing the interface now.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: added helper functions to iterate backrefs</title>
<updated>2011-09-29T10:54:27+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2011-06-13T17:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a542ad1bafc7df9fc16de8a6894b350a4df75572'/>
<id>a542ad1bafc7df9fc16de8a6894b350a4df75572</id>
<content type='text'>
These helper functions iterate back references and call a function for each
backref. There is also a function to resolve an inode to a path in the
file system.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These helper functions iterate back references and call a function for each
backref. There is also a function to resolve an inode to a path in the
file system.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
