1a6ed33c | 10-Oct-2019 |
Antonios Motakis <antonios.motakis@huawei.com> |
9p: Added virtfs option 'multidevs=remap|forbid|warn'
'warn' (default): Only log an error message (once) on host if more than one device is shared by same export, except of that just ignore this con
9p: Added virtfs option 'multidevs=remap|forbid|warn'
'warn' (default): Only log an error message (once) on host if more than one device is shared by same export, except of that just ignore this config error though. This is the default behaviour for not breaking existing installations implying that they really know what they are doing.
'forbid': Like 'warn', but except of just logging an error this also denies access of guest to additional devices.
'remap': Allows to share more than one device per export by remapping inodes from host to guest appropriately. To support multiple devices on the 9p share, and avoid qid path collisions we take the device id as input to generate a unique QID path. The lowest 48 bits of the path will be set equal to the file inode, and the top bits will be uniquely assigned based on the top 16 bits of the inode and the device id.
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com> [CS: - Rebased to https://github.com/gkurz/qemu/commits/9p-next (SHA1 7fc4c49e91). - Added virtfs option 'multidevs', original patch simply did the inode remapping without being asked. - Updated hash calls to new xxhash API. - Updated docs for new option 'multidevs'. - Fixed v9fs_do_readdir() not having remapped inodes. - Log error message when running out of prefixes in qid_path_prefixmap(). - Fixed definition of QPATH_INO_MASK. - Wrapped qpp_table initialization to dedicated qpp_table_init() function. - Dropped unnecessary parantheses in qpp_lookup_func(). - Dropped unnecessary g_malloc0() result checks. ] Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> [groug: - Moved "multidevs" parsing to the local backend. - Added hint to invalid multidevs option error. - Turn "remap" into "x-remap". ] Signed-off-by: Greg Kurz <groug@kaod.org>
show more ...
|
ea52cdd4 | 10-Oct-2019 |
Greg Kurz <groug@kaod.org> |
fsdev: Add return value to fsdev_throttle_parse_opts()
It is more convenient to use the return value of the function to notify errors, rather than to be tied up setting up the &local_err boilerplate
fsdev: Add return value to fsdev_throttle_parse_opts()
It is more convenient to use the return value of the function to notify errors, rather than to be tied up setting up the &local_err boilerplate.
Signed-off-by: Greg Kurz <groug@kaod.org>
show more ...
|
aee7f3ec | 17-May-2019 |
Greg Kurz <groug@kaod.org> |
fsdev: Error out when unsupported option is passed
Each fsdriver only supports a subset of the options that can be passed to -fsdev. Unsupported options are simply ignored. This could cause the user
fsdev: Error out when unsupported option is passed
Each fsdriver only supports a subset of the options that can be passed to -fsdev. Unsupported options are simply ignored. This could cause the user to erroneously think QEMU has a bug.
Enforce strict checking of supported options for all fsdrivers. This shouldn't impact libvirt, since it doesn't know about the synth and proxy fsdrivers.
Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
20232435 | 17-May-2019 |
Greg Kurz <groug@kaod.org> |
fsdev: Move some types definition to qemu-fsdev.c
It would make sense for these types to be defined in a header file if we had an API for fsdrivers to register themselves. In practice, we only have
fsdev: Move some types definition to qemu-fsdev.c
It would make sense for these types to be defined in a header file if we had an API for fsdrivers to register themselves. In practice, we only have three of them and it is very unlikely we add new ones since the future of file sharing between host and guest is the upcoming virtio-fs.
Move the types to qemu-fsdev.c instead since they are only used there.
Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
show more ...
|