[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16d8c8e88490ee92750b26f2c438e1329dea0061.camel@hammerspace.com>
Date: Thu, 22 Feb 2024 15:20:09 +0000
From: Trond Myklebust <trondmy@...merspace.com>
To: "chuck.lever@...cle.com" <chuck.lever@...cle.com>, "zhitao.li@...rtx.com"
<zhitao.li@...rtx.com>, "kolga@...app.com" <kolga@...app.com>,
"anna@...nel.org" <anna@...nel.org>, "tom@...pey.com" <tom@...pey.com>,
"jlayton@...nel.org" <jlayton@...nel.org>, "neilb@...e.de" <neilb@...e.de>,
"Dai.Ngo@...cle.com" <Dai.Ngo@...cle.com>
CC: "huangping@...rtx.com" <huangping@...rtx.com>, "linux-nfs@...r.kernel.org"
<linux-nfs@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: PROBLEM: NFS client IO fails with ERESTARTSYS when another mount
point with the same export is unmounted with force [NFS] [SUNRPC]
On Thu, 2024-02-22 at 06:05 -0500, Jeff Layton wrote:
> On Wed, 2024-02-21 at 13:48 +0000, Trond Myklebust wrote:
> > On Wed, 2024-02-21 at 16:20 +0800, Zhitao Li wrote:
> > > [You don't often get email from zhitao.li@...rtx.com. Learn why
> > > this
> > > is important at https://aka.ms/LearnAboutSenderIdentification ]
> > >
> > > Hi, everyone,
> > >
> > > - Facts:
> > > I have a remote NFS export and I mount the same export on two
> > > different directories in my OS with the same options. There is an
> > > inflight IO under one mounted directory. And then I unmount
> > > another
> > > mounted directory with force. The inflight IO ends up with
> > > "Unknown
> > > error 512", which is ERESTARTSYS.
> > >
> >
> > All of the above is well known. That's because forced umount
> > affects
> > the entire filesystem. Why are you using it here in the first
> > place? It
> > is not intended for casual use.
> >
>
> While I agree Trond's above statement, the kernel is not supposed to
> leak error codes that high into userland. Are you seeing ERESTARTSYS
> being returned to system calls? If so, which ones?
The point of forced umount is to kill all RPC calls associated with the
filesystem in order to unblock the umount. Basically, it triggers this
code before the unmount starts:
void nfs_umount_begin(struct super_block *sb)
{
struct nfs_server *server;
struct rpc_clnt *rpc;
server = NFS_SB(sb);
/* -EIO all pending I/O */
rpc = server->client_acl;
if (!IS_ERR(rpc))
rpc_killall_tasks(rpc);
rpc = server->client;
if (!IS_ERR(rpc))
rpc_killall_tasks(rpc);
}
So yes, that does signal all the way up to the application level, and
it is very much intended to do so.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com
Powered by blists - more mailing lists