[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v6 04/22] block: Introduce image fi
From: |
Jason Dillaman |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v6 04/22] block: Introduce image file locking |
Date: |
Tue, 7 Jun 2016 21:51:53 -0400 |
On Fri, Jun 3, 2016 at 4:48 AM, Fam Zheng <address@hidden> wrote:
> +typedef enum {
> + /* The values are ordered so that lower number implies higher
> restriction.
> + * Starting from 1 to make 0 an invalid value.
> + * */
> + BDRV_LOCKF_EXCLUSIVE = 1,
> + BDRV_LOCKF_SHARED,
> + BDRV_LOCKF_UNLOCK,
> +} BdrvLockfCmd;
> +
We started to talk about new APIs in librbd to support this feature
where we don't need to worry about admin action should QEMU crash
while holding the lock.
Any chance for separating the UNLOCK enum into the exclusive vs shared
case? We could do some magic in the rbd block driver to guess how it
was locked but it seems like it would be cleaner (at least for us) to
explicitly call out what type of unlock you are requesting since it
will involve different API methods.
--
Jason
[Qemu-block] [PATCH v6 03/22] blockdev: Add and parse "lock-mode" option for image locking, Fam Zheng, 2016/06/03
[Qemu-block] [PATCH v6 05/22] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2016/06/03