<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/flexfilelayout, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-22T08:38:28Z</updated>
<entry>
<title>pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()</title>
<updated>2021-05-22T08:38:28Z</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=0c5ccd5e2a2e291774618c24c459fa397fd1b7da'/>
<id>urn:sha1:0c5ccd5e2a2e291774618c24c459fa397fd1b7da</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-06-30T00:08:04Z</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=6791042e833cbaf1de5159140c56d7efb495de8f'/>
<id>urn:sha1:6791042e833cbaf1de5159140c56d7efb495de8f</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>NFS41: pop some layoutget errors to application</title>
<updated>2019-03-23T07:44:38Z</updated>
<author>
<name>Peng Tao</name>
</author>
<published>2015-12-03T18:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58cc0b4098d342ed0d12050d97ce021c387b140e'/>
<id>urn:sha1:58cc0b4098d342ed0d12050d97ce021c387b140e</id>
<content type='text'>
commit d600ad1f2bdbf97c4818dcc85b174f72c90c21bd upstream.

For ERESTARTSYS/EIO/EROFS/ENOSPC/E2BIG in layoutget, we
should just bail out instead of hiding the error and
retrying inband IO.

Change all the call sites to pop the error all the way up.

Signed-off-by: Peng Tao &lt;tao.peng@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()</title>
<updated>2018-04-13T17:50:10Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2017-05-19T21:31:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f3e50a54b188798cf07916ea5eb28c98a89f8c7'/>
<id>urn:sha1:9f3e50a54b188798cf07916ea5eb28c98a89f8c7</id>
<content type='text'>
[ Upstream commit 662f9a105b4322b8559d448f86110e6ec24b8738 ]

If xdr_inline_decode() fails then we end up returning ERR_PTR(0).  The
caller treats NULL returns as -ENOMEM so it doesn't really hurt runtime,
but obviously we intended to set an error code here.

Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays</title>
<updated>2017-08-16T20:40:28Z</updated>
<author>
<name>Weston Andros Adamson</name>
</author>
<published>2017-08-01T20:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a89843a80bd4cf348a69eaae21baa797ee620345'/>
<id>urn:sha1:a89843a80bd4cf348a69eaae21baa797ee620345</id>
<content type='text'>
commit 1feb26162bee7b2f110facfec71b5c7bdbc7d14d upstream.

The client was freeing the nfs4_ff_layout_ds, but not the contained
nfs4_ff_ds_version array.

Signed-off-by: Weston Andros Adamson &lt;dros@primarydata.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>pNFS/flexfiles: Fix layoutcommit after a commit to DS</title>
<updated>2016-10-07T13:23:45Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2016-06-26T16:39:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3039eb4d8ac5074ee95d68ac2b5f5b48ae59db29'/>
<id>urn:sha1:3039eb4d8ac5074ee95d68ac2b5f5b48ae59db29</id>
<content type='text'>
commit c001c87a63aa2f35358e33eb05e45e4cbcb34f54 upstream.

We should always do a layoutcommit after commit to DS, except if
the layout segment we're using has set FF_FLAGS_NO_LAYOUTCOMMIT.

Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn</title>
<updated>2016-02-25T20:01:18Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2016-01-21T20:39:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66b8812e87f3fcf9d52b107a8d3102cd3f77ae1e'/>
<id>urn:sha1:66b8812e87f3fcf9d52b107a8d3102cd3f77ae1e</id>
<content type='text'>
commit 082fa37d1351a41afc491d44a1d095cb8d919aa2 upstream.

We must not skip encoding the statistics, or the server will see an
XDR encoding error.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()</title>
<updated>2016-02-25T20:01:18Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-12-30T15:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8841e15d6ded83aac4da7caf70a20d3c58bf6fe'/>
<id>urn:sha1:c8841e15d6ded83aac4da7caf70a20d3c58bf6fe</id>
<content type='text'>
commit 86fb449b07b8215443a30782dca5755d5b8b0577 upstream.

Jeff reports seeing an Oops in ff_layout_alloc_lseg. Turns out
copy+paste has played cruel tricks on a nested loop.

Reported-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS</title>
<updated>2015-11-02T18:50:37Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-11-02T14:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=260074cd8413489903d4484058e61649d6e08580'/>
<id>urn:sha1:260074cd8413489903d4484058e61649d6e08580</id>
<content type='text'>
For loosely coupled pNFS/flexfiles systems, there is often no advantage
at all in going through the MDS for I/O, since the MDS is subject to
the same limitations as all other clients when talking to DSes. If a
DS is unresponsive, I/O through the MDS will fail.

For such systems, the only scalable solution is to have the pNFS clients
retry doing pNFS, and so the protocol now provides a flag that allows
the pNFS server to signal this.

If LAYOUTGET returns FF_FLAGS_NO_IO_THRU_MDS, then we should assume that
the MDS wants the client to retry using these devices, even if they were
previously marked as being unavailable. To do so, we add a helper,
ff_layout_mark_devices_valid() that will be called from layoutget.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>pNFS/flexfiles: When mirrored, retry failed reads by switching mirrors</title>
<updated>2015-11-02T18:50:35Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-11-02T15:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=135444126a1175912b43366f6109cb297018f034'/>
<id>urn:sha1:135444126a1175912b43366f6109cb297018f034</id>
<content type='text'>
If the pNFS/flexfiles file is mirrored, and a read to one mirror fails,
then we should bump the mirror index, so that we retry to a different
mirror. Once we've iterated through all mirrors and all failed, we can
return the layout and issue a new LAYOUTGET.

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