OSDN Git Service

stream: Use real permissions in streaming block job
authorKevin Wolf <kwolf@redhat.com>
Thu, 9 Feb 2017 12:34:18 +0000 (13:34 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Feb 2017 19:47:50 +0000 (20:47 +0100)
commita170a91fd3eab6155da39e740381867e80bcc93e
tree2d89e721a563130bc7bc9e990654c64118cb753c
parent4ef85a9c233936d9ac1400d67b066353a6e9f32f
stream: Use real permissions in streaming block job

The correct permissions are relatively obvious here (and explained in
code comments). For intermediate streaming, we need to reopen the top
node read-write before creating the job now because the permissions
system catches attempts to get the BLK_PERM_WRITE_UNCHANGED permission
on a read-only node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
block/stream.c