<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/flexfilelayout, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-10-10T19:44:56Z</updated>
<entry>
<title>NFS/pNFS: Report EINVAL errors from connect() to the server</title>
<updated>2023-10-10T19:44:56Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2023-09-04T16:43:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8140078096adc7475baef9594b933331408cb00'/>
<id>urn:sha1:a8140078096adc7475baef9594b933331408cb00</id>
<content type='text'>
[ Upstream commit dd7d7ee3ba2a70d12d02defb478790cf57d5b87b ]

With IPv6, connect() can occasionally return EINVAL if a route is
unavailable. If this happens during I/O to a data server, we want to
report it using LAYOUTERROR as an inability to connect.

Fixes: dd52128afdde ("NFSv4.1/pnfs Ensure flexfiles reports all connection related errors")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds</title>
<updated>2021-11-26T10:36:14Z</updated>
<author>
<name>Baptiste Lepers</name>
</author>
<published>2021-09-06T01:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e311fcf4d408e8318cb3367042ec17580690dd88'/>
<id>urn:sha1:e311fcf4d408e8318cb3367042ec17580690dd88</id>
<content type='text'>
[ Upstream commit a2915fa06227b056a8f9b0d79b61dca08ad5cfc6 ]

_nfs4_pnfs_v3/v4_ds_connect do
   some work
   smp_wmb
   ds-&gt;ds_clp = clp;

And nfs4_ff_layout_prepare_ds currently does
   smp_rmb
   if(ds-&gt;ds_clp)
      ...

This patch places the smp_rmb after the if. This ensures that following
reads only happen once nfs4_ff_layout_prepare_ds has checked that data
has been properly initialized.

Fixes: d67ae825a59d6 ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Baptiste Lepers &lt;baptiste.lepers@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()</title>
<updated>2021-05-22T08:59:43Z</updated>
<author>
<name>Nikola Livic</name>
</author>
<published>2021-03-29T08:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f27638a92f77d8107efbaf48a0d3bfa24da8cdad'/>
<id>urn:sha1:f27638a92f77d8107efbaf48a0d3bfa24da8cdad</id>
<content type='text'>
[ Upstream commit ed34695e15aba74f45247f1ee2cf7e09d449f925 ]

We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:

	if (fh-&gt;size &gt; sizeof(struct nfs_fh))

should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.

struct nfs_fh {
	unsigned short         size;
	unsigned char          data[NFS_MAXFHSIZE];
}

but should determine the size from data[NFS_MAXFHSIZE] so the memcpy
will not write 2 bytes beyond destination.  The proposed fix is to
compare against the NFS_MAXFHSIZE directly, as is done elsewhere in fs
code base.

Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Nikola Livic &lt;nlivic@gmail.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pNFS/flexfiles: Fix list corruption if the mirror count changes</title>
<updated>2020-07-01T03:17:18Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2020-06-22T19:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6efe9b152c5188cd2fcd817b7edf73c5dcccc20'/>
<id>urn:sha1:e6efe9b152c5188cd2fcd817b7edf73c5dcccc20</id>
<content type='text'>
commit 8b04013737341442ed914b336cde866b902664ae upstream.

If the mirror count changes in the new layout we pick up inside
ff_layout_pg_init_write(), then we can end up adding the
request to the wrong mirror and corrupting the mirror-&gt;pg_list.

Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()</title>
<updated>2020-01-27T13:50:29Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2019-02-26T16:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ed8e8f6844dc84ba115c732f5e04c5e8c257422'/>
<id>urn:sha1:9ed8e8f6844dc84ba115c732f5e04c5e8c257422</id>
<content type='text'>
[ Upstream commit 108bb4afd351d65826648a47f11fa3104e250d9b ]

If the attempt to instantiate the mirror's layout DS pointer failed,
then that pointer may hold a value of type ERR_PTR(), so we need
to check that before we dereference it.

Fixes: 65990d1afbd2d ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error</title>
<updated>2019-07-26T07:14:22Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2019-07-17T17:57:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=603e7497bf275ef3766bb55323a23235dc0f0dfa'/>
<id>urn:sha1:603e7497bf275ef3766bb55323a23235dc0f0dfa</id>
<content type='text'>
commit 8e04fdfadda75a849c649f7e50fe7d97772e1fcb upstream.

mirror-&gt;mirror_ds can be NULL if uninitialised, but can contain
a PTR_ERR() if call to GETDEVICEINFO failed.

Fixes: 65990d1afbd2 ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Cc: stable@vger.kernel.org # 4.10+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFS/flexfiles: Use the correct TCP timeout for flexfiles I/O</title>
<updated>2019-07-03T11:14:46Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2019-06-25T20:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27380331755f1b17a49cb3d2c7db43d10ec8749a'/>
<id>urn:sha1:27380331755f1b17a49cb3d2c7db43d10ec8749a</id>
<content type='text'>
commit 68f461593f76bd5f17e87cdd0bea28f4278c7268 upstream.

Fix a typo where we're confusing the default TCP retrans value
(NFS_DEF_TCP_RETRANS) for the default TCP timeout value.

Fixes: 15d03055cf39f ("pNFS/flexfiles: Set reasonable default ...")
Cc: stable@vger.kernel.org # 4.8+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>flexfiles: enforce per-mirror stateid only for v4 DSes</title>
<updated>2018-12-17T08:24:41Z</updated>
<author>
<name>Tigran Mkrtchyan</name>
</author>
<published>2018-11-26T17:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=111758f73595528e4f9f51b54cca27470d130e08'/>
<id>urn:sha1:111758f73595528e4f9f51b54cca27470d130e08</id>
<content type='text'>
commit 320f35b7bf8cccf1997ca3126843535e1b95e9c4 upstream.

Since commit bb21ce0ad227 we always enforce per-mirror stateid.
However, this makes sense only for v4+ servers.

Signed-off-by: Tigran Mkrtchyan &lt;tigran.mkrtchyan@desy.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>flexfiles: use per-mirror specified stateid for IO</title>
<updated>2018-12-13T08:16:14Z</updated>
<author>
<name>Tigran Mkrtchyan</name>
</author>
<published>2018-11-21T11:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a98c7c5dc62ab24c6a03063a507cfec8e23f9d8'/>
<id>urn:sha1:0a98c7c5dc62ab24c6a03063a507cfec8e23f9d8</id>
<content type='text'>
[ Upstream commit bb21ce0ad227b69ec0f83279297ee44232105d96 ]

rfc8435 says:

  For tight coupling, ffds_stateid provides the stateid to be used by
  the client to access the file.

However current implementation replaces per-mirror provided stateid with
by open or lock stateid.

Ensure that per-mirror stateid is used by ff_layout_write_prepare_v4 and
nfs4_ff_layout_prepare_ds.

Signed-off-by: Tigran Mkrtchyan &lt;tigran.mkrtchyan@desy.de&gt;
Signed-off-by: Rick Macklem &lt;rmacklem@uoguelph.ca&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pNFS/flexfiles: ff_layout_pg_init_read should exit on error</title>
<updated>2018-08-21T17:39:05Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2018-08-21T14:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c1aeaf1432f51b57341741dcb76a3825d63a168'/>
<id>urn:sha1:1c1aeaf1432f51b57341741dcb76a3825d63a168</id>
<content type='text'>
If we get an error while retrieving the layout, then we should
report it rather than falling back to I/O through the MDS.

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