[PATCH v14 2/2] nvmet: support reservation feature

Guixin Liu kanie at linux.alibaba.com
Sun Oct 13 23:31:04 PDT 2024


在 2024/10/14 14:18, Chaitanya Kulkarni 写道:
> On 10/13/24 22:34, Guixin Liu wrote:
>> 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
>>
> Let's avoid top posting if we can for everyone else on the list.
Oh, sorry.
> So if we merge this patch then we have to make sure before we sent
> the pull request above commit (f3b576) is in the tree, otherwise kernel
> test robot mentioned in [1] will start complaining ?

Yes, commit (f3b576) changed all "#include <asm/unaligned.h>" to 
"#include <linux/unaligned.h>",

I think we should do a rebase before sending the pull request.

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) #
>>>
>>>
> -ck
>
> [1]
>
> E.g.
> https://lists.infradead.org/pipermail/linux-nvme/2024-September/049831.html
>
>



More information about the Linux-nvme mailing list