<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/nfs/export.c, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-01-08T19:42:01+00:00</updated>
<entry>
<title>nfs: block notification on fs with its own -&gt;lock</title>
<updated>2022-01-08T19:42:01+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2021-12-16T17:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40595cdc93edf4110c0f0c0b06f8d82008f23929'/>
<id>urn:sha1:40595cdc93edf4110c0f0c0b06f8d82008f23929</id>
<content type='text'>
NFSv4.1 supports an optional lock notification feature which notifies
the client when a lock comes available.  (Normally NFSv4 clients just
poll for locks if necessary.)  To make that work, we need to request a
blocking lock from the filesystem.

We turned that off for NFS in commit f657f8eef3ff ("nfs: don't atempt
blocking locks on nfs reexports") [sic] because it actually blocks the
nfsd thread while waiting for the lock.

Thanks to Vasily Averin for pointing out that NFS isn't the only
filesystem with that problem.

Any filesystem that leaves -&gt;lock NULL will use posix_lock_file(), which
does the right thing.  Simplest is just to assume that any filesystem
that defines its own -&gt;lock is not safe to request a blocking lock from.

So, this patch mostly reverts commit f657f8eef3ff ("nfs: don't atempt
blocking locks on nfs reexports") [sic] and commit b840be2f00c0 ("lockd:
don't attempt blocking locks on nfs reexports"), and instead uses a
check of -&gt;lock (Vasily's suggestion) to decide whether to support
blocking lock notifications on a given filesystem.  Also add a little
documentation.

Perhaps someday we could add back an export flag later to allow
filesystems with "good" -&gt;lock methods to support blocking lock
notifications.

Reported-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
[ cel: Description rewritten to address checkpatch nits ]
[ cel: Fixed warning when SUNRPC debugging is disabled ]
[ cel: Fixed NULL check ]
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Reviewed-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;</content>
</entry>
<entry>
<title>NFS: Remove the nfs4_label argument from nfs_fhget()</title>
<updated>2021-11-05T18:54:40+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>Anna.Schumaker@Netapp.com</email>
</author>
<published>2021-10-22T17:11:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf7ab00aabbf9c8f1ec72edff15849ddc23aa6a7'/>
<id>urn:sha1:cf7ab00aabbf9c8f1ec72edff15849ddc23aa6a7</id>
<content type='text'>
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Remove the nfs4_label from the nfs4_getattr_res</title>
<updated>2021-11-05T18:54:39+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>Anna.Schumaker@Netapp.com</email>
</author>
<published>2021-10-22T17:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ef61e0eaa333e4e9c348c41a4b7abfb34b8736d'/>
<id>urn:sha1:2ef61e0eaa333e4e9c348c41a4b7abfb34b8736d</id>
<content type='text'>
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: Remove the nfs4_label from the nfs4_lookupp_res struct</title>
<updated>2021-11-05T18:54:39+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>Anna.Schumaker@Netapp.com</email>
</author>
<published>2021-10-22T17:11:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba4bc8dc4d937df2b407393435a302550be0ad82'/>
<id>urn:sha1:ba4bc8dc4d937df2b407393435a302550be0ad82</id>
<content type='text'>
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfs: don't atempt blocking locks on nfs reexports</title>
<updated>2021-08-26T19:32:10+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2021-08-20T21:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f657f8eef3ff870552c9fd2839e0061046f44618'/>
<id>urn:sha1:f657f8eef3ff870552c9fd2839e0061046f44618</id>
<content type='text'>
NFS implements blocking locks by blocking inside its lock method.  In
the reexport case, this blocks the nfs server thread, which could lead
to deadlocks since an nfs server thread might be required to unlock the
conflicting lock.  It also causes a crash, since the nfs server thread
assumes it can free the lock when its lm_notify lock callback is called.

Ideal would be to make the nfs lock method return without blocking in
this case, but for now it works just not to attempt blocking locks.  The
difference is just that the original client will have to poll (as it
does in the v4.0 case) instead of getting a callback when the lock's
available.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Acked-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>NFS: Add a cache validity flag argument to nfs_revalidate_inode()</title>
<updated>2021-04-13T00:11:44+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@hammerspace.com</email>
</author>
<published>2021-03-25T15:04:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1f3208b2d6975f31b9c7c6bf174b84fe9c97492f'/>
<id>urn:sha1:1f3208b2d6975f31b9c7c6bf174b84fe9c97492f</id>
<content type='text'>
Add an argument to nfs_revalidate_inode() to allow callers to specify
which attributes they need to check for validity.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: fix nfs_fetch_iversion()</title>
<updated>2021-04-05T13:04:21+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@hammerspace.com</email>
</author>
<published>2021-03-24T19:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b876d708316bf9b6b9678eb2beb289b93cfe6369'/>
<id>urn:sha1:b876d708316bf9b6b9678eb2beb289b93cfe6369</id>
<content type='text'>
The change attribute is always set by all NFS client versions so get rid
of the open-coded version.

Fixes: 3cc55f4434b4 ("nfs: use change attribute for NFS re-exports")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfs: use change attribute for NFS re-exports</title>
<updated>2021-01-30T16:47:12+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2021-01-29T19:26:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cc55f4434b421d37300aa9a167ace7d60b45ccf'/>
<id>urn:sha1:3cc55f4434b421d37300aa9a167ace7d60b45ccf</id>
<content type='text'>
When exporting NFS, we may as well use the real change attribute
returned by the original server instead of faking up a change attribute
from the ctime.

Note we can't do that by setting I_VERSION--that would also turn on the
logic in iversion.h which treats the lower bit specially, and that
doesn't make sense for NFS.

So instead we define a new export operation for filesystems like NFS
that want to manage the change attribute themselves.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Record NFSv4 pre/post-op attributes as non-atomic</title>
<updated>2020-12-09T14:39:38+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@hammerspace.com</email>
</author>
<published>2020-12-01T04:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=716a8bc7f706eeef80ab42c99d9f210eda845c81'/>
<id>urn:sha1:716a8bc7f706eeef80ab42c99d9f210eda845c81</id>
<content type='text'>
For the case of NFSv4, specify to the client that the pre/post-op
attributes were not recorded atomically with the main operation.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Set PF_LOCAL_THROTTLE on local filesystems only</title>
<updated>2020-12-09T14:39:38+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@hammerspace.com</email>
</author>
<published>2020-11-30T22:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01cbf3853959feec40ec9b9a399e12a021cd4d81'/>
<id>urn:sha1:01cbf3853959feec40ec9b9a399e12a021cd4d81</id>
<content type='text'>
Don't set PF_LOCAL_THROTTLE on remote filesystems like NFS, since they
aren't expected to ever be subject to double buffering.

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