Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH v14 2/2] nvmet: support reservation feature
Date: Mon, 14 Oct 2024 13:34:29 +0800	[thread overview]
Message-ID: <cceb6b00-0c52-4788-96c7-9cc69928fa26@linux.alibaba.com> (raw)
In-Reply-To: <11a10ade-fa1b-4dad-9a80-1d1681e8bd0f@nvidia.com>

New 6.12-rc2 add a commit 5f60d5f6bbc12e782fac78110b0ee62698f3b576("move 
asm/unaligned.h to linux/unaligned.h"), I change my code to fit this.

Best Regards,

Guixin Liu


在 2024/10/14 12:04, Chaitanya Kulkarni 写道:
> On 10/10/24 19:26, Guixin Liu wrote:
>> diff --git a/drivers/nvme/target/pr.c b/drivers/nvme/target/pr.c
>> new file mode 100644
>> index 000000000000..5f3b9861533e
>> --- /dev/null
>> +++ b/drivers/nvme/target/pr.c
>> @@ -0,0 +1,1162 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * NVMe over Fabrics Persist Reservation.
>> + * Copyright (c) 2024 Guixin Liu, Alibaba Group.
>> + * All rights reserved.
>> + */
>> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> +#include <linux/unaligned.h>
>> +#include <linux/lockdep.h>
>> +#include "nvmet.h"
> I'm running into error when trying to test this code [1],
> with following seems to fix it on my platformcan you
> check ?:-
>
> diff --git a/drivers/nvme/target/pr.c b/drivers/nvme/target/pr.c
> index 5f3b9861533e..000c83fbda52 100644
> --- a/drivers/nvme/target/pr.c
> +++ b/drivers/nvme/target/pr.c
> @@ -5,7 +5,7 @@
>     * All rights reserved.
>     */
>    #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> -#include <linux/unaligned.h>
> +#include <asm-generic/unaligned.h>
>    #include <linux/lockdep.h>
>    #include "nvmet.h"
>
> -ck
>
>
> [1]
>
> nvme (nvme-6.12) # make M=drivers/nvme/target/
>     CC [M]  drivers/nvme/target/pr.o
> drivers/nvme/target/pr.c:8:10: fatal error: linux/unaligned.h: No such
> file or directory
>       8 | #include <linux/unaligned.h>
>         |          ^~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[2]: *** [scripts/Makefile.build:229: drivers/nvme/target/pr.o] Error 1
> make[1]: *** [/mnt/data/nvme/Makefile:1936: drivers/nvme/target] Error 2
> make: *** [Makefile:224: __sub-make] Error 2
>
> nvme (nvme-6.12) # git diff
> diff --git a/drivers/nvme/target/pr.c b/drivers/nvme/target/pr.c
> index 5f3b9861533e..000c83fbda52 100644
> --- a/drivers/nvme/target/pr.c
> +++ b/drivers/nvme/target/pr.c
> @@ -5,7 +5,7 @@
>     * All rights reserved.
>     */
>    #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> -#include <linux/unaligned.h>
> +#include <asm-generic/unaligned.h>
>    #include <linux/lockdep.h>
>    #include "nvmet.h"
>
> nvme (nvme-6.12) # git apply pr-fix.diff
>
> nvme (nvme-6.12) # make M=drivers/nvme/target/
>     CC [M]  drivers/nvme/target/pr.o
>     LD [M]  drivers/nvme/target/nvmet.o
>     MODPOST drivers/nvme/target/Module.symvers
>     CC [M]  drivers/nvme/target/.module-common.o
>     LD [M]  drivers/nvme/target/nvmet.ko
>     LD [M]  drivers/nvme/target/nvme-loop.ko
>     LD [M]  drivers/nvme/target/nvmet-rdma.ko
>     LD [M]  drivers/nvme/target/nvmet-fc.ko
>     LD [M]  drivers/nvme/target/nvme-fcloop.ko
>     LD [M]  drivers/nvme/target/nvmet-tcp.ko
> nvme (nvme-6.12) #
>
>


  reply	other threads:[~2024-10-14  5:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  2:26 [PATCH v14 0/2] Implement the NVMe reservation feature Guixin Liu
2024-10-11  2:26 ` [PATCH v14 1/2] nvme: add reservation command's defines Guixin Liu
2024-10-14  5:43   ` Chaitanya Kulkarni
2024-10-14  6:00     ` Guixin Liu
2024-10-11  2:26 ` [PATCH v14 2/2] nvmet: support reservation feature Guixin Liu
2024-10-11  7:48   ` Dmitry Bogdanov
2024-10-11  8:10   ` Christoph Hellwig
2024-10-14  4:04   ` Chaitanya Kulkarni
2024-10-14  5:34     ` Guixin Liu [this message]
2024-10-14  6:18       ` Chaitanya Kulkarni
2024-10-14  6:31         ` Guixin Liu
2024-10-15  5:00       ` hch
2024-10-14  6:05   ` Chaitanya Kulkarni

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=cceb6b00-0c52-4788-96c7-9cc69928fa26@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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