<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/nfs/blocklayout, 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>2026-01-05T04:03:25+00:00</updated>
<entry>
<title>pnfs/blocklayout: Fix memory leak in bl_parse_scsi()</title>
<updated>2026-01-05T04:03:25+00:00</updated>
<author>
<name>Zilin Guan</name>
<email>zilin@seu.edu.cn</email>
</author>
<published>2025-12-25T08:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a74af51c3a6f4cd22c128b0c1c019f68fa90011'/>
<id>urn:sha1:5a74af51c3a6f4cd22c128b0c1c019f68fa90011</id>
<content type='text'>
In bl_parse_scsi(), if the block device length is zero, the function
returns immediately without releasing the file reference obtained via
bl_open_path(), leading to a memory leak.

Fix this by jumping to the out_blkdev_put label to ensure the file
reference is properly released.

Fixes: d76c769c8db4c ("pnfs/blocklayout: Don't add zero-length pnfs_block_dev")
Signed-off-by: Zilin Guan &lt;zilin@seu.edu.cn&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Update the blocklayout 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-30T16:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf289099ab8a1f4369415ea6c8fb4c39ab2173ca'/>
<id>urn:sha1:cf289099ab8a1f4369415ea6c8fb4c39ab2173ca</id>
<content type='text'>
Signed-off-by: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-6.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2025-08-09T04:20:44+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-08-09T04:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ccc1ead23c3311be76e87d1b06620f6cb697b42a'/>
<id>urn:sha1:ccc1ead23c3311be76e87d1b06620f6cb697b42a</id>
<content type='text'>
Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable fixes:
   - don't inherit NFS filesystem capabilities when crossing from one
     filesystem to another

  Bugfixes:
   - NFS wakeup of __nfs_lookup_revalidate() needs memory barriers
   - NFS improve bounds checking in nfs_fh_to_dentry()
   - NFS Fix allocation errors when writing to a NFS file backed
     loopback device
   - NFSv4: More listxattr fixes
   - SUNRPC: fix client handling of TLS alerts
   - pNFS block/scsi layout fix for an uninitialised pointer
     dereference
   - pNFS block/scsi layout fixes for the extent encoding, stripe
     mapping, and disk offset overflows
   - pNFS layoutcommit work around for RPC size limitations
   - pNFS/flexfiles avoid looping when handling fatal errors after
     layoutget
   - localio: fix various race conditions

  Features and cleanups:
   - Add NFSv4 support for retrieving the btime
   - NFS: Allow folio migration for the case of mode == MIGRATE_SYNC
   - NFS: Support using a kernel keyring to store TLS certificates
   - NFSv4: Speed up delegation lookup using a hash table
   - Assorted cleanups to remove unused variables and struct fields
   - Assorted new tracepoints to improve debugging"

* tag 'nfs-for-6.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (44 commits)
  NFS/localio: nfs_uuid_put() fix the wake up after unlinking the file
  NFS/localio: nfs_uuid_put() fix races with nfs_open/close_local_fh()
  NFS/localio: nfs_close_local_fh() fix check for file closed
  NFSv4: Remove duplicate lookups, capability probes and fsinfo calls
  NFS: Fix the setting of capabilities when automounting a new filesystem
  sunrpc: fix client side handling of tls alerts
  nfs/localio: use read_seqbegin() rather than read_seqbegin_or_lock()
  NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY
  NFSv4.2: another fix for listxattr
  NFS: Fix filehandle bounds checking in nfs_fh_to_dentry()
  SUNRPC: Silence warnings about parameters not being described
  NFS: Clean up pnfs_put_layout_hdr()/pnfs_destroy_layout_final()
  NFS: Fix wakeup of __nfs_lookup_revalidate() in unblock_revalidate()
  NFS: use a hash table for delegation lookup
  NFS: track active delegations per-server
  NFS: move the delegation_watermark module parameter
  NFS: cleanup nfs_inode_reclaim_delegation
  NFS: cleanup error handling in nfs4_server_common_setup
  pNFS/flexfiles: don't attempt pnfs on fatal DS errors
  NFS: drop __exit from nfs_exit_keyring
  ...
