<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/nfs/filelayout/filelayoutdev.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-23T17:29:50+00:00</updated>
<entry>
<title>NFS: Update the filelayout to use xdr_set_scratch_folio()</title>
<updated>2025-09-23T17:29:50+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>anna.schumaker@oracle.com</email>
</author>
<published>2025-06-30T17:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a33b629af21a98fc1c85da7cc21c78bd1eb1030'/>
<id>urn:sha1:1a33b629af21a98fc1c85da7cc21c78bd1eb1030</id>
<content type='text'>
Signed-off-by: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
</content>
</entry>
<entry>
<title>nfs: don't share pNFS DS connections between net namespaces</title>
<updated>2025-04-28T03:25:44+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2025-04-10T20:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b9785dc8b13d9fb75ceec8cf4ea7ec3f3b1edbc'/>
<id>urn:sha1:6b9785dc8b13d9fb75ceec8cf4ea7ec3f3b1edbc</id>
<content type='text'>
Currently, different NFS clients can share the same DS connections, even
when they are in different net namespaces. If a containerized client
creates a DS connection, another container can find and use it. When the
first client exits, the connection will close which can lead to stalls
in other clients.

Add a net namespace pointer to struct nfs4_pnfs_ds, and compare those
value to the caller's netns in _data_server_lookup_locked() when
searching for a nfs4_pnfs_ds to match.

Reported-by: Omar Sandoval &lt;osandov@osandov.com&gt;
Reported-by: Sargun Dillon &lt;sargun@sargun.me&gt;
Closes: https://lore.kernel.org/linux-nfs/Z_ArpQC_vREh_hEA@telecaster/
Tested-by: Sargun Dillon &lt;sargun@sargun.me&gt;
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Link: https://lore.kernel.org/r/20250410-nfs-ds-netns-v2-1-f80b7979ba80@kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>pnfs/filelayout: add tracepoint to getdeviceinfo</title>
<updated>2024-02-28T21:18:19+00:00</updated>
<author>
<name>Olga Kornievskaia</name>
<email>kolga@netapp.com</email>
</author>
<published>2024-01-26T18:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=47f7c956327ff4ff4ddf1305e8571ce530157091'/>
<id>urn:sha1:47f7c956327ff4ff4ddf1305e8571ce530157091</id>
<content type='text'>
While decoding filelayout getdeviceinfo received, print out the
information about the location of data servers (IPs).

Generic getdeviceinfo tracepoints prints the MDS's ip for the
dstaddr. In this patch, separate the MDS's address from the
DS's addresses.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfs41: pnfs: filelayout: Replace one-element array with flexible-array member</title>
<updated>2022-01-06T19:00:20+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-08-10T23:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c72a826829ccfb38019187a3a5ba6d3584b7b7dc'/>
<id>urn:sha1:c72a826829ccfb38019187a3a5ba6d3584b7b7dc</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Refactor the code a bit according to the use of a flexible-array member
in struct nfs4_file_layout_dsaddr instead of a one-element array, and
use the struct_size() helper.

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

This issue was found with the help of Coccinelle and audited and fixed,
manually.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()</title>
<updated>2020-11-30T19:46:35+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2020-11-11T20:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ae4c3e8a64ace1b8d7de033b0751afe43024416'/>
<id>urn:sha1:0ae4c3e8a64ace1b8d7de033b0751afe43024416</id>
<content type='text'>
Clean up: De-duplicate some frequently-used code.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>pNFS/flexfiles: never nfs4_mark_deviceid_unavailable</title>
<updated>2017-03-17T20:07:17+00:00</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@monkey.org</email>
</author>
<published>2017-03-09T17:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da066f3f039eba3e72e97b2ccad0dd8b45ba84bd'/>
<id>urn:sha1:da066f3f039eba3e72e97b2ccad0dd8b45ba84bd</id>
<content type='text'>
The flexfiles layout should never mark a device unavailable.

Move nfs4_mark_deviceid_unavailable out of nfs4_pnfs_ds_connect and call
directly from files layout where it's still needed.

The flexfiles driver still handles marked devices in error paths, but will
now print a rate limited warning.

Signed-off-by: Weston Andros Adamson &lt;dros@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>pNFS: return status from nfs4_pnfs_ds_connect</title>
<updated>2017-03-17T20:07:10+00:00</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@monkey.org</email>
</author>
<published>2017-03-09T17:56:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a33e4b036d4612f62220f37a9fa29d273b6fd0ca'/>
<id>urn:sha1:a33e4b036d4612f62220f37a9fa29d273b6fd0ca</id>
<content type='text'>
The nfs4_pnfs_ds_connect path can call rpc_create which can fail or it
can wait on another context to reach the same failure.

This checks that the rpc_create succeeded and returns the error to the
caller.

When an error is returned, both the files and flexfiles layouts will return
NULL from _prepare_ds(). The flexfiles layout will also return the layout
with the error NFS4ERR_NXIO.

Signed-off-by: Weston Andros Adamson &lt;dros@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4.1: nfs4_fl_prepare_ds must be careful about reporting success.</title>
<updated>2016-12-19T22:29:48+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2016-12-19T00:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cfd278c280f997cf2fe4662e0acab0fe465f637b'/>
<id>urn:sha1:cfd278c280f997cf2fe4662e0acab0fe465f637b</id>
<content type='text'>
Various places assume that if nfs4_fl_prepare_ds() turns a non-NULL 'ds',
then ds-&gt;ds_clp will also be non-NULL.

This is not necessasrily true in the case when the process received a fatal signal
while nfs4_pnfs_ds_connect is waiting in nfs4_wait_ds_connect().
In that case -&gt;ds_clp may not be set, and the devid may not recently have been marked
unavailable.

So add a test for ds_clp == NULL and return NULL in that case.

Fixes: c23266d532b4 ("NFS4.1 Fix data server connection race")
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Acked-by: Olga Kornievskaia &lt;aglo@umich.edu&gt;
Acked-by: Adamson, Andy &lt;William.Adamson@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Remove unused authflavour parameter from nfs_get_client()</title>
<updated>2016-12-01T22:46:32+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>Anna.Schumaker@Netapp.com</email>
</author>
<published>2016-11-17T20:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d38de3ffa75f92e7b00301dcdc6a3f9c53509ab'/>
<id>urn:sha1:7d38de3ffa75f92e7b00301dcdc6a3f9c53509ab</id>
<content type='text'>
This parameter hasn't been used since f8407299 (Linux 3.11-rc2), so
let's remove it from this function and callers.

Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4.1: Convert pNFS deviceid to use kfree_rcu()</title>
<updated>2015-03-27T16:32:24+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2015-03-09T19:23:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84a80f62f71beac20a426709c04b49f2bd352291'/>
<id>urn:sha1:84a80f62f71beac20a426709c04b49f2bd352291</id>
<content type='text'>
Use of synchronize_rcu() when unmounting and potentially freeing a lot
of deviceids is problematic. There really is no reason why we can't just
use kfree_rcu() here.

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