diff options
author | Fam Zheng <famz@redhat.com> | 2017-05-03 00:35:56 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-05-11 11:15:32 +0200 |
commit | 244a5668106297378391b768e7288eb157616f64 (patch) | |
tree | ac1272b206e9ba0090ca882a5471b5c2768cbd1b /qobject/qint.c | |
parent | e8c1094a0ee081f30ec9716593e7a90ee88623a1 (diff) |
file-posix: Add image locking to perm operations
This extends the permission bits of op blocker API to external using
Linux OFD locks.
Each permission in @perm and @shared_perm is represented by a locked
byte in the image file. Requesting a permission in @perm is translated
to a shared lock of the corresponding byte; rejecting to share the same
permission is translated to a shared lock of a separate byte. With that,
we use 2x number of bytes of distinct permission types.
virtlockd in libvirt locks the first byte, so we do locking from a
higher offset.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qobject/qint.c')
0 files changed, 0 insertions, 0 deletions