</content>
</entry>
<entry>
<title>pNFS: Fix disk addr range check in block/scsi layout</title>
<updated>2025-07-14T22:20:28+00:00</updated>
<author>
<name>Sergey Bashirov</name>
<email>sergeybashirov@gmail.com</email>
</author>
<published>2025-07-02T13:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7db6e66663681abda54f81d5916db3a3b8b1a13d'/>
<id>urn:sha1:7db6e66663681abda54f81d5916db3a3b8b1a13d</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>pNFS: Fix stripe mapping in block/scsi layout</title>
<updated>2025-07-14T22:20:28+00:00</updated>
<author>
<name>Sergey Bashirov</name>
<email>sergeybashirov@gmail.com</email>
</author>
<published>2025-07-01T12:21:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81438498a285759f31e843ac4800f82a5ce6521f'/>
<id>urn:sha1:81438498a285759f31e843ac4800f82a5ce6521f</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>pNFS: Add prepare commit trace to block/scsi layout</title>
<updated>2025-07-14T22:20:28+00:00</updated>
<author>
<name>Sergey Bashirov</name>
<email>sergeybashirov@gmail.com</email>
</author>
<published>2025-06-30T18:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66642bbee595e5fa8fc4ce7c8706c3697da239fe'/>
<id>urn:sha1:66642bbee595e5fa8fc4ce7c8706c3697da239fe</id>
<content type='text'>
Replace dprintk with trace event in ext_tree_prepare_commit() function.

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-4-sergeybashirov@gmail.com
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>pNFS: Fix extent encoding in block/scsi layout</title>
<updated>2025-07-14T22:20:28+00:00</updated>
<author>
<name>Sergey Bashirov</name>
<email>sergeybashirov@gmail.com</email>
</author>
<published>2025-06-30T18:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d84c4754f8740915da9977a282f72a3b2b0e0ac9'/>
<id>urn:sha1:d84c4754f8740915da9977a282f72a3b2b0e0ac9</id>
<content type='text'>
The ext_tree_encode_commit() function may be called multiple times for
the same file, layout, and last written byte if the provided buffer is
not large enough to encode all extents in it.

The first problem is that the last written byte field must be zeroed
only on a successful call, otherwise we will lose its actual value and
get an integer overflow on the next encoding attempt.

The second problem is that we can't count and encode in one pass. The
extent state changes during encoding, so if we return -ENOSPC but have
already encoded some extents into a small buffer, they will not be
re-encoded into a new larger buffer on the next try. As a result, the
client never commits these extents to the server.

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-3-sergeybashirov@gmail.com
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>pNFS: Fix uninited ptr deref in block/scsi layout</title>
<updated>2025-07-14T22:20:28+00:00</updated>
<author>
<name>Sergey Bashirov</name>
<email>sergeybashirov@gmail.com</email>
</author>
<published>2025-06-30T18:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9768797c219326699778fba9cd3b607b2f1e7950'/>
<id>urn:sha1:9768797c219326699778fba9cd3b607b2f1e7950</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpc_mkpipe_dentry(): saner calling conventions</title>
<updated>2025-07-03T02:44:55+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-02-20T07:41:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19a6314a997f6adde0c100ecf9224d1ab43c9603'/>
<id>urn:sha1:19a6314a997f6adde0c100ecf9224d1ab43c9603</id>
<content type='text'>
Instead of returning a dentry or ERR_PTR(-E...), return 0 and store
dentry into pipe-&gt;dentry on success and return -E... on failure.

Callers are happier that way...

NOTE: dummy rpc_pipe is getting -&gt;dentry set; we never access that,
since we
	1) never call rpc_unlink() for it (dentry is taken out by
-&gt;kill_sb())
	2) never call rpc_queue_upcall() for it (writing to that
sucker fails; no downcalls are ever submitted, so no replies are
going to arrive)
IOW, having that -&gt;dentry set (and left dangling) is harmless,
if ugly; cleaner solution will take more massage.

Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>rpc_unlink(): saner calling conventions</title>
<updated>2025-07-03T02:44:55+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-02-20T05:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bccea4ed060f1f6476ac7a0649ffa73f77d6e94c'/>
<id>urn:sha1:bccea4ed060f1f6476ac7a0649ffa73f77d6e94c</id>
<content type='text'>
1) pass it pipe instead of pipe-&gt;dentry
2) zero pipe-&gt;dentry afterwards
3) it always returns 0; why bother?

Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
