<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/write.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-13T18:03:11Z</updated>
<entry>
<title>NFS: Avoid writeback threads getting stuck in mempool_alloc()</title>
<updated>2022-04-13T18:03:11Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-03-21T17:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b3fa9a3c420c31e77b406ddc28f3a627100516c'/>
<id>urn:sha1:1b3fa9a3c420c31e77b406ddc28f3a627100516c</id>
<content type='text'>
[ Upstream commit 0bae835b63c53f86cdc524f5962e39409585b22c ]

In a low memory situation, allow the NFS writeback code to fail without
getting stuck in infinite loops in mempool_alloc().

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: nfsiod should not block forever in mempool_alloc()</title>
<updated>2022-04-13T18:03:11Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-03-21T16:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b89ecbd0db8fb7660597e072e4bd051dd375f15b'/>
<id>urn:sha1:b89ecbd0db8fb7660597e072e4bd051dd375f15b</id>
<content type='text'>
[ Upstream commit 515dcdcd48736576c6f5c197814da6f81c60a21e ]

The concern is that since nfsiod is sometimes required to kick off a
commit, it can get locked up waiting forever in mempool_alloc() instead
of failing gracefully and leaving the commit until later.

Try to allocate from the slab first, with GFP_KERNEL | __GFP_NORETRY,
then fall back to a non-blocking attempt to allocate from the memory
pool.

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>SUNRPC: improve 'swap' handling: scheduling and PF_MEMALLOC</title>
<updated>2022-04-08T12:06:28Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2022-03-06T23:41:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=451f785029cbdf29b0a34d3bc3b6f0767aa09001'/>
<id>urn:sha1:451f785029cbdf29b0a34d3bc3b6f0767aa09001</id>
<content type='text'>
[ Upstream commit 8db55a032ac7ac1ed7b98d6b1dc980e6378c652f ]

rpc tasks can be marked as RPC_TASK_SWAPPER.  This causes GFP_MEMALLOC
to be used for some allocations.  This is needed in some cases, but not
in all where it is currently provided, and in some where it isn't
provided.

Currently *all* tasks associated with a rpc_client on which swap is
enabled get the flag and hence some GFP_MEMALLOC support.

GFP_MEMALLOC is provided for -&gt;buf_alloc() but only swap-writes need it.
However xdr_alloc_bvec does not get GFP_MEMALLOC - though it often does
need it.

xdr_alloc_bvec is called while the XPRT_LOCK is held.  If this blocks,
then it blocks all other queued tasks.  So this allocation needs
GFP_MEMALLOC for *all* requests, not just writes, when the xprt is used
for any swap writes.

Similarly, if the transport is not connected, that will block all
requests including swap writes, so memory allocations should get
GFP_MEMALLOC if swap writes are possible.

So with this patch:
 1/ we ONLY set RPC_TASK_SWAPPER for swap writes.
 2/ __rpc_execute() sets PF_MEMALLOC while handling any task
    with RPC_TASK_SWAPPER set, or when handling any task that
    holds the XPRT_LOCKED lock on an xprt used for swap.
    This removes the need for the RPC_IS_SWAPPER() test
    in -&gt;buf_alloc handlers.
 3/ xprt_prepare_transmit() sets PF_MEMALLOC after locking
    any task to a swapper xprt.  __rpc_execute() will clear it.
 3/ PF_MEMALLOC is set for all the connect workers.

Reviewed-by: Chuck Lever &lt;chuck.lever@oracle.com&gt; (for xprtrdma parts)
Signed-off-by: NeilBrown &lt;neilb@suse.de&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>NFS: Use of mapping_set_error() results in spurious errors</title>
<updated>2022-04-08T12:06:23Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-02-15T20:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=187e87216b8c02de0ab43ec6d48136ab81083366'/>
<id>urn:sha1:187e87216b8c02de0ab43ec6d48136ab81083366</id>
<content type='text'>
[ Upstream commit 6c984083ec2453dfd3fcf98f392f34500c73e3f2 ]

The use of mapping_set_error() in conjunction with calls to
filemap_check_errors() is problematic because every error gets reported
as either an EIO or an ENOSPC by filemap_check_errors() in functions
such as filemap_write_and_wait() or filemap_write_and_wait_range().
In almost all cases, we prefer to use the more nuanced wb errors.

