<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/nfs, branch v4.5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>NFSv4.x/pnfs: Fix a race between layoutget and bulk recalls</title>
<updated>2016-02-22T22:46:34+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-22T22:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9fd4b9fc7695a4da1363a0b439853f88fb6a034f'/>
<id>9fd4b9fc7695a4da1363a0b439853f88fb6a034f</id>
<content type='text'>
Replace another case where the layout 'plh_block_lgets' can trigger
infinite loops in send_layoutget().

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace another case where the layout 'plh_block_lgets' can trigger
infinite loops in send_layoutget().

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4.x/pnfs: Fix a race between layoutget and pnfs_destroy_layout</title>
<updated>2016-02-22T22:34:59+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-22T22:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2454dfea0aef8a883d4302c38124edb373d47a25'/>
<id>2454dfea0aef8a883d4302c38124edb373d47a25</id>
<content type='text'>
If the server reboots while there is a layoutget outstanding, then
the call to pnfs_choose_layoutget_stateid() will fail with an EAGAIN
error, which causes an infinite loop in send_layoutget(). The reason
why we never break out of the loop is that the layout 'plh_block_lgets'
field is never cleared.

Fix is to replace plh_block_lgets with NFS_LAYOUT_INVALID_STID, which
can be reset after a new layoutget.

Fixes: ab7d763e477c5 ("pNFS: Ensure nfs4_layoutget_prepare returns...")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the server reboots while there is a layoutget outstanding, then
the call to pnfs_choose_layoutget_stateid() will fail with an EAGAIN
error, which causes an infinite loop in send_layoutget(). The reason
why we never break out of the loop is that the layout 'plh_block_lgets'
field is never cleared.

Fix is to replace plh_block_lgets with NFS_LAYOUT_INVALID_STID, which
can be reset after a new layoutget.

Fixes: ab7d763e477c5 ("pNFS: Ensure nfs4_layoutget_prepare returns...")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page</title>
<updated>2016-02-17T16:44:45+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2016-02-01T01:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c89757061a4e4017a21ef632dc100449a7bab7dd'/>
<id>c89757061a4e4017a21ef632dc100449a7bab7dd</id>
<content type='text'>
unreferenced object 0xffffc90000abf000 (size 16900):
  comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8174d54e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811b9b91&gt;] __vmalloc_node_range+0x231/0x280
    [&lt;ffffffff811b9c2a&gt;] __vmalloc+0x4a/0x50
    [&lt;ffffffffa02c9ec1&gt;] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver]
    [&lt;ffffffffa02c700e&gt;] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver]
    [&lt;ffffffffa0596a6c&gt;] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4]
    [&lt;ffffffffa0596b13&gt;] pnfs_generic_sync+0x13/0x20 [nfsv4]
    [&lt;ffffffffa0585188&gt;] nfs4_file_fsync+0x58/0x150 [nfsv4]
    [&lt;ffffffff81228e5b&gt;] vfs_fsync_range+0x4b/0xb0
    [&lt;ffffffff81228f1d&gt;] do_fsync+0x3d/0x70
    [&lt;ffffffff812291d0&gt;] SyS_fsync+0x10/0x20
    [&lt;ffffffff81757def&gt;] entry_SYSCALL_64_fastpath+0x12/0x76
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

v2, add missing include header

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unreferenced object 0xffffc90000abf000 (size 16900):
  comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8174d54e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811b9b91&gt;] __vmalloc_node_range+0x231/0x280
    [&lt;ffffffff811b9c2a&gt;] __vmalloc+0x4a/0x50
    [&lt;ffffffffa02c9ec1&gt;] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver]
    [&lt;ffffffffa02c700e&gt;] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver]
    [&lt;ffffffffa0596a6c&gt;] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4]
    [&lt;ffffffffa0596b13&gt;] pnfs_generic_sync+0x13/0x20 [nfsv4]
    [&lt;ffffffffa0585188&gt;] nfs4_file_fsync+0x58/0x150 [nfsv4]
    [&lt;ffffffff81228e5b&gt;] vfs_fsync_range+0x4b/0xb0
    [&lt;ffffffff81228f1d&gt;] do_fsync+0x3d/0x70
    [&lt;ffffffff812291d0&gt;] SyS_fsync+0x10/0x20
    [&lt;ffffffff81757def&gt;] entry_SYSCALL_64_fastpath+0x12/0x76
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

v2, add missing include header

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs4: fix stateid handling for the NFS v4.2 operations</title>
<updated>2016-02-17T16:38:07+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-02-17T14:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4bdf87ebda016b864b388f96ae349e76983ebac4'/>
<id>4bdf87ebda016b864b388f96ae349e76983ebac4</id>
<content type='text'>
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server.  But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol.  Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.

Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.

While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.

All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server.  But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol.  Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.

Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.

While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.

