Project

General

Profile

Actions

Feature #23514

open

[api] image-meta needs to support compare-and-write operation

Added by Jason Dillaman about 6 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

iSCSI would like to re-use image-meta to store port state and persistent group reservations. In the case of PGRs, it needs to be able to protect against racing reservations in a generic fashion. Expand the "metadata_set" APIs to pass a expected value along with the necessary background changes.

Actions #1

Updated by Mahati Chamarthy over 5 years ago

Jason Dillaman wrote:

iSCSI would like to re-use image-meta to store port state and persistent group reservations. In the case of PGRs, it needs to be able to protect against racing reservations in a generic fashion. Expand the "metadata_set" APIs to pass a expected value along with the necessary background changes.

I see there's metadata_set and metadata_get APIs. Should the change compare the expected value and abandon the write in case of a mismatch? Also could you expand on the necessary background changes? It looks like only checking for a mismatch in the related API would do?

Actions

Also available in: Atom PDF