From: Jeff Layton <jlayton@kernel.org>
To: chenxiaosongemail@foxmail.com, trond.myklebust@hammerspace.com,
anna@kernel.org, chuck.lever@oracle.com, neilb@suse.de,
kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
chenxiaosong@kylinos.cn, liuzhengyuan@kylinos.cn,
huhai@kylinos.cn, liuyun01@kylinos.cn
Subject: Re: [PATCH] NFSv4, NFSD: move enum nfs_cb_opnum4 to include/linux/nfs4.h
Date: Sun, 03 Dec 2023 06:27:19 -0500 [thread overview]
Message-ID: <1a0cd72ff08cfa8d6b26015cced677751f4c15f5.camel@kernel.org> (raw)
In-Reply-To: <tencent_03EDD0CAFBF93A9667CFCA1B68EDB4C4A109@qq.com>
On Sat, 2023-12-02 at 21:07 +0000, chenxiaosongemail@foxmail.com wrote:
> From: ChenXiaoSong <chenxiaosong@kylinos.cn>
>
> Callback operations enum is defined in client and server, move it to
> common header file.
>
> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
> ---
> fs/nfs/callback.h | 19 -------------------
> fs/nfsd/nfs4callback.c | 26 +-------------------------
> include/linux/nfs4.h | 22 ++++++++++++++++++++++
> 3 files changed, 23 insertions(+), 44 deletions(-)
>
> diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
> index ccd4f245cae2..0279b78b5fc9 100644
> --- a/fs/nfs/callback.h
> +++ b/fs/nfs/callback.h
> @@ -19,25 +19,6 @@ enum nfs4_callback_procnum {
> CB_COMPOUND = 1,
> };
>
> -enum nfs4_callback_opnum {
> - OP_CB_GETATTR = 3,
> - OP_CB_RECALL = 4,
> -/* Callback operations new to NFSv4.1 */
> - OP_CB_LAYOUTRECALL = 5,
> - OP_CB_NOTIFY = 6,
> - OP_CB_PUSH_DELEG = 7,
> - OP_CB_RECALL_ANY = 8,
> - OP_CB_RECALLABLE_OBJ_AVAIL = 9,
> - OP_CB_RECALL_SLOT = 10,
> - OP_CB_SEQUENCE = 11,
> - OP_CB_WANTS_CANCELLED = 12,
> - OP_CB_NOTIFY_LOCK = 13,
> - OP_CB_NOTIFY_DEVICEID = 14,
> -/* Callback operations new to NFSv4.2 */
> - OP_CB_OFFLOAD = 15,
> - OP_CB_ILLEGAL = 10044,
> -};
> -
> struct nfs4_slot;
> struct cb_process_state {
> __be32 drc_status;
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 92bc109dabe6..30aa241038eb 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -31,6 +31,7 @@
> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
>
> +#include <linux/nfs4.h>
> #include <linux/sunrpc/clnt.h>
> #include <linux/sunrpc/xprt.h>
> #include <linux/sunrpc/svc_xprt.h>
> @@ -101,31 +102,6 @@ static int decode_cb_fattr4(struct xdr_stream *xdr, uint32_t *bitmap,
> return 0;
> }
>
> -/*
> - * nfs_cb_opnum4
> - *
> - * enum nfs_cb_opnum4 {
> - * OP_CB_GETATTR = 3,
> - * ...
> - * };
> - */
> -enum nfs_cb_opnum4 {
> - OP_CB_GETATTR = 3,
> - OP_CB_RECALL = 4,
> - OP_CB_LAYOUTRECALL = 5,
> - OP_CB_NOTIFY = 6,
> - OP_CB_PUSH_DELEG = 7,
> - OP_CB_RECALL_ANY = 8,
> - OP_CB_RECALLABLE_OBJ_AVAIL = 9,
> - OP_CB_RECALL_SLOT = 10,
> - OP_CB_SEQUENCE = 11,
> - OP_CB_WANTS_CANCELLED = 12,
> - OP_CB_NOTIFY_LOCK = 13,
> - OP_CB_NOTIFY_DEVICEID = 14,
> - OP_CB_OFFLOAD = 15,
> - OP_CB_ILLEGAL = 10044
> -};
> -
> static void encode_nfs_cb_opnum4(struct xdr_stream *xdr, enum nfs_cb_opnum4 op)
> {
> __be32 *p;
> diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
> index c11c4db34639..ef8d2d618d5b 100644
> --- a/include/linux/nfs4.h
> +++ b/include/linux/nfs4.h
> @@ -869,4 +869,26 @@ enum {
> RCA4_TYPE_MASK_OTHER_LAYOUT_MAX = 15,
> };
>
> +enum nfs_cb_opnum4 {
> + OP_CB_GETATTR = 3,
> + OP_CB_RECALL = 4,
> +
> + /* Callback operations new to NFSv4.1 */
> + OP_CB_LAYOUTRECALL = 5,
> + OP_CB_NOTIFY = 6,
> + OP_CB_PUSH_DELEG = 7,
> + OP_CB_RECALL_ANY = 8,
> + OP_CB_RECALLABLE_OBJ_AVAIL = 9,
> + OP_CB_RECALL_SLOT = 10,
> + OP_CB_SEQUENCE = 11,
> + OP_CB_WANTS_CANCELLED = 12,
> + OP_CB_NOTIFY_LOCK = 13,
> + OP_CB_NOTIFY_DEVICEID = 14,
> +
> + /* Callback operations new to NFSv4.2 */
> + OP_CB_OFFLOAD = 15,
> +
> + OP_CB_ILLEGAL = 10044,
> +};
> +
> #endif
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-12-03 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-02 21:07 [PATCH] NFSv4, NFSD: move enum nfs_cb_opnum4 to include/linux/nfs4.h chenxiaosongemail
2023-12-03 11:27 ` Jeff Layton [this message]
2023-12-03 17:32 ` Chuck Lever
2023-12-04 20:31 ` Anna Schumaker
2023-12-04 22:05 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a0cd72ff08cfa8d6b26015cced677751f4c15f5.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chenxiaosong@kylinos.cn \
--cc=chenxiaosongemail@foxmail.com \
--cc=chuck.lever@oracle.com \
--cc=huhai@kylinos.cn \
--cc=kolga@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=liuyun01@kylinos.cn \
--cc=liuzhengyuan@kylinos.cn \
--cc=neilb@suse.de \
--cc=tom@talpey.com \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox