<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/nfs, branch v4.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>NFS: Fix a tracepoint NULL-pointer dereference</title>
<updated>2015-10-06T22:56:25+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>Anna.Schumaker@netapp.com</email>
</author>
<published>2015-10-05T20:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39d0d3bdf7bab3021a31e501172ac0f18947f9b3'/>
<id>39d0d3bdf7bab3021a31e501172ac0f18947f9b3</id>
<content type='text'>
Running xfstest generic/013 with the tracepoint nfs:nfs4_open_file
enabled produces a NULL-pointer dereference when calculating fileid and
filehandle of the opened file.  Fix this by checking if state is NULL
before trying to use the inode pointer.

Reported-by: Olga Kornievskaia &lt;aglo@umich.edu&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.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>
Running xfstest generic/013 with the tracepoint nfs:nfs4_open_file
enabled produces a NULL-pointer dereference when calculating fileid and
filehandle of the opened file.  Fix this by checking if state is NULL
before trying to use the inode pointer.

Reported-by: Olga Kornievskaia &lt;aglo@umich.edu&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs4: reset states to use open_stateid when returning delegation voluntarily</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-10-02T17:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e99b532bb95f8e6bf39f4500f0caef070bac16d'/>
<id>5e99b532bb95f8e6bf39f4500f0caef070bac16d</id>
<content type='text'>
When the client goes to return a delegation, it should always update any
nfs4_state currently set up to use that delegation stateid to instead
use the open stateid. It already does do this in some cases,
particularly in the state recovery code, but not currently when the
delegation is voluntarily returned (e.g. in advance of a RENAME).  This
causes the client to try to continue using the delegation stateid after
the DELEGRETURN, e.g. in LAYOUTGET.

Set the nfs4_state back to using the open stateid in
nfs4_open_delegation_recall, just before clearing the
NFS_DELEGATED_STATE bit.

Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.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>
When the client goes to return a delegation, it should always update any
nfs4_state currently set up to use that delegation stateid to instead
use the open stateid. It already does do this in some cases,
particularly in the state recovery code, but not currently when the
delegation is voluntarily returned (e.g. in advance of a RENAME).  This
causes the client to try to continue using the delegation stateid after
the DELEGRETURN, e.g. in LAYOUTGET.

Set the nfs4_state back to using the open stateid in
nfs4_open_delegation_recall, just before clearing the
NFS_DELEGATED_STATE bit.

Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4: Fix a nograce recovery hang</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Benjamin Coddington</name>
<email>bcodding@redhat.com</email>
</author>
<published>2015-10-01T13:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e92c1e0d40c50472f80820bd829645ce9fefd6c1'/>
<id>e92c1e0d40c50472f80820bd829645ce9fefd6c1</id>
<content type='text'>
Since commit 5cae02f42793130e1387f4ec09c4d07056ce9fa5 an OPEN_CONFIRM should
have a privileged sequence in the recovery case to allow nograce recovery to
proceed for NFSv4.0.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.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>
Since commit 5cae02f42793130e1387f4ec09c4d07056ce9fa5 an OPEN_CONFIRM should
have a privileged sequence in the recovery case to allow nograce recovery to
proceed for NFSv4.0.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4.1: nfs4_opendata_check_deleg needs to handle NFS4_OPEN_CLAIM_DELEG_CUR_FH</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-10-02T15:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=72d79ff83c34d430a9f7f72c45717905762ef4d9'/>
<id>72d79ff83c34d430a9f7f72c45717905762ef4d9</id>
<content type='text'>
We need to warn against broken NFSv4.1 servers that try to hand out
delegations in response to NFS4_OPEN_CLAIM_DELEG_CUR_FH.

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 need to warn against broken NFSv4.1 servers that try to hand out
delegations in response to NFS4_OPEN_CLAIM_DELEG_CUR_FH.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4: Don't try to reclaim unused state owners</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-10-02T15:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a0954ef347de7409ddf8f8153d893827d3feba8'/>
<id>4a0954ef347de7409ddf8f8153d893827d3feba8</id>
<content type='text'>
Currently, we don't test if the state owner is in use before we try to
recover it. The problem is that if the refcount is zero, then the
state owner will be waiting on the lru list for garbage collection.
The expectation in that case is that if you bump the refcount, then
you must also remove the state owner from the lru list. Otherwise
the call to nfs4_put_state_owner will corrupt that list by trying
to add our state owner a second time.

Avoid the whole problem by just skipping state owners that hold no
state.

Reported-by: Andrew W Elble &lt;aweits@rit.edu&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>
Currently, we don't test if the state owner is in use before we try to
recover it. The problem is that if the refcount is zero, then the
state owner will be waiting on the lru list for garbage collection.
The expectation in that case is that if you bump the refcount, then
you must also remove the state owner from the lru list. Otherwise
the call to nfs4_put_state_owner will corrupt that list by trying
to add our state owner a second time.

Avoid the whole problem by just skipping state owners that hold no
state.

Reported-by: Andrew W Elble &lt;aweits@rit.edu&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Fix a write performance regression</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-10-01T22:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8fa4592a14ebb3c22a21d846d1e4f65dab7d1a7c'/>
<id>8fa4592a14ebb3c22a21d846d1e4f65dab7d1a7c</id>
<content type='text'>
If all other conditions in nfs_can_extend_write() are met, and there
are no locks, then we should be able to assume close-to-open semantics
and the ability to extend our write to cover the whole page.

With this patch, the xfstests generic/074 test completes in 242s instead
of &gt;1400s on my test rig.

Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
Cc: Jeff Layton &lt;jlayton@primarydata.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>
If all other conditions in nfs_can_extend_write() are met, and there
are no locks, then we should be able to assume close-to-open semantics
and the ability to extend our write to cover the whole page.

With this patch, the xfstests generic/074 test completes in 242s instead
of &gt;1400s on my test rig.

Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
Cc: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Fix up page writeback accounting</title>
<updated>2015-10-02T19:43:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-10-01T15:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=40f90271a835478e5910dc84f32b8e25885419a4'/>
<id>40f90271a835478e5910dc84f32b8e25885419a4</id>
<content type='text'>
Currently, we are crediting all the calls to nfs_writepages_callback()
(i.e. the nfs_writepages() callback) to nfs_writepage(). Aside from
being inconsistent with the behaviour of the equivalent readpage/readpages
accounting, this also means that we cannot distinguish between bulk writes
and single page writebacks (which confuses the 'nfsiostat -p' tool).

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we are crediting all the calls to nfs_writepages_callback()
(i.e. the nfs_writepages() callback) to nfs_writepage(). Aside from
being inconsistent with the behaviour of the equivalent readpage/readpages
accounting, this also means that we cannot distinguish between bulk writes
and single page writebacks (which confuses the 'nfsiostat -p' tool).

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS41: make close wait for layoutreturn</title>
<updated>2015-09-23T12:55:32+00:00</updated>
<author>
<name>Peng Tao</name>
<email>tao.peng@primarydata.com</email>
</author>
<published>2015-09-22T03:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=500d701f336b2771d34e46da7875a4782515a652'/>
<id>500d701f336b2771d34e46da7875a4782515a652</id>
<content type='text'>
If we send a layoutreturn asynchronously before close, the close
might reach server first and layoutreturn would fail with BADSTATEID
because there is nothing keeping the layout stateid alive.

Also do not pretend sending layoutreturn if we are not.

Signed-off-by: Peng Tao &lt;tao.peng@primarydata.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>
If we send a layoutreturn asynchronously before close, the close
might reach server first and layoutreturn would fail with BADSTATEID
because there is nothing keeping the layout stateid alive.

Also do not pretend sending layoutreturn if we are not.

Signed-off-by: Peng Tao &lt;tao.peng@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Skip checking ds_cinfo.buckets when lseg's commit_through_mds is set</title>
<updated>2015-09-22T22:09:14+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2015-09-21T22:54:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=834e465bba38f2768747bccb5f00e951e72d2bf5'/>
<id>834e465bba38f2768747bccb5f00e951e72d2bf5</id>
<content type='text'>
When lseg's commit_through_mds is set, pnfs client always WARN once
in nfs_direct_select_verf after checking ds_cinfo.nbuckets.

nfs should use the DS verf except commit_through_mds is set for
layout segment where nbuckets is zero.

[17844.666094] ------------[ cut here ]------------
[17844.667071] WARNING: CPU: 0 PID: 21758 at /root/source/linux-pnfs/fs/nfs/direct.c:174 nfs_direct_select_verf+0x5a/0x70 [nfs]()
[17844.668650] Modules linked in: nfs_layout_nfsv41_files(OE) nfsv4(OE) nfs(OE) fscache(E) nfsd(OE) xfs libcrc32c btrfs ppdev coretemp crct10dif_pclmul auth_rpcgss crc32_pclmul crc32c_intel nfs_acl ghash_clmulni_intel lockd vmw_balloon xor vmw_vmci grace raid6_pq shpchp sunrpc parport_pc i2c_piix4 parport vmwgfx drm_kms_helper ttm drm serio_raw mptspi e1000 scsi_transport_spi mptscsih mptbase ata_generic pata_acpi [last unloaded: fscache]
[17844.686676] CPU: 0 PID: 21758 Comm: kworker/0:1 Tainted: G        W  OE   4.3.0-rc1-pnfs+ #245
[17844.687352] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
[17844.698502] Workqueue: nfsiod rpc_async_release [sunrpc]
[17844.699212]  0000000000000009 0000000043e58010 ffff8800454fbc10 ffffffff813680c4
[17844.699990]  ffff8800454fbc48 ffffffff8108b49d ffff88004eb20000 ffff88004eb20000
[17844.700844]  ffff880062e26000 0000000000000000 0000000000000001 ffff8800454fbc58
[17844.701637] Call Trace:
[17844.725252]  [&lt;ffffffff813680c4&gt;] dump_stack+0x19/0x25
[17844.732693]  [&lt;ffffffff8108b49d&gt;] warn_slowpath_common+0x7d/0xb0
[17844.733855]  [&lt;ffffffff8108b5da&gt;] warn_slowpath_null+0x1a/0x20
[17844.735015]  [&lt;ffffffffa04a27ca&gt;] nfs_direct_select_verf+0x5a/0x70 [nfs]
[17844.735999]  [&lt;ffffffffa04a2b83&gt;] nfs_direct_set_hdr_verf+0x23/0x90 [nfs]
[17844.736846]  [&lt;ffffffffa04a2e17&gt;] nfs_direct_write_completion+0x227/0x260 [nfs]
[17844.737782]  [&lt;ffffffffa04a433c&gt;] nfs_pgio_release+0x1c/0x20 [nfs]
[17844.738597]  [&lt;ffffffffa0502df3&gt;] pnfs_generic_rw_release+0x23/0x30 [nfsv4]
[17844.739486]  [&lt;ffffffffa01cbbea&gt;] rpc_free_task+0x2a/0x70 [sunrpc]
[17844.740326]  [&lt;ffffffffa01cbcd5&gt;] rpc_async_release+0x15/0x20 [sunrpc]
[17844.741173]  [&lt;ffffffff810a387c&gt;] process_one_work+0x21c/0x4c0
[17844.741984]  [&lt;ffffffff810a37cd&gt;] ? process_one_work+0x16d/0x4c0
[17844.742837]  [&lt;ffffffff810a3b6a&gt;] worker_thread+0x4a/0x440
[17844.743639]  [&lt;ffffffff810a3b20&gt;] ? process_one_work+0x4c0/0x4c0
[17844.744399]  [&lt;ffffffff810a3b20&gt;] ? process_one_work+0x4c0/0x4c0
[17844.745176]  [&lt;ffffffff810a8d75&gt;] kthread+0xf5/0x110
[17844.745927]  [&lt;ffffffff810a8c80&gt;] ? kthread_create_on_node+0x240/0x240
[17844.747105]  [&lt;ffffffff8172ce1f&gt;] ret_from_fork+0x3f/0x70
[17844.747856]  [&lt;ffffffff810a8c80&gt;] ? kthread_create_on_node+0x240/0x240
[17844.748642] ---[ end trace 336a2845d42b83f0 ]---

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>
When lseg's commit_through_mds is set, pnfs client always WARN once
in nfs_direct_select_verf after checking ds_cinfo.nbuckets.

nfs should use the DS verf except commit_through_mds is set for
layout segment where nbuckets is zero.

[17844.666094] ------------[ cut here ]------------
[17844.667071] WARNING: CPU: 0 PID: 21758 at /root/source/linux-pnfs/fs/nfs/direct.c:174 nfs_direct_select_verf+0x5a/0x70 [nfs]()
[17844.668650] Modules linked in: nfs_layout_nfsv41_files(OE) nfsv4(OE) nfs(OE) fscache(E) nfsd(OE) xfs libcrc32c btrfs ppdev coretemp crct10dif_pclmul auth_rpcgss crc32_pclmul crc32c_intel nfs_acl ghash_clmulni_intel lockd vmw_balloon xor vmw_vmci grace raid6_pq shpchp sunrpc parport_pc i2c_piix4 parport vmwgfx drm_kms_helper ttm drm serio_raw mptspi e1000 scsi_transport_spi mptscsih mptbase ata_generic pata_acpi [last unloaded: fscache]
[17844.686676] CPU: 0 PID: 21758 Comm: kworker/0:1 Tainted: G        W  OE   4.3.0-rc1-pnfs+ #245
[17844.687352] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
[17844.698502] Workqueue: nfsiod rpc_async_release [sunrpc]
[17844.699212]  0000000000000009 0000000043e58010 ffff8800454fbc10 ffffffff813680c4
[17844.699990]  ffff8800454fbc48 ffffffff8108b49d ffff88004eb20000 ffff88004eb20000
[17844.700844]  ffff880062e26000 0000000000000000 0000000000000001 ffff8800454fbc58
[17844.701637] Call Trace:
[17844.725252]  [&lt;ffffffff813680c4&gt;] dump_stack+0x19/0x25
[17844.732693]  [&lt;ffffffff8108b49d&gt;] warn_slowpath_common+0x7d/0xb0
[17844.733855]  [&lt;ffffffff8108b5da&gt;] warn_slowpath_null+0x1a/0x20
[17844.735015]  [&lt;ffffffffa04a27ca&gt;] nfs_direct_select_verf+0x5a/0x70 [nfs]
[17844.735999]  [&lt;ffffffffa04a2b83&gt;] nfs_direct_set_hdr_verf+0x23/0x90 [nfs]
[17844.736846]  [&lt;ffffffffa04a2e17&gt;] nfs_direct_write_completion+0x227/0x260 [nfs]
[17844.737782]  [&lt;ffffffffa04a433c&gt;] nfs_pgio_release+0x1c/0x20 [nfs]
[17844.738597]  [&lt;ffffffffa0502df3&gt;] pnfs_generic_rw_release+0x23/0x30 [nfsv4]
[17844.739486]  [&lt;ffffffffa01cbbea&gt;] rpc_free_task+0x2a/0x70 [sunrpc]
[17844.740326]  [&lt;ffffffffa01cbcd5&gt;] rpc_async_release+0x15/0x20 [sunrpc]
[17844.741173]  [&lt;ffffffff810a387c&gt;] process_one_work+0x21c/0x4c0
[17844.741984]  [&lt;ffffffff810a37cd&gt;] ? process_one_work+0x16d/0x4c0
[17844.742837]  [&lt;ffffffff810a3b6a&gt;] worker_thread+0x4a/0x440
[17844.743639]  [&lt;ffffffff810a3b20&gt;] ? process_one_work+0x4c0/0x4c0
[17844.744399]  [&lt;ffffffff810a3b20&gt;] ? process_one_work+0x4c0/0x4c0
[17844.745176]  [&lt;ffffffff810a8d75&gt;] kthread+0xf5/0x110
[17844.745927]  [&lt;ffffffff810a8c80&gt;] ? kthread_create_on_node+0x240/0x240
[17844.747105]  [&lt;ffffffff8172ce1f&gt;] ret_from_fork+0x3f/0x70
[17844.747856]  [&lt;ffffffff810a8c80&gt;] ? kthread_create_on_node+0x240/0x240
[17844.748642] ---[ end trace 336a2845d42b83f0 ]---

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>NFSv4.x/pnfs: Don't try to recover stateids twice in layoutget</title>
<updated>2015-09-21T02:34:35+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-09-20T17:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2259f960b3a9b1020dccbf948c97311ce586db1b'/>
<id>2259f960b3a9b1020dccbf948c97311ce586db1b</id>
<content type='text'>
If the current open or layout stateid doesn't match the stateid used
in the layoutget RPC call, then don't try to recover it.

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 current open or layout stateid doesn't match the stateid used
in the layoutget RPC call, then don't try to recover it.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
