All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Changqi Lu <luchangqi.123@bytedance.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, kwolf@redhat.com,
	hreitz@redhat.com, fam@euphon.net, ronniesahlberg@gmail.com,
	pbonzini@redhat.com, pl@dlhnet.de, kbusch@kernel.org,
	its@irrelevant.dk, foss@defmacro.it, philmd@linaro.org,
	pizhenwei@bytedance.com
Subject: Re: [PATCH v5 00/10] Support persistent reservation operations
Date: Mon, 10 Jun 2024 13:18:23 -0400	[thread overview]
Message-ID: <20240610171823.GA334653@fedora.redhat.com> (raw)
In-Reply-To: <20240606122444.2914576-1-luchangqi.123@bytedance.com>

[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]

On Thu, Jun 06, 2024 at 08:24:34PM +0800, Changqi Lu wrote:
> Hi,
> 
> patchv5 has been modified. 
> 
> Sincerely hope that everyone can help review the
> code and provide some suggestions.
> 
> v4->v5:
> - Fixed a memory leak bug at hw/nvme/ctrl.c.
> 
> v3->v4:
> - At the nvme layer, the two patches of enabling the ONCS
>   function and enabling rescap are combined into one.
> - At the nvme layer, add helper functions for pr capacity
>   conversion between the block layer and the nvme layer.
> 
> v2->v3:
> In v2 Persist Through Power Loss(PTPL) is enable default.
> In v3 PTPL is supported, which is passed as a parameter.
> 
> v1->v2:
> - Add sg_persist --report-capabilities for SCSI protocol and enable
>   oncs and rescap for NVMe protocol.
> - Add persistent reservation capabilities constants and helper functions for
>   SCSI and NVMe protocol.
> - Add comments for necessary APIs.
> 
> v1:
> - Add seven APIs about persistent reservation command for block layer.
>   These APIs including reading keys, reading reservations, registering,
>   reserving, releasing, clearing and preempting.
> - Add the necessary pr-related operation APIs for both the
>   SCSI protocol and NVMe protocol at the device layer.
> - Add scsi driver at the driver layer to verify the functions

My question from v1 is unanswered:

  What is the relationship to the existing PRManager functionality
  (docs/interop/pr-helper.rst) where block/file-posix.c interprets SCSI
  ioctls and sends persistent reservation requests to an external helper
  process?

  I wonder if block/file-posix.c can implement the new block driver
  callbacks using pr_mgr (while keeping the existing scsi-generic
  support).

Thanks,
Stefan

> 
> 
> Changqi Lu (10):
>   block: add persistent reservation in/out api
>   block/raw: add persistent reservation in/out driver
>   scsi/constant: add persistent reservation in/out protocol constants
>   scsi/util: add helper functions for persistent reservation types
>     conversion
>   hw/scsi: add persistent reservation in/out api for scsi device
>   block/nvme: add reservation command protocol constants
>   hw/nvme: add helper functions for converting reservation types
>   hw/nvme: enable ONCS and rescap function
>   hw/nvme: add reservation protocal command
>   block/iscsi: add persistent reservation in/out driver
> 
>  block/block-backend.c             | 397 ++++++++++++++++++++++++++
>  block/io.c                        | 163 +++++++++++
>  block/iscsi.c                     | 443 ++++++++++++++++++++++++++++++
>  block/raw-format.c                |  56 ++++
>  hw/nvme/ctrl.c                    | 326 +++++++++++++++++++++-
>  hw/nvme/ns.c                      |   5 +
>  hw/nvme/nvme.h                    |  84 ++++++
>  hw/scsi/scsi-disk.c               | 352 ++++++++++++++++++++++++
>  include/block/block-common.h      |  40 +++
>  include/block/block-io.h          |  20 ++
>  include/block/block_int-common.h  |  84 ++++++
>  include/block/nvme.h              |  98 +++++++
>  include/scsi/constants.h          |  52 ++++
>  include/scsi/utils.h              |   8 +
>  include/sysemu/block-backend-io.h |  24 ++
>  scsi/utils.c                      |  81 ++++++
>  16 files changed, 2231 insertions(+), 2 deletions(-)
> 
> -- 
> 2.20.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2024-06-10 17:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 12:24 [PATCH v5 00/10] Support persistent reservation operations Changqi Lu
2024-06-06 12:24 ` [PATCH v5 01/10] block: add persistent reservation in/out api Changqi Lu
2024-06-10 17:26   ` Stefan Hajnoczi
2024-06-11  2:45     ` [External] " 卢长奇
2024-06-06 12:24 ` [PATCH v5 02/10] block/raw: add persistent reservation in/out driver Changqi Lu
2024-06-06 12:24 ` [PATCH v5 03/10] scsi/constant: add persistent reservation in/out protocol constants Changqi Lu
2024-06-06 12:24 ` [PATCH v5 04/10] scsi/util: add helper functions for persistent reservation types conversion Changqi Lu
2024-06-06 12:24 ` [PATCH v5 05/10] hw/scsi: add persistent reservation in/out api for scsi device Changqi Lu
2024-06-06 12:24 ` [PATCH v5 06/10] block/nvme: add reservation command protocol constants Changqi Lu
2024-06-06 12:24 ` [PATCH v5 07/10] hw/nvme: add helper functions for converting reservation types Changqi Lu
2024-06-06 12:24 ` [PATCH v5 08/10] hw/nvme: enable ONCS and rescap function Changqi Lu
2024-06-06 12:24 ` [PATCH v5 09/10] hw/nvme: add reservation protocal command Changqi Lu
2024-06-06 12:24 ` [PATCH v5 10/10] block/iscsi: add persistent reservation in/out driver Changqi Lu
2024-06-10 17:18 ` Stefan Hajnoczi [this message]
2024-06-11  2:55   ` Re:Re: [PATCH v5 00/10] Support persistent reservation operations 卢长奇
2024-06-11 15:04     ` Stefan Hajnoczi

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=20240610171823.GA334653@fedora.redhat.com \
    --to=stefanha@redhat.com \
    --cc=fam@euphon.net \
    --cc=foss@defmacro.it \
    --cc=hreitz@redhat.com \
    --cc=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=luchangqi.123@bytedance.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pizhenwei@bytedance.com \
    --cc=pl@dlhnet.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.