Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp348113rdb; Mon, 29 Jan 2024 04:22:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2dJxARcKqH/7URYR9t+iwDr1kgASXyxAvOE4BGVKp7DdpQ6bYDEfIHSCMw5gbo9PlYr2F X-Received: by 2002:a05:6a20:c411:b0:19c:2fb5:973f with SMTP id en17-20020a056a20c41100b0019c2fb5973fmr2215571pzb.23.1706530962649; Mon, 29 Jan 2024 04:22:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706530962; cv=pass; d=google.com; s=arc-20160816; b=XTZ30XJHBzt4DFHGVJf3tKCtr/5sAV/uvyP7ppyTIFUFYsVLCc02pWCqQhM+IZy+Ku 5M9urO+SvzMMgrUdvu7l37pQMFC1UbqlvYhSAFM7LVuk+4gBz3bZh+kqdAQcfAHA5IQ2 SSMTbct7cBLEG3uUe2VWq2y1Y18LYf8fquWNHMVQM90EJyBg7wp0wmIH+LfpxHHJA/NC 6+k8auI2GSzFQBeS0IoXEKT72tZE6XBsmJcyYUJLPe2qRdLp8DDeiIDzfaoqeLYB5ZQN pbamZGkvEMFQ0v4Q+fqFvwGAWVBj1sjoay/2Bq42vTZfN0D1n/CTtPVsjgZAw3LFUWkq R0jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=eUwZxdlc5rZQ60bYHF4QZZeNrpkEhxdwVYUInb7zx5s=; fh=uI1U6Y87+GiyEtBGkRkfQN3UyvcDClIKN6IyjML0j8g=; b=JJVoyu0pAFMFkmqPBplSzrrRPboOPHpMJaYNQw4gSJU+PUuaXHrCeEckwfaxVCHt3K 9j+9AT7o7PD8o47I/XEINOHMrLxpbFIzXGn0VYPIn3tr9kl2OoK33tuyDMUS0XMRbOyC qS8LMDupXIcrgwHkhBx+SybpWtLh6wVTWfavFEMYOWbcC3uif1d3V7frYppsKQqf0gzq CWtPuYj31E0Pz5UiKTrLm27ixOq9ZsfAQDXgqkLmTFk5jAbmvBJE09wpJseWZ9OEK8N0 1kQQnsjRylBuZu2DUNXdc4BWL/+iXzIJo0gkw+hTOSaJvJJ68cAe+TbwRi00/8BJSGPh BOrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RjvKYqWP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k1-20020a170902694100b001d8d226d681si2272797plt.572.2024.01.29.04.22.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 04:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RjvKYqWP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 56087B20AA8 for ; Mon, 29 Jan 2024 12:22:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C791D604BB; Mon, 29 Jan 2024 12:22:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RjvKYqWP" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A303F604AA for ; Mon, 29 Jan 2024 12:22:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706530957; cv=none; b=tqbImkHLarDWs4gT5GGoqexIb38wG2h4a0zlecCNuk4UI4kN7zMkiSTDU1zZrq5kz2E3zpWe2ugcIHQjfqMuqrDhkekNghHQopQG5HHo7vAvej8hSTMf1kweIncNlaB6QU+gVpWEFqmjEuMMBFVLd2qcHx/IJxKERGvxLR2+uxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706530957; c=relaxed/simple; bh=+ZlH8FyhRd8ktSsLGB5sxsDFUjm30iB9xmfmJi5+cSg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=ZWGEKQtgwoo9VB43UvWmqEGcShSZ2Ea7gRUG5PC1jyx9hYF+o8Ojm+CthynJCxupBMKNp0g0GWB4QfJKxJxCUazoRYKhOTpVllWe1C3k+z4b7Idp1d8QIQ6Mb1Icx+JSGrBaej1A8ge+8GkB35HkNbCzwAEI0rbsP5g8h6+pSCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RjvKYqWP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 641E7C433F1; Mon, 29 Jan 2024 12:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706530957; bh=+ZlH8FyhRd8ktSsLGB5sxsDFUjm30iB9xmfmJi5+cSg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=RjvKYqWPXtCVZ4S6UXMz9szp/4ZuxOcaXdcT+re0TTl8ZTKfIm4felXm44hKZ9pT9 PqOa9u+zrJcI207yQRxhR6isOpPaT6qIQS+hOZ5YdxMJHWU8tOjPk4Nxq3cpTg+JX1 Irq8DzjSbbVRIKvLYm7dEWdMjY+0+J37vm52wyqBGFV+sS5NbMlWpl/Q8aUNmWemNa hc2DvRcQA8xC1NSISxmN1o0h5bTTr9i0oG7l60ZPcy9rFy7S+2moGYH9ma2U404d/S 0VMOM6XAJNNXd3DbuT65xomyBioQRT7l/oXrbLA6RICkj9z4XGhc4a7nwh+r9WZZJ+ GPYZ2bVXRq3qw== Message-ID: <22191c08a554d7570bd389e66a356dfe0e58b528.camel@kernel.org> Subject: Re: [PATCH 06/13] nfsd: prepare for supporting admin-revocation of state From: Jeff Layton To: NeilBrown , Chuck Lever Cc: linux-nfs@vger.kernel.org, Olga Kornievskaia , Dai Ngo , Tom Talpey , Christoph Hellwig , Tom Haynes Date: Mon, 29 Jan 2024 07:22:35 -0500 In-Reply-To: <20240129033637.2133-7-neilb@suse.de> References: <20240129033637.2133-1-neilb@suse.de> <20240129033637.2133-7-neilb@suse.de> Autocrypt: addr=jlayton@kernel.org; prefer-encrypt=mutual; keydata=mQINBE6V0TwBEADXhJg7s8wFDwBMEvn0qyhAnzFLTOCHooMZyx7XO7dAiIhDSi7G1NPxwn8jdFUQMCR/GlpozMFlSFiZXi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lJR4nvQrjOPMsqWD5F9mcRyowOzr8amasLv43w92rD2nHoBK6rbFE/qC7AAjABEsZq8+TQmueN0maIXUQu7TBzejsEbV0i29z+kkrjU2NmK5pcxgAtehVxpZJ14LqmN6E0suTtzjNT1eMoqOPrMSx+6vOCIuvJ/MVYnQgHhjtPPnU86mebTY5Loy9YfJAC2EVpxtcCbx2KiwErTndEyWL+GL53LuScUD7tW8vYbGIp4RlnUgPLbqpgssq2gwYO9m75FGuKuB2+2bCGajqalid5nzeq9v7cYLLRgArJfOIBWZrHy2m0C+pFu9DSuV6SNr2dvMQUv1V58h0FaSOxHVQnJdnoHn13g/CKKvyg2EMrMt/EfcXgvDwQbnG9we4xJiWOIOcsvrWcB6C6lWBDA+In7w7SXnnok kZWuOsJdJQdmwlWC5L5ln9xgfr/4mOY38B0U= Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 (3.50.3-1.fc39) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-01-29 at 14:29 +1100, NeilBrown wrote: > The NFSv4 protocol allows state to be revoked by the admin and has error > codes which allow this to be communicated to the client. >=20 > This patch > - introduces a new state-id status SC_STATUS_ADMIN_REVOKED > which can be set on open, lock, or delegation state. > - reports NFS4ERR_ADMIN_REVOKED when these are accessed > - introduces a per-client counter of these states and returns > SEQ4_STATUS_ADMIN_STATE_REVOKED when the counter is not zero. > Decrements this when freeing any admin-revoked state. > - introduces stub code to find all interesting states for a given > superblock so they can be revoked via the 'unlock_filesystem' > file in /proc/fs/nfsd/ > No actual states are handled yet. >=20 > Signed-off-by: NeilBrown > --- > fs/nfsd/nfs4state.c | 85 ++++++++++++++++++++++++++++++++++++++++++++- > fs/nfsd/nfsctl.c | 1 + > fs/nfsd/nfsd.h | 1 + > fs/nfsd/state.h | 10 ++++++ > fs/nfsd/trace.h | 3 +- > 5 files changed, 98 insertions(+), 2 deletions(-) >=20 > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > index 6bccdd0af814..8db224906864 100644 > --- a/fs/nfsd/nfs4state.c > +++ b/fs/nfsd/nfs4state.c > @@ -1210,6 +1210,8 @@ nfs4_put_stid(struct nfs4_stid *s) > return; > } > idr_remove(&clp->cl_stateids, s->sc_stateid.si_opaque.so_id); > + if (s->sc_status & SC_STATUS_ADMIN_REVOKED) > + atomic_dec(&s->sc_client->cl_admin_revoked); > nfs4_free_cpntf_statelist(clp->net, s); > spin_unlock(&clp->cl_lock); > s->sc_free(s); > @@ -1529,6 +1531,8 @@ static void put_ol_stateid_locked(struct nfs4_ol_st= ateid *stp, > } > =20 > idr_remove(&clp->cl_stateids, s->sc_stateid.si_opaque.so_id); > + if (s->sc_status & SC_STATUS_ADMIN_REVOKED) > + atomic_dec(&s->sc_client->cl_admin_revoked); > list_add(&stp->st_locks, reaplist); > } > =20 > @@ -1674,6 +1678,68 @@ static void release_openowner(struct nfs4_openowne= r *oo) > nfs4_put_stateowner(&oo->oo_owner); > } > =20 > +static struct nfs4_stid *find_one_sb_stid(struct nfs4_client *clp, > + struct super_block *sb, > + unsigned int sc_types) > +{ > + unsigned long id, tmp; > + struct nfs4_stid *stid; > + > + spin_lock(&clp->cl_lock); > + idr_for_each_entry_ul(&clp->cl_stateids, stid, tmp, id) > + if ((stid->sc_type & sc_types) && > + stid->sc_status =3D=3D 0 && > + stid->sc_file->fi_inode->i_sb =3D=3D sb) { > + refcount_inc(&stid->sc_count); > + break; > + } > + spin_unlock(&clp->cl_lock); > + return stid; > +} > + > +/** > + * nfsd4_revoke_states - revoke all nfsv4 states associated with given f= ilesystem > + * @net - used to identify instance of nfsd (there is one per net namesp= ace) > + * @sb - super_block used to identify target filesystem > + * > + * All nfs4 states (open, lock, delegation, layout) held by the server i= nstance > + * and associated with a file on the given filesystem will be revoked re= sulting > + * in any files being closed and so all references from nfsd to the file= system > + * being released. Thus nfsd will no longer prevent the filesystem from= being > + * unmounted. > + * > + * The clients which own the states will subsequently being notified tha= t the > + * states have been "admin-revoked". > + */ > +void nfsd4_revoke_states(struct net *net, struct super_block *sb) > +{ > + struct nfsd_net *nn =3D net_generic(net, nfsd_net_id); > + unsigned int idhashval; > + unsigned int sc_types; > + > + sc_types =3D 0; > + > + spin_lock(&nn->client_lock); > + for (idhashval =3D 0; idhashval < CLIENT_HASH_MASK; idhashval++) { > + struct list_head *head =3D &nn->conf_id_hashtbl[idhashval]; > + struct nfs4_client *clp; > + retry: > + list_for_each_entry(clp, head, cl_idhash) { > + struct nfs4_stid *stid =3D find_one_sb_stid(clp, sb, > + sc_types); > + if (stid) { > + spin_unlock(&nn->client_lock); > + switch (stid->sc_type) { > + } > + nfs4_put_stid(stid); > + spin_lock(&nn->client_lock); > + goto retry; > + } > + } > + } > + spin_unlock(&nn->client_lock); > +} > + > static inline int > hash_sessionid(struct nfs4_sessionid *sessionid) > { > @@ -2545,6 +2611,8 @@ static int client_info_show(struct seq_file *m, voi= d *v) > } > seq_printf(m, "callback state: %s\n", cb_state2str(clp->cl_cb_state)); > seq_printf(m, "callback address: %pISpc\n", &clp->cl_cb_conn.cb_addr); > + seq_printf(m, "admin-revoked states: %d\n", > + atomic_read(&clp->cl_admin_revoked)); > drop_client(clp); > =20 > return 0; > @@ -4058,6 +4126,8 @@ nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4= _compound_state *cstate, > } > if (!list_empty(&clp->cl_revoked)) > seq->status_flags |=3D SEQ4_STATUS_RECALLABLE_STATE_REVOKED; > + if (atomic_read(&clp->cl_admin_revoked)) > + seq->status_flags |=3D SEQ4_STATUS_ADMIN_STATE_REVOKED; > out_no_session: > if (conn) > free_conn(conn); > @@ -4546,7 +4616,9 @@ nfsd4_verify_open_stid(struct nfs4_stid *s) > { > __be32 ret =3D nfs_ok; > =20 > - if (s->sc_status & SC_STATUS_REVOKED) > + if (s->sc_status & SC_STATUS_ADMIN_REVOKED) > + ret =3D nfserr_admin_revoked; > + else if (s->sc_status & SC_STATUS_REVOKED) > ret =3D nfserr_deleg_revoked; > else if (s->sc_status & SC_STATUS_CLOSED) > ret =3D nfserr_bad_stateid; > @@ -5137,6 +5209,11 @@ nfs4_check_deleg(struct nfs4_client *cl, struct nf= sd4_open *open, > deleg =3D find_deleg_stateid(cl, &open->op_delegate_stateid); > if (deleg =3D=3D NULL) > goto out; > + if (deleg->dl_stid.sc_status & SC_STATUS_ADMIN_REVOKED) { > + nfs4_put_stid(&deleg->dl_stid); > + status =3D nfserr_admin_revoked; > + goto out; > + } > if (deleg->dl_stid.sc_status & SC_STATUS_REVOKED) { > nfs4_put_stid(&deleg->dl_stid); > status =3D nfserr_deleg_revoked; > @@ -6443,6 +6520,8 @@ nfsd4_lookup_stateid(struct nfsd4_compound_state *c= state, > */ > statusmask |=3D SC_STATUS_REVOKED; > =20 > + statusmask |=3D SC_STATUS_ADMIN_REVOKED; > + > if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) || > CLOSE_STATEID(stateid)) > return nfserr_bad_stateid; > @@ -6461,6 +6540,10 @@ nfsd4_lookup_stateid(struct nfsd4_compound_state *= cstate, > nfs4_put_stid(stid); > return nfserr_deleg_revoked; > } > + if (stid->sc_status & SC_STATUS_ADMIN_REVOKED) { > + nfs4_put_stid(stid); > + return nfserr_admin_revoked; > + } > *s =3D stid; > return nfs_ok; > } > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index f206ca32e7f5..4bae65e8d28a 100644 > --- a/fs/nfsd/nfsctl.c > +++ b/fs/nfsd/nfsctl.c > @@ -281,6 +281,7 @@ static ssize_t write_unlock_fs(struct file *file, cha= r *buf, size_t size) > * 3. Is that directory the root of an exported file system? > */ > error =3D nlmsvc_unlock_all_by_sb(path.dentry->d_sb); > + nfsd4_revoke_states(netns(file), path.dentry->d_sb); > =20 > path_put(&path); > return error; > diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h > index 304e9728b929..9a86fe8a39ef 100644 > --- a/fs/nfsd/nfsd.h > +++ b/fs/nfsd/nfsd.h > @@ -274,6 +274,7 @@ void nfsd_lockd_shutdown(void); > #define nfserr_no_grace cpu_to_be32(NFSERR_NO_GRACE) > #define nfserr_reclaim_bad cpu_to_be32(NFSERR_RECLAIM_BAD) > #define nfserr_badname cpu_to_be32(NFSERR_BADNAME) > +#define nfserr_admin_revoked cpu_to_be32(NFS4ERR_ADMIN_REVOKED) > #define nfserr_cb_path_down cpu_to_be32(NFSERR_CB_PATH_DOWN) > #define nfserr_locked cpu_to_be32(NFSERR_LOCKED) > #define nfserr_wrongsec cpu_to_be32(NFSERR_WRONGSEC) > diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h > index ffc8920d0558..7fa83265ad9a 100644 > --- a/fs/nfsd/state.h > +++ b/fs/nfsd/state.h > @@ -112,6 +112,7 @@ struct nfs4_stid { > #define SC_STATUS_CLOSED BIT(0) > /* For a deleg stateid kept around only to process free_stateid's: */ > #define SC_STATUS_REVOKED BIT(1) > +#define SC_STATUS_ADMIN_REVOKED BIT(2) > unsigned short sc_status; > =20 > struct list_head sc_cp_list; > @@ -367,6 +368,7 @@ struct nfs4_client { > clientid_t cl_clientid; /* generated by server */ > nfs4_verifier cl_confirm; /* generated by server */ > u32 cl_minorversion; > + atomic_t cl_admin_revoked; /* count of admin-revoked states */ > /* NFSv4.1 client implementation id: */ > struct xdr_netobj cl_nii_domain; > struct xdr_netobj cl_nii_name; > @@ -730,6 +732,14 @@ static inline void get_nfs4_file(struct nfs4_file *f= i) > } > struct nfsd_file *find_any_file(struct nfs4_file *f); > =20 > +#ifdef CONFIG_NFSD_V4 > +void nfsd4_revoke_states(struct net *net, struct super_block *sb); > +#else > +static inline void nfsd4_revoke_states(struct net *net, struct super_blo= ck *sb) > +{ > +} > +#endif > + > /* grace period management */ > void nfsd4_end_grace(struct nfsd_net *nn); > =20 > diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h > index fe08ca18b647..5c58da9f86b7 100644 > --- a/fs/nfsd/trace.h > +++ b/fs/nfsd/trace.h > @@ -651,7 +651,8 @@ DEFINE_STATESEQID_EVENT(open_confirm); > #define show_stid_status(x) \ > __print_flags(x, "|", \ > { SC_STATUS_CLOSED, "CLOSED" }, \ > - { SC_STATUS_REVOKED, "REVOKED" }) \ > + { SC_STATUS_REVOKED, "REVOKED" }, \ > + { SC_STATUS_ADMIN_REVOKED, "ADMIN_REVOKED" }) > =20 > DECLARE_EVENT_CLASS(nfsd_stid_class, > TP_PROTO( Reviewed-by: Jeff Layton