<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-20T16:36:26Z</updated>
<entry>
<title>pNFS: Fix uninited ptr deref in block/scsi layout</title>
<updated>2025-08-20T16:36:26Z</updated>
<author>
<name>Sergey Bashirov</name>
</author>
<published>2025-06-30T18:35:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94ec6d939031a616474376dadbf4a8d0ef8b0bcc'/>
<id>urn:sha1:94ec6d939031a616474376dadbf4a8d0ef8b0bcc</id>
<content type='text'>
[ Upstream commit 9768797c219326699778fba9cd3b607b2f1e7950 ]

The error occurs on the third attempt to encode extents. When function
ext_tree_prepare_commit() reallocates a larger buffer to retry encoding
extents, the "layoutupdate_pages" page array is initialized only after the
retry loop. But ext_tree_free_commitdata() is called on every iteration
and tries to put pages in the array, thus dereferencing uninitialized
pointers.

An additional problem is that there is no limit on the maximum possible
buffer_size. When there are too many extents, the client may create a
layoutcommit that is larger than the maximum possible RPC size accepted
by the server.

During testing, we observed two typical scenarios. First, one memory page
for extents is enough when we work with small files, append data to the
end of the file, or preallocate extents before writing. But when we fill
a new large file without preallocating, the number of extents can be huge,
and counting the number of written extents in ext_tree_encode_commit()
does not help much. Since this number increases even more between
unlocking and locking of ext_tree, the reallocated buffer may not be
large enough again and again.

Co-developed-by: Konstantin Evtushenko &lt;koevtushenko@yandex.com&gt;
Signed-off-by: Konstantin Evtushenko &lt;koevtushenko@yandex.com&gt;
Signed-off-by: Sergey Bashirov &lt;sergeybashirov@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20250630183537.196479-2-sergeybashirov@gmail.com
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: Handle RPC size limit for layoutcommits</title>
<updated>2025-08-20T16:36:26Z</updated>
<author>
<name>Sergey Bashirov</name>
</author>
<published>2025-06-30T18:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=484c055316dc5a7d9962a0c1e45d82f6176cc237'/>
<id>urn:sha1:484c055316dc5a7d9962a0c1e45d82f6176cc237</id>
<content type='text'>
[ Upstream commit d897d81671bc4615c80f4f3bd5e6b218f59df50c ]

When there are too many block extents for a layoutcommit, they may not
all fit into the maximum-sized RPC. This patch allows the generic pnfs
code to properly handle -ENOSPC returned by the block/scsi layout driver
and trigger additional layoutcommits if necessary.

Co-developed-by: Konstantin Evtushenko &lt;koevtushenko@yandex.com&gt;
Signed-off-by: Konstantin Evtushenko &lt;koevtushenko@yandex.com&gt;
Signed-off-by: Sergey Bashirov &lt;sergeybashirov@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20250630183537.196479-5-sergeybashirov@gmail.com
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: Fix disk addr range check in block/scsi layout</title>
<updated>2025-08-20T16:36:26Z</updated>
<author>
<name>Sergey Bashirov</name>
</author>
<published>2025-07-02T13:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9be128b48285e45d63408a244a0beca60d399677'/>
<id>urn:sha1:9be128b48285e45d63408a244a0beca60d399677</id>
<content type='text'>
[ Upstream commit 7db6e66663681abda54f81d5916db3a3b8b1a13d ]

At the end of the isect translation, disc_addr represents the physical
disk offset. Thus, end calculated from disk_addr is also a physical disk
offset. Therefore, range checking should be done using map-&gt;disk_offset,
not map-&gt;start.

Signed-off-by: Sergey Bashirov &lt;sergeybashirov@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20250702133226.212537-1-sergeybashirov@gmail.com
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: Fix stripe mapping in block/scsi layout</title>
<updated>2025-08-20T16:36:26Z</updated>
<author>
<name>Sergey Bashirov</name>
</author>
<published>2025-07-01T12:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea0957e8c191f10941cff0faa7135871a1df14ee'/>
<id>urn:sha1:ea0957e8c191f10941cff0faa7135871a1df14ee</id>
<content type='text'>
[ Upstream commit 81438498a285759f31e843ac4800f82a5ce6521f ]

Because of integer division, we need to carefully calculate the
disk offset. Consider the example below for a stripe of 6 volumes,
a chunk size of 4096, and an offset of 70000.

chunk = div_u64(offset, dev-&gt;chunk_size) = 70000 / 4096 = 17
offset = chunk * dev-&gt;chunk_size = 17 * 4096 = 69632
disk_offset_wrong = div_u64(offset, dev-&gt;nr_children) = 69632 / 6 = 11605
disk_chunk = div_u64(chunk, dev-&gt;nr_children) = 17 / 6 = 2
disk_offset = disk_chunk * dev-&gt;chunk_size = 2 * 4096 = 8192

Signed-off-by: Sergey Bashirov &lt;sergeybashirov@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20250701122341.199112-1-sergeybashirov@gmail.com
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>NFS: Fix the setting of capabilities when automounting a new filesystem</title>
<updated>2025-08-20T16:35:44Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2025-08-03T21:31:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8ffee4abd8ec9d7a64d394e0306ae64ba139fd2'/>
<id>urn:sha1:a8ffee4abd8ec9d7a64d394e0306ae64ba139fd2</id>
<content type='text'>
commit b01f21cacde9f2878492cf318fee61bf4ccad323 upstream.

Capabilities cannot be inherited when we cross into a new filesystem.
They need to be reset to the minimal defaults, and then probed for
again.