Fixes: b8946d7bfb94 ("NFS: Revalidate the file mapping on all fatal writeback errors")
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: Remove redundant call to __set_page_dirty_nobuffers</title>
<updated>2021-10-21T21:11:41Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2021-10-21T21:11:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cd27df88af29929cda6e8eb4e0f5bb4e25812bf'/>
<id>urn:sha1:4cd27df88af29929cda6e8eb4e0f5bb4e25812bf</id>
<content type='text'>
Remove a redundant call in nfs_updatepage(). nfs_writepage_setup() will
have already called nfs_mark_request_dirty() on success.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Trace calls to .rpc_call_done</title>
<updated>2021-10-20T22:09:54Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2021-10-16T22:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b40887e10dcacc5e8ae3c1a99dcba20877c4831b'/>
<id>urn:sha1:b40887e10dcacc5e8ae3c1a99dcba20877c4831b</id>
<content type='text'>
Introduce a single tracepoint that can replace simple dprintk call
sites in upper layer "rpc_call_done" callbacks. Example:

   kworker/u24:2-1254  [001]   771.026677: rpc_stats_latency:    task:00000001@00000002 xid=0x16a6f3c0 rpcbindv2 GETPORT backlog=446 rtt=101 execute=555
   kworker/u24:2-1254  [001]   771.026677: rpc_task_call_done:   task:00000001@00000002 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpcb_getport_done
   kworker/u24:2-1254  [001]   771.026678: rpcb_setport:         task:00000001@00000002 status=0 port=20048

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix up commit deadlocks</title>
<updated>2021-10-20T22:09:45Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2021-10-04T19:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=133a48abf6ecc535d7eddc6da1c3e4c972445882'/>
<id>urn:sha1:133a48abf6ecc535d7eddc6da1c3e4c972445882</id>
<content type='text'>
If O_DIRECT bumps the commit_info rpcs_out field, then that could lead
to fsync() hangs. The fix is to ensure that O_DIRECT calls
nfs_commit_end().

Fixes: 723c921e7dfc ("sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix deadlocks in nfs_scan_commit_list()</title>
<updated>2021-10-10T09:05:54Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2021-10-04T19:44:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64a93dbf25d3a1368bb58ddf0f61d0a92d7479e3'/>
<id>urn:sha1:64a93dbf25d3a1368bb58ddf0f61d0a92d7479e3</id>
<content type='text'>
Partially revert commit 2ce209c42c01 ("NFS: Wait for requests that are
locked on the commit list"), since it can lead to deadlocks between
commit requests and nfs_join_page_group().
For now we should assume that any locked requests on the commit list are
either about to be removed and committed by another task, or the writes
they describe are about to be retransmitted. In either case, we should
not need to worry.

Fixes: 2ce209c42c01 ("NFS: Wait for requests that are locked on the commit list")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Instrument i_size_write()</title>
<updated>2021-10-10T09:05:54Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2021-10-04T14:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=110cb2d2f9326030f13b7ec85d6d482934ea5462'/>
<id>urn:sha1:110cb2d2f9326030f13b7ec85d6d482934ea5462</id>
<content type='text'>
Generate a trace event whenever the NFS client modifies the size of
a file. These new events aid troubleshooting workloads that trigger
races around size updates.

There are four new trace points, all named nfs_size_something so
they are easy to grep for or enable as a group with a single glob.

Size updated on the server:

  kworker/u24:10-194   [010]   369.939174: nfs_size_update:      fileid=00:28:2 fhandle=0x36fbbe51 version=1752899344277980615 cursize=250471 newsize=172083

Server-side size update reported via NFSv3 WCC attributes:

             fsx-1387  [006]   380.760686: nfs_size_wcc:         fileid=00:28:2 fhandle=0x36fbbe51 version=1752899355909932456 cursize=146792 newsize=171216

File has been truncated locally:

             fsx-1387  [007]   369.437421: nfs_size_truncate:    fileid=00:28:2 fhandle=0x36fbbe51 version=1752899231200117272 cursize=215244 newsize=0

File has been extended locally:

             fsx-1387  [007]   369.439213: nfs_size_grow:        fileid=00:28:2 fhandle=0x36fbbe51 version=1752899343704248410 cursize=258048 newsize=262144

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix up nfs_ctx_key_to_expire()</title>
<updated>2021-10-04T00:49:05Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2021-07-10T22:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca05cbae2a0468e5d78e9b4605936a8bf5da328b'/>
<id>urn:sha1:ca05cbae2a0468e5d78e9b4605936a8bf5da328b</id>
<content type='text'>
If the cached credential exists but doesn't have any expiration callback
then exit early.
Fix up atomicity issues when replacing the credential with a new one
since the existing code could lead to refcount leaks.

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