All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4: Fix a dentry leak on alias use</title>
<updated>2016-02-17T16:35:25+00:00</updated>
<author>
<name>Benjamin Coddington</name>
<email>bcodding@redhat.com</email>
</author>
<published>2016-02-17T15:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9dfd8d741683347ee159d25f5b50c346a0df557'/>
<id>d9dfd8d741683347ee159d25f5b50c346a0df557</id>
<content type='text'>
In the case where d_add_unique() finds an appropriate alias to use it will
have already incremented the reference count.  An additional dget() to swap
the open context's dentry is unnecessary and will leak a reference.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Fixes: 275bb307865a3 ("NFSv4: Move dentry instantiation into the NFSv4-...")
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case where d_add_unique() finds an appropriate alias to use it will
have already incremented the reference count.  An additional dget() to swap
the open context's dentry is unnecessary and will leak a reference.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Fixes: 275bb307865a3 ("NFSv4: Move dentry instantiation into the NFSv4-...")
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pNFS: Always set NFS_LAYOUT_RETURN_REQUESTED with lo-&gt;plh_return_iomode</title>
<updated>2016-02-15T18:03:30+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-15T17:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e0fa0d0189f6be61343dbff1f71bef20125576e7'/>
<id>e0fa0d0189f6be61343dbff1f71bef20125576e7</id>
<content type='text'>
When setting the layout return mode, we must always also set the
NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn.
Otherwise pnfs_error_mark_layout_for_return() could set the mode, but
fail to send the layoutreturn because another is already in flight.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting the layout return mode, we must always also set the
NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn.
Otherwise pnfs_error_mark_layout_for_return() could set the mode, but
fail to send the layoutreturn because another is already in flight.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pNFS: Fix pnfs_mark_matching_lsegs_return()</title>
<updated>2016-02-15T17:56:01+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-02-15T17:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2f21596882f4a0edc387051910d56f8732970080'/>
<id>2f21596882f4a0edc387051910d56f8732970080</id>
<content type='text'>
We don't need to schedule a layoutreturn if the layout segment can
be freed immediately.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need to schedule a layoutreturn if the layout segment can
be freed immediately.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Cleanup - rename NFS_LAYOUT_RETURN_BEFORE_CLOSE</title>
<updated>2016-01-28T01:40:05+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-01-28T01:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2370abdab530718b61afc222c51901bdc2884ee2'/>
<id>2370abdab530718b61afc222c51901bdc2884ee2</id>
<content type='text'>
NFS_LAYOUT_RETURN_BEFORE_CLOSE is being used to signal that a
layoutreturn is needed, either due to a layout recall or to a
layout error. Rename it to NFS_LAYOUT_RETURN_REQUESTED in order
to clarify its purpose.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NFS_LAYOUT_RETURN_BEFORE_CLOSE is being used to signal that a
layoutreturn is needed, either due to a layout recall or to a
layout error. Rename it to NFS_LAYOUT_RETURN_REQUESTED in order
to clarify its purpose.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pNFS: Fix missing layoutreturn calls</title>
<updated>2016-01-27T04:12:11+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-01-27T04:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=13c13a6ad71f98c3b6189dfc89a9a743ab02a39a'/>
<id>13c13a6ad71f98c3b6189dfc89a9a743ab02a39a</id>
<content type='text'>
The layoutreturn code currently relies on pnfs_put_lseg() to initiate the
RPC call when conditions are right. A problem arises when we want to
free the layout segment from inside an inode-&gt;i_lock section (e.g. in
pnfs_clear_request_commit()), since we cannot sleep.

The workaround is to move the actual call to pnfs_send_layoutreturn()
to pnfs_put_layout_hdr(), which doesn't have this restriction.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The layoutreturn code currently relies on pnfs_put_lseg() to initiate the
RPC call when conditions are right. A problem arises when we want to
free the layout segment from inside an inode-&gt;i_lock section (e.g. in
pnfs_clear_request_commit()), since we cannot sleep.

The workaround is to move the actual call to pnfs_send_layoutreturn()
to pnfs_put_layout_hdr(), which doesn't have this restriction.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2016-01-23T20:24:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-23T20:24:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cc673757e24d018d64ff8038e28835db1e2902c4'/>
<id>cc673757e24d018d64ff8038e28835db1e2902c4</id>
<content type='text'>
Pull final vfs updates from Al Viro:

 - The -&gt;i_mutex wrappers (with small prereq in lustre)

 - a fix for too early freeing of symlink bodies on shmem (they need to
   be RCU-delayed) (-stable fodder)

 - followup to dedupe stuff merged this cycle

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: abort dedupe loop if fatal signals are pending
  make sure that freeing shmem fast symlinks is RCU-delayed
  wrappers for -&gt;i_mutex access
  lustre: remove unused declaration
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull final vfs updates from Al Viro:

 - The -&gt;i_mutex wrappers (with small prereq in lustre)

 - a fix for too early freeing of symlink bodies on shmem (they need to
   be RCU-delayed) (-stable fodder)

 - followup to dedupe stuff merged this cycle

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: abort dedupe loop if fatal signals are pending
  make sure that freeing shmem fast symlinks is RCU-delayed
  wrappers for -&gt;i_mutex access
  lustre: remove unused declaration
</pre>
</div>
</content>
</entry>
</feed>
