<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/xfs/xfs_rtalloc.c, branch linux-3.7.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>xfs: fix uninitialised variable in xfs_rtbuf_get()</title>
<updated>2012-08-23T19:48:16+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2012-07-31T04:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0b9e3f6d84ce619f697bb622d9165cccaa93d67c'/>
<id>0b9e3f6d84ce619f697bb622d9165cccaa93d67c</id>
<content type='text'>
Results in this assert failure in generic/090:

XFS: Assertion failed: *nmap &gt;= 1, file: fs/xfs/xfs_bmap.c, line: 4363
.....
Call Trace:
 [&lt;ffffffff814680db&gt;] xfs_bmapi_read+0x6b/0x370
 [&lt;ffffffff814b64b2&gt;] xfs_rtbuf_get+0x42/0x130
 [&lt;ffffffff814b6f09&gt;] xfs_rtget_summary+0x89/0x120
 [&lt;ffffffff814b7bfe&gt;] xfs_rtallocate_extent_size+0xce/0x340
 [&lt;ffffffff814b89f0&gt;] xfs_rtallocate_extent+0x240/0x290
 [&lt;ffffffff81462c1a&gt;] xfs_bmap_rtalloc+0x1ba/0x340
 [&lt;ffffffff81463a65&gt;] xfs_bmap_alloc+0x35/0x40
 [&lt;ffffffff8146f111&gt;] xfs_bmapi_allocate+0xf1/0x350
 [&lt;ffffffff8146f9de&gt;] xfs_bmapi_write+0x66e/0xa60
 [&lt;ffffffff8144538a&gt;] xfs_iomap_write_direct+0x22a/0x3f0
 [&lt;ffffffff8143707b&gt;] __xfs_get_blocks+0x38b/0x5d0
 [&lt;ffffffff814372d4&gt;] xfs_get_blocks_direct+0x14/0x20
 [&lt;ffffffff811b0081&gt;] do_blockdev_direct_IO+0xf71/0x1eb0
 [&lt;ffffffff811b1015&gt;] __blockdev_direct_IO+0x55/0x60
 [&lt;ffffffff814355ca&gt;] xfs_vm_direct_IO+0x11a/0x1e0
 [&lt;ffffffff8112d617&gt;] generic_file_direct_write+0xd7/0x1b0
 [&lt;ffffffff8143e16c&gt;] xfs_file_dio_aio_write+0x13c/0x320
 [&lt;ffffffff8143e6f2&gt;] xfs_file_aio_write+0x1c2/0x1d0
 [&lt;ffffffff81174a07&gt;] do_sync_write+0xa7/0xe0
 [&lt;ffffffff81175288&gt;] vfs_write+0xa8/0x160
 [&lt;ffffffff81175702&gt;] sys_pwrite64+0x92/0xb0
 [&lt;ffffffff81b68f69&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Results in this assert failure in generic/090:

XFS: Assertion failed: *nmap &gt;= 1, file: fs/xfs/xfs_bmap.c, line: 4363
.....
Call Trace:
 [&lt;ffffffff814680db&gt;] xfs_bmapi_read+0x6b/0x370
 [&lt;ffffffff814b64b2&gt;] xfs_rtbuf_get+0x42/0x130
 [&lt;ffffffff814b6f09&gt;] xfs_rtget_summary+0x89/0x120
 [&lt;ffffffff814b7bfe&gt;] xfs_rtallocate_extent_size+0xce/0x340
 [&lt;ffffffff814b89f0&gt;] xfs_rtallocate_extent+0x240/0x290
 [&lt;ffffffff81462c1a&gt;] xfs_bmap_rtalloc+0x1ba/0x340
 [&lt;ffffffff81463a65&gt;] xfs_bmap_alloc+0x35/0x40
 [&lt;ffffffff8146f111&gt;] xfs_bmapi_allocate+0xf1/0x350
 [&lt;ffffffff8146f9de&gt;] xfs_bmapi_write+0x66e/0xa60
 [&lt;ffffffff8144538a&gt;] xfs_iomap_write_direct+0x22a/0x3f0
 [&lt;ffffffff8143707b&gt;] __xfs_get_blocks+0x38b/0x5d0
 [&lt;ffffffff814372d4&gt;] xfs_get_blocks_direct+0x14/0x20
 [&lt;ffffffff811b0081&gt;] do_blockdev_direct_IO+0xf71/0x1eb0
 [&lt;ffffffff811b1015&gt;] __blockdev_direct_IO+0x55/0x60
 [&lt;ffffffff814355ca&gt;] xfs_vm_direct_IO+0x11a/0x1e0
 [&lt;ffffffff8112d617&gt;] generic_file_direct_write+0xd7/0x1b0
 [&lt;ffffffff8143e16c&gt;] xfs_file_dio_aio_write+0x13c/0x320
 [&lt;ffffffff8143e6f2&gt;] xfs_file_aio_write+0x1c2/0x1d0
 [&lt;ffffffff81174a07&gt;] do_sync_write+0xa7/0xe0
 [&lt;ffffffff81175288&gt;] vfs_write+0xa8/0x160
 [&lt;ffffffff81175702&gt;] sys_pwrite64+0x92/0xb0
 [&lt;ffffffff81b68f69&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: move xfs_get_extsz_hint() and kill xfs_rw.h</title>
<updated>2012-05-14T21:20:58+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2012-04-23T05:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2a0ec1d9ed7f3aa7974fccfbb612fadda2e10bad'/>
<id>2a0ec1d9ed7f3aa7974fccfbb612fadda2e10bad</id>
<content type='text'>
The only thing left in xfs_rw.h is a function prototype for an inode
function.  Move that to xfs_inode.h, and kill xfs_rw.h.

Also move the function implementing the prototype from xfs_rw.c to
xfs_inode.c so we only have one function left in xfs_rw.c

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only thing left in xfs_rw.h is a function prototype for an inode
function.  Move that to xfs_inode.h, and kill xfs_rw.h.

Also move the function implementing the prototype from xfs_rw.c to
xfs_inode.c so we only have one function left in xfs_rw.c

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: move xfsagino_t to xfs_types.h</title>
<updated>2012-05-14T21:20:54+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2012-04-23T05:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=60a34607b26b60d6b5c5c928ede7fc84b0f06b85'/>
<id>60a34607b26b60d6b5c5c928ede7fc84b0f06b85</id>
<content type='text'>
Untangle the header file includes a bit by moving the definition of
xfs_agino_t to xfs_types.h. This removes the dependency that xfs_ag.h has on
xfs_inum.h, meaning we don't need to include xfs_inum.h everywhere we include
xfs_ag.h.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Untangle the header file includes a bit by moving the definition of
xfs_agino_t to xfs_types.h. This removes the dependency that xfs_ag.h has on
xfs_inum.h, meaning we don't need to include xfs_inum.h everywhere we include
xfs_ag.h.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: clean up buffer get/read call API</title>
<updated>2012-05-14T21:20:45+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2012-04-23T05:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e70b73f84f474cc594a39bd8ff083974e6d69aea'/>
<id>e70b73f84f474cc594a39bd8ff083974e6d69aea</id>
<content type='text'>
The xfs_buf_get/read API is not consistent in the units it uses, and
does not use appropriate or consistent units/types for the
variables.

Convert the API to use disk addresses and block counts for all
buffer get and read calls. Use consistent naming for all the
functions and their declarations, and convert the internal functions
to use disk addresses and block counts to avoid need to convert them
from one type to another and back again.

Fix all the callers to use disk addresses and block counts. In many
cases, this removes an additional conversion from the function call
as the callers already have a block count.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The xfs_buf_get/read API is not consistent in the units it uses, and
does not use appropriate or consistent units/types for the
variables.

Convert the API to use disk addresses and block counts for all
buffer get and read calls. Use consistent naming for all the
functions and their declarations, and convert the internal functions
to use disk addresses and block counts to avoid need to convert them
from one type to another and back again.

Fix all the callers to use disk addresses and block counts. In many
cases, this removes an additional conversion from the function call
as the callers already have a block count.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: fix deadlock in xfs_rtfree_extent</title>
<updated>2012-03-22T20:31:06+00:00</updated>
<author>
<name>Kamal Dasu</name>
<email>kdasu.kdev@gmail.com</email>
</author>
<published>2012-02-23T00:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5575acc7807595687288b3bbac15103f2a5462e1'/>
<id>5575acc7807595687288b3bbac15103f2a5462e1</id>
<content type='text'>
To fix the deadlock caused by repeatedly calling xfs_rtfree_extent

 - removed xfs_ilock() and xfs_trans_ijoin() from xfs_rtfree_extent(),
   instead added asserts that the inode is locked and has an inode_item
   attached to it.
 - in xfs_bunmapi() when dealing with an inode with the rt flag
   call xfs_ilock() and xfs_trans_ijoin() so that the
   reference count is bumped on the inode and attached it to the
   transaction before calling into xfs_bmap_del_extent, similar to
   what we do in xfs_bmap_rtalloc.

Signed-off-by: Kamal Dasu &lt;kdasu.kdev@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To fix the deadlock caused by repeatedly calling xfs_rtfree_extent

 - removed xfs_ilock() and xfs_trans_ijoin() from xfs_rtfree_extent(),
   instead added asserts that the inode is locked and has an inode_item
   attached to it.
 - in xfs_bunmapi() when dealing with an inode with the rt flag
   call xfs_ilock() and xfs_trans_ijoin() so that the
   reference count is bumped on the inode and attached it to the
   transaction before calling into xfs_bmap_del_extent, similar to
   what we do in xfs_bmap_rtalloc.

Signed-off-by: Kamal Dasu &lt;kdasu.kdev@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: simplify xfs_trans_ijoin* again</title>
<updated>2011-10-12T02:15:08+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-09-19T15:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ddc3415aba1cb2f86d1fcad720cea834ee178f54'/>
<id>ddc3415aba1cb2f86d1fcad720cea834ee178f54</id>
<content type='text'>
There is no reason to keep a reference to the inode even if we unlock
it during transaction commit because we never drop a reference between
the ijoin and commit.  Also use this fact to merge xfs_trans_ijoin_ref
back into xfs_trans_ijoin - the third argument decides if an unlock
is needed now.

I'm actually starting to wonder if allowing inodes to be unlocked
at transaction commit really is worth the effort.  The only real
benefit is that they can be unlocked earlier when commiting a
synchronous transactions, but that could be solved by doing the
log force manually after the unlock, too.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no reason to keep a reference to the inode even if we unlock
it during transaction commit because we never drop a reference between
the ijoin and commit.  Also use this fact to merge xfs_trans_ijoin_ref
back into xfs_trans_ijoin - the third argument decides if an unlock
is needed now.

I'm actually starting to wonder if allowing inodes to be unlocked
at transaction commit really is worth the effort.  The only real
benefit is that they can be unlocked earlier when commiting a
synchronous transactions, but that could be solved by doing the
log force manually after the unlock, too.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: rename xfs_bmapi to xfs_bmapi_write</title>
<updated>2011-10-12T02:15:04+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2011-09-18T20:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0dc7828af6952643219292be29e482ef74cb261'/>
<id>c0dc7828af6952643219292be29e482ef74cb261</id>
<content type='text'>
Now that all the read-only users of xfs_bmapi have been converted to
use xfs_bmapi_read(), we can remove all the read-only handling cases
from xfs_bmapi().

Once this is done, rename xfs_bmapi to xfs_bmapi_write to reflect
the fact it is for allocation only. This enables us to kill the
XFS_BMAPI_WRITE flag as well.

Also clean up xfs_bmapi_write to the style used in the newly added
xfs_bmapi_read/delay functions.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that all the read-only users of xfs_bmapi have been converted to
use xfs_bmapi_read(), we can remove all the read-only handling cases
from xfs_bmapi().

Once this is done, rename xfs_bmapi to xfs_bmapi_write to reflect
the fact it is for allocation only. This enables us to kill the
XFS_BMAPI_WRITE flag as well.

Also clean up xfs_bmapi_write to the style used in the newly added
xfs_bmapi_read/delay functions.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: remove xfs_bmapi_single()</title>
<updated>2011-10-12T02:15:03+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2011-09-18T20:40:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5b777ad517ee75d3bb8d67c142d808822e46601b'/>
<id>5b777ad517ee75d3bb8d67c142d808822e46601b</id>
<content type='text'>
Now we have xfs_bmapi_read, there is no need for xfs_bmapi_single().
Change the remaining caller over and kill the function.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now we have xfs_bmapi_read, there is no need for xfs_bmapi_single().
Change the remaining caller over and kill the function.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: Remove the macro XFS_BUF_PTR</title>
<updated>2011-07-25T20:03:13+00:00</updated>
<author>
<name>Chandra Seetharaman</name>
<email>sekharan@us.ibm.com</email>
</author>
<published>2011-07-22T23:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6292604447ade7d150f5eba3b1518e1a224fda15'/>
<id>6292604447ade7d150f5eba3b1518e1a224fda15</id>
<content type='text'>
Remove the definition and usages of the macro XFS_BUF_PTR.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the definition and usages of the macro XFS_BUF_PTR.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: Remove the macro XFS_BUF_ERROR and family</title>
<updated>2011-07-25T19:57:46+00:00</updated>
<author>
<name>Chandra Seetharaman</name>
<email>sekharan@us.ibm.com</email>
</author>
<published>2011-07-22T23:39:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5a52c2a581cddcb676a54a95d99cd39f5577c33b'/>
<id>5a52c2a581cddcb676a54a95d99cd39f5577c33b</id>
<content type='text'>
Remove the definitions and usage of the macros XFS_BUF_ERROR,
XFS_BUF_GETERROR and XFS_BUF_ISERROR.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the definitions and usage of the macros XFS_BUF_ERROR,
XFS_BUF_GETERROR and XFS_BUF_ISERROR.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