Fixes: 54ceac451598 ("NFS: Share NFS superblocks per-protocol per-server per-FSID")
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Coddington &lt;bcodding@redhat.com&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>NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY</title>
<updated>2025-08-15T10:16:57Z</updated>
<author>
<name>Benjamin Coddington</name>
</author>
<published>2025-07-10T01:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4fbff6ce64c9961006eb475e1bda228663bc643a'/>
<id>urn:sha1:4fbff6ce64c9961006eb475e1bda228663bc643a</id>
<content type='text'>
[ Upstream commit 99765233ab42bf7a4950377ad7894dce8a5c0e60 ]

If the NFS client is doing writeback from a workqueue context, avoid using
__GFP_NORETRY for allocations if the task has set PF_MEMALLOC_NOIO or
PF_MEMALLOC_NOFS.  The combination of these flags makes memory allocation
failures much more likely.

We've seen those allocation failures show up when the loopback driver is
doing writeback from a workqueue to a file on NFS, where memory allocation
failure results in errors or corruption within the loopback device's
filesystem.

Suggested-by: Trond Myklebust &lt;trondmy@kernel.org&gt;
Fixes: 0bae835b63c5 ("NFS: Avoid writeback threads getting stuck in mempool_alloc()")
Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Reviewed-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Tested-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://lore.kernel.org/r/f83ac1155a4bc670f2663959a7a068571e06afd9.1752111622.git.bcodding@redhat.com
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>NFSv4.2: another fix for listxattr</title>
<updated>2025-08-15T10:16:57Z</updated>
<author>
<name>Olga Kornievskaia</name>
</author>
<published>2025-07-22T20:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab39f1080f16cfe09abc9a78bb975c21596598b6'/>
<id>urn:sha1:ab39f1080f16cfe09abc9a78bb975c21596598b6</id>
<content type='text'>
[ Upstream commit 9acb237deff7667b0f6b10fe6b1b70c4429ea049 ]

Currently, when the server supports NFS4.1 security labels then
security.selinux label in included twice. Instead, only add it
when the server doesn't possess security label support.

Fixes: 243fea134633 ("NFSv4.2: fix listxattr to return selinux security label")
Signed-off-by: Olga Kornievskaia &lt;okorniev@redhat.com&gt;
Link: https://lore.kernel.org/r/20250722205641.79394-1-okorniev@redhat.com
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>NFS: Fix filehandle bounds checking in nfs_fh_to_dentry()</title>
<updated>2025-08-15T10:16:57Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2025-07-22T13:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7f7866932466332a2528fda099000b035303485'/>
<id>urn:sha1:b7f7866932466332a2528fda099000b035303485</id>
<content type='text'>
[ Upstream commit ef93a685e01a281b5e2a25ce4e3428cf9371a205 ]

The function needs to check the minimal filehandle length before it can
access the embedded filehandle.

Reported-by: zhangjian &lt;zhangjian496@huawei.com&gt;
Fixes: 20fa19027286 ("nfs: add export operations")
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>NFS: Fix wakeup of __nfs_lookup_revalidate() in unblock_revalidate()</title>
<updated>2025-08-15T10:16:57Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2025-07-18T23:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8dcd54ea811f30b32e2aa45dc4f803f4668b3387'/>
<id>urn:sha1:8dcd54ea811f30b32e2aa45dc4f803f4668b3387</id>
<content type='text'>
[ Upstream commit 1db3a48e83bb64a70bf27263b7002585574a9c2d ]

Use store_release_wake_up() to add the appropriate memory barrier before
calling wake_up_var(&amp;dentry-&gt;d_fsdata).

Reported-by: Lukáš Hejtmánek&lt;xhejtman@ics.muni.cz&gt;
Suggested-by: Santosh Pradhan &lt;santosh.pradhan@gmail.com&gt;
Link: https://lore.kernel.org/all/18945D18-3EDB-4771-B019-0335CE671077@ics.muni.cz/
Fixes: 99bc9f2eb3f7 ("NFS: add barriers when testing for NFS_FSDATA_BLOCKED")
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: don't attempt pnfs on fatal DS errors</title>
<updated>2025-08-15T10:16:57Z</updated>
<author>
<name>Tigran Mkrtchyan</name>
</author>
<published>2025-06-27T07:17:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ccc3006914bfc8080aa615a8583c4a91f598d267'/>
<id>urn:sha1:ccc3006914bfc8080aa615a8583c4a91f598d267</id>
<content type='text'>
[ Upstream commit f06bedfa62d57f7b67d44aacd6badad2e13a803f ]

When an applications get killed (SIGTERM/SIGINT) while pNFS client performs a connection
to DS, client ends in an infinite loop of connect-disconnect. This
source of the issue, it that flexfilelayoutdev#nfs4_ff_layout_prepare_ds gets an error
on nfs4_pnfs_ds_connect with status ERESTARTSYS, which is set by rpc_signal_task, but
the error is treated as transient, thus retried.

The issue is reproducible with Ctrl+C the following script(there should be ~1000 files in
a directory, client should must not have any connections to DSes):

```
echo 3 &gt; /proc/sys/vm/drop_caches

for i in *
do
   head -1 $i
done
```

The change aims to propagate the nfs4_ff_layout_prepare_ds error state
to the caller that can decide whatever this is a retryable error or not.

Signed-off-by: Tigran Mkrtchyan &lt;tigran.mkrtchyan@desy.de&gt;
Link: https://lore.kernel.org/r/20250627071751.189663-1-tigran.mkrtchyan@desy.de
Fixes: 260f32adb88d ("pNFS/flexfiles: Check the result of nfs4_pnfs_ds_connect")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
