All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 00/10] Support persistent reservation operations
@ 2024-07-12  2:36 Changqi Lu
  2024-07-12  2:36 ` [PATCH v9 01/10] block: add persistent reservation in/out api Changqi Lu
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Changqi Lu @ 2024-07-12  2:36 UTC (permalink / raw)
  To: qemu-block, qemu-devel
  Cc: kwolf, hreitz, stefanha, fam, ronniesahlberg, pbonzini, pl,
	kbusch, its, foss, philmd, pizhenwei, Changqi Lu

Hi,

Patch v9 has been modified, thanks to Stefan for the code review.

v8->v9:
- Fix double-free and remove persistent reservation operations at nvme_is_write().

v7->v8:
- Fix num_keys may be less than 0 at scsi_pr_read_keys_complete().
- Fix buf memory leak at iscsi driver.

v6->v7:
- Add buferlen size check at SCSI layer.
- Add pr_cap calculation in bdrv_merge_limits() function at block layer,
  so the ugly bs->file->bs->bl.pr_cap in scsi and nvme layers was
  changed to bs->bl.pr_cap.
- Fix memory leak at iscsi driver, and some other spelling errors.

v5->v6:
- Add relevant comments in the io layer.

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


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             | 403 ++++++++++++++++++++++++++++
 block/io.c                        | 164 ++++++++++++
 block/iscsi.c                     | 423 ++++++++++++++++++++++++++++++
 block/raw-format.c                |  56 ++++
 hw/nvme/ctrl.c                    | 321 ++++++++++++++++++++++-
 hw/nvme/ns.c                      |   5 +
 hw/nvme/nvme.h                    |  88 +++++++
 hw/scsi/scsi-disk.c               | 368 ++++++++++++++++++++++++++
 include/block/block-common.h      |  40 +++
 include/block/block-io.h          |  20 ++
 include/block/block_int-common.h  |  84 ++++++
 include/block/nvme.h              | 100 ++++++-
 include/scsi/constants.h          |  52 ++++
 include/scsi/utils.h              |   8 +
 include/sysemu/block-backend-io.h |  24 ++
 scsi/utils.c                      |  81 ++++++
 16 files changed, 2235 insertions(+), 2 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-08-28  7:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12  2:36 [PATCH v9 00/10] Support persistent reservation operations Changqi Lu
2024-07-12  2:36 ` [PATCH v9 01/10] block: add persistent reservation in/out api Changqi Lu
2024-07-12  2:36 ` [PATCH v9 02/10] block/raw: add persistent reservation in/out driver Changqi Lu
2024-07-12  2:36 ` [PATCH v9 03/10] scsi/constant: add persistent reservation in/out protocol constants Changqi Lu
2024-07-12  2:36 ` [PATCH v9 04/10] scsi/util: add helper functions for persistent reservation types conversion Changqi Lu
2024-07-12  2:36 ` [PATCH v9 05/10] hw/scsi: add persistent reservation in/out api for scsi device Changqi Lu
2024-07-12  2:36 ` [PATCH v9 06/10] block/nvme: add reservation command protocol constants Changqi Lu
2024-07-12  2:36 ` [PATCH v9 07/10] hw/nvme: add helper functions for converting reservation types Changqi Lu
2024-07-12  2:36 ` [PATCH v9 08/10] hw/nvme: enable ONCS and rescap function Changqi Lu
2024-07-12  2:36 ` [PATCH v9 09/10] hw/nvme: add reservation protocal command Changqi Lu
2024-07-15 10:09   ` Klaus Jensen
2024-07-17  9:04     ` 卢长奇
     [not found]     ` <58383d65-83df-4527-81e4-b4d12c409b22@bytedance.com>
2024-07-26  2:42       ` 卢长奇
2024-07-26  6:25         ` Klaus Jensen
2024-07-26  9:54           ` [External] " 卢长奇
2024-08-28  6:05             ` Klaus Jensen
     [not found]           ` <3a799eb6-3350-4b35-8e75-68d9020443cb@bytedance.com>
2024-08-06  2:56             ` Ping: " 卢长奇
2024-08-18 16:57               ` Klaus Jensen
2024-08-28  6:10   ` Klaus Jensen
2024-08-28  6:27     ` [External] " 卢长奇
2024-08-28  6:51   ` Klaus Jensen
2024-08-28  7:20     ` [External] " 卢长奇
2024-08-28  7:27       ` Klaus Jensen
2024-07-12  2:36 ` [PATCH v9 10/10] block/iscsi: add persistent reservation in/out driver Changqi Lu

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.