<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/fs/nfs/filelayout, branch master</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2019-09-24T20:28:38+00:00</updated>
<entry>
<title>pNFS/filelayout: enable LAYOUTGET on OPEN</title>
<updated>2019-09-24T20:28:38+00:00</updated>
<author>
<name>Olga Kornievskaia</name>
<email>kolga@netapp.com</email>
</author>
<published>2019-09-10T21:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=a8fd0feeca35cb8f9ddd950191f4aeb777f52f89'/>
<id>urn:sha1:a8fd0feeca35cb8f9ddd950191f4aeb777f52f89</id>
<content type='text'>
Add the flag to the filelayout driver to add LAYOUTGET to
the OPEN compound.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PNFS fallback to MDS if no deviceid found</title>
<updated>2019-05-09T20:24:56+00:00</updated>
<author>
<name>Olga Kornievskaia</name>
<email>kolga@netapp.com</email>
</author>
<published>2019-05-07T17:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=b1029c9bc078a6f1515f55dd993b507dcc7e3440'/>
<id>urn:sha1:b1029c9bc078a6f1515f55dd993b507dcc7e3440</id>
<content type='text'>
If we fail to find a good deviceid while trying to pnfs instead of
propogating an error back fallback to doing IO to the MDS. Currently,
code with fals the IO with EINVAL.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Fixes: 8d40b0f14846f ("NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes"
Cc: stable@vger.kernel.org # v4.11+
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Add a helper to return a pointer to the open context of a struct nfs_page</title>
<updated>2019-04-25T18:18:15+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trondmy@gmail.com</email>
</author>
<published>2019-04-07T17:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=9fcd5960e88bbdc74a70d9e3a5ab46b489fc4b80'/>
<id>urn:sha1:9fcd5960e88bbdc74a70d9e3a5ab46b489fc4b80</id>
<content type='text'>
Add a helper for when we remove the explicit pointer to the open
context.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>pNFS: Don't allocate more pages than we need to fit a layoutget response</title>
<updated>2018-09-30T19:35:16+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@hammerspace.com</email>
</author>
<published>2018-09-03T17:12:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=28ced9a84cd2f9fc68a081fb3b34e70c5d459be3'/>
<id>urn:sha1:28ced9a84cd2f9fc68a081fb3b34e70c5d459be3</id>
<content type='text'>
For the 'files' and 'flexfiles' layout types, we do not expect the reply
to be any larger than 4k. The block and scsi layout types are a little more
greedy, so we keep allocating the maximum response size for now.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfs41: do not return ENOMEM on LAYOUTUNAVAILABLE</title>
<updated>2018-01-18T17:51:31+00:00</updated>
<author>
<name>Tigran Mkrtchyan</name>
<email>tigran.mkrtchyan@desy.de</email>
</author>
<published>2018-01-16T21:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=7ff4cff637aa0bd2abbd81f53b2a6206c50afd95'/>
<id>urn:sha1:7ff4cff637aa0bd2abbd81f53b2a6206c50afd95</id>
<content type='text'>
A pNFS server may return LAYOUTUNAVAILABLE error on LAYOUTGET for files
which don't have any layout. In this situation pnfs_update_layout
currently returns NULL. As this NULL is converted into ENOMEM, IO
requests fails instead of falling back to MDS.

Do not return ENOMEM on LAYOUTUNAVAILABLE and let client retry through
MDS.

Fixes 8d40b0f14846f. I will suggest to backport this fix to affected
stable branches.

Signed-off-by: Tigran Mkrtchyan &lt;tigran.mkrtchyan@desy.de&gt;
[trondmy: Use IS_ERR_OR_NULL()]
Fixes: 8d40b0f14846 ("NFS filelayout:call GETDEVICEINFO after...")
Cc: stable@vger.kernel.org # v4.11+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>fs, nfs: convert nfs_client.cl_count from atomic_t to refcount_t</title>
<updated>2017-11-17T18:48:01+00:00</updated>
<author>
<name>Elena Reshetova</name>
<email>elena.reshetova@intel.com</email>
</author>
<published>2017-10-20T09:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=212bf41d88c06afc23e03f9b274eebf1e8dba197'/>
<id>urn:sha1:212bf41d88c06afc23e03f9b274eebf1e8dba197</id>
<content type='text'>
atomic_t variables are currently used to implement reference
counters with the following properties:
 - counter is initialized to 1 using atomic_set()
 - a resource is freed upon counter reaching zero
 - once counter reaches zero, its further
   increments aren't allowed
 - counter schema uses basic atomic operations
   (set, inc, inc_not_zero, dec_and_test, etc.)

Such atomic variables should be converted to a newly provided
refcount_t type and API that prevents accidental counter overflows
and underflows. This is important since overflows and underflows
can lead to use-after-free situation and be exploitable.

The variable nfs_client.cl_count is used as pure reference counter.
Convert it to refcount_t and fix up the operations.

Suggested-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: David Windsor &lt;dwindsor@gmail.com&gt;
Reviewed-by: Hans Liljestrand &lt;ishkamiel@gmail.com&gt;
Signed-off-by: Elena Reshetova &lt;elena.reshetova@intel.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>nfs/filelayout: fix oops when freeing filelayout segment</title>
<updated>2017-10-01T22:51:30+00:00</updated>
<author>
<name>Scott Mayhew</name>
<email>smayhew@redhat.com</email>
</author>
<published>2017-09-29T13:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=0a47df11bfc31e1ceae7f91cea84d3bff500475d'/>
<id>urn:sha1:0a47df11bfc31e1ceae7f91cea84d3bff500475d</id>
<content type='text'>
Check for a NULL dsaddr in filelayout_free_lseg() before calling
nfs4_fl_put_deviceid().  This fixes the following oops:

[ 1967.645207] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
[ 1967.646010] IP: [&lt;ffffffffc06d6aea&gt;] nfs4_put_deviceid_node+0xa/0x90 [nfsv4]
[ 1967.646010] PGD c08bc067 PUD 915d3067 PMD 0
[ 1967.753036] Oops: 0000 [#1] SMP
[ 1967.753036] Modules linked in: nfs_layout_nfsv41_files ext4 mbcache jbd2 loop rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache amd64_edac_mod ipmi_ssif edac_mce_amd edac_core kvm_amd sg kvm ipmi_si ipmi_devintf irqbypass pcspkr k8temp ipmi_msghandler i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common amdkfd amd_iommu_v2 radeon i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops mptsas ttm scsi_transport_sas mptscsih drm mptbase serio_raw i2c_core bnx2 dm_mirror dm_region_hash dm_log dm_mod
[ 1967.790031] CPU: 2 PID: 1370 Comm: ls Not tainted 3.10.0-709.el7.test.bz1463784.x86_64 #1
[ 1967.790031] Hardware name: IBM BladeCenter LS21 -[7971AC1]-/Server Blade, BIOS -[BAE155AUS-1.10]- 06/03/2009
[ 1967.790031] task: ffff8800c42a3f40 ti: ffff8800c4064000 task.ti: ffff8800c4064000
[ 1967.790031] RIP: 0010:[&lt;ffffffffc06d6aea&gt;]  [&lt;ffffffffc06d6aea&gt;] nfs4_put_deviceid_node+0xa/0x90 [nfsv4]
[ 1967.790031] RSP: 0000:ffff8800c4067978  EFLAGS: 00010246
[ 1967.790031] RAX: ffffffffc062f000 RBX: ffff8801d468a540 RCX: dead000000000200
[ 1967.790031] RDX: ffff8800c40679f8 RSI: ffff8800c4067a0c RDI: 0000000000000000
[ 1967.790031] RBP: ffff8800c4067980 R08: ffff8801d468a540 R09: 0000000000000000
[ 1967.790031] R10: 0000000000000000 R11: ffffffffffffffff R12: ffff8801d468a540
[ 1967.790031] R13: ffff8800c40679f8 R14: ffff8801d5645300 R15: ffff880126f15ff0
[ 1967.790031] FS:  00007f11053c9800(0000) GS:ffff88012bd00000(0000) knlGS:0000000000000000
[ 1967.790031] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1967.790031] CR2: 0000000000000030 CR3: 0000000094b55000 CR4: 00000000000007e0
[ 1967.790031] Stack:
[ 1967.790031]  ffff8801d468a540 ffff8800c4067990 ffffffffc062d2fe ffff8800c40679b0
[ 1967.790031]  ffffffffc062b5b4 ffff8800c40679f8 ffff8801d468a540 ffff8800c40679d8
[ 1967.790031]  ffffffffc06d39af ffff8800c40679f8 ffff880126f16078 0000000000000001
[ 1967.790031] Call Trace:
[ 1967.790031]  [&lt;ffffffffc062d2fe&gt;] nfs4_fl_put_deviceid+0xe/0x10 [nfs_layout_nfsv41_files]
[ 1967.790031]  [&lt;ffffffffc062b5b4&gt;] filelayout_free_lseg+0x24/0x90 [nfs_layout_nfsv41_files]
[ 1967.790031]  [&lt;ffffffffc06d39af&gt;] pnfs_free_lseg_list+0x5f/0x80 [nfsv4]
[ 1967.790031]  [&lt;ffffffffc06d5a67&gt;] _pnfs_return_layout+0x157/0x270 [nfsv4]
[ 1967.790031]  [&lt;ffffffffc06c17dd&gt;] nfs4_evict_inode+0x4d/0x70 [nfsv4]
[ 1967.790031]  [&lt;ffffffff8121de19&gt;] evict+0xa9/0x180
[ 1967.790031]  [&lt;ffffffff8121e729&gt;] iput+0xf9/0x190
[ 1967.790031]  [&lt;ffffffffc0652cea&gt;] nfs_dentry_iput+0x3a/0x50 [nfs]
[ 1967.790031]  [&lt;ffffffff8121ab4f&gt;] shrink_dentry_list+0x20f/0x490
[ 1967.790031]  [&lt;ffffffff8121b018&gt;] d_invalidate+0xd8/0x150
[ 1967.790031]  [&lt;ffffffffc065446b&gt;] nfs_readdir_page_filler+0x40b/0x600 [nfs]
[ 1967.790031]  [&lt;ffffffffc0654bbd&gt;] nfs_readdir_xdr_to_array+0x20d/0x3b0 [nfs]
[ 1967.790031]  [&lt;ffffffff811f3482&gt;] ? __mem_cgroup_commit_charge+0xe2/0x2f0
[ 1967.790031]  [&lt;ffffffff81183208&gt;] ? __add_to_page_cache_locked+0x48/0x170
[ 1967.790031]  [&lt;ffffffffc0654d60&gt;] ? nfs_readdir_xdr_to_array+0x3b0/0x3b0 [nfs]
[ 1967.790031]  [&lt;ffffffffc0654d82&gt;] nfs_readdir_filler+0x22/0x90 [nfs]
[ 1967.790031]  [&lt;ffffffff8118351f&gt;] do_read_cache_page+0x7f/0x190
[ 1967.790031]  [&lt;ffffffff81215d30&gt;] ? fillonedir+0xe0/0xe0
[ 1967.790031]  [&lt;ffffffff8118366c&gt;] read_cache_page+0x1c/0x30
[ 1967.790031]  [&lt;ffffffffc0654f9b&gt;] nfs_readdir+0x1ab/0x6b0 [nfs]
[ 1967.790031]  [&lt;ffffffffc06bd1c0&gt;] ? nfs4_xdr_dec_layoutget+0x270/0x270 [nfsv4]
[ 1967.790031]  [&lt;ffffffff81215d30&gt;] ? fillonedir+0xe0/0xe0
[ 1967.790031]  [&lt;ffffffff81215c20&gt;] vfs_readdir+0xb0/0xe0
[ 1967.790031]  [&lt;ffffffff81216045&gt;] SyS_getdents+0x95/0x120
[ 1967.790031]  [&lt;ffffffff816b9449&gt;] system_call_fastpath+0x16/0x1b
[ 1967.790031] Code: 90 31 d2 48 89 d0 5d c3 85 f6 74 f5 8d 4e 01 89 f0 f0 0f b1 0f 39 f0 74 e2 89 c6 eb eb 0f 1f 40 00 66 66 66 66 90 55 48 89 e5 53 &lt;48&gt; 8b 47 30 48 89 fb a8 04 74 3b 8b 57 60 83 fa 02 74 19 8d 4a
[ 1967.790031] RIP  [&lt;ffffffffc06d6aea&gt;] nfs4_put_deviceid_node+0xa/0x90 [nfsv4]
[ 1967.790031]  RSP &lt;ffff8800c4067978&gt;
[ 1967.790031] CR2: 0000000000000030

Signed-off-by: Scott Mayhew &lt;smayhew@redhat.com&gt;
Fixes: 1ebf98012792 ("NFS/filelayout: Fix racy setting of fl-&gt;dsaddr...")
Cc: stable@vger.kernel.org # v4.13+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS/filelayout: Fix racy setting of fl-&gt;dsaddr in filelayout_check_deviceid()</title>
<updated>2017-07-21T18:08:45+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2017-07-20T21:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=1ebf980127924c639e2b85c08468311ba1c95b70'/>
<id>urn:sha1:1ebf980127924c639e2b85c08468311ba1c95b70</id>
<content type='text'>
We must set fl-&gt;dsaddr once, and once only, even if there are multiple
processes calling filelayout_check_deviceid() for the same layout
segment.

Reported-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>PNFS for stateid errors retry against MDS first</title>
<updated>2017-07-13T20:00:08+00:00</updated>
<author>
<name>Olga Kornievskaia</name>
<email>kolga@netapp.com</email>
</author>
<published>2017-06-23T14:26:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=22368ff11d72eb06051f9b51abbc6842496c2d3a'/>
<id>urn:sha1:22368ff11d72eb06051f9b51abbc6842496c2d3a</id>
<content type='text'>
Upon receiving a stateid error such as BAD_STATEID, the client
should retry the operation against the MDS before deciding to
do stateid recovery.

Previously, the code would initiate state recovery and it could
lead to a race in a state manager that could chose an incorrect
recovery method which would lead to the EIO failure for the
application.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
</feed>
