qemu-e2k/fsdev
Antonios Motakis 1a6ed33cc5 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>
2019-10-10 11:36:05 +02:00
..
9p-iov-marshal.c fsdev: don't allow unknown format in marshal/unmarshal 2017-05-25 10:30:13 +02:00
9p-iov-marshal.h
9p-marshal.c
9p-marshal.h 9p: unsigned type for type, version, path 2019-10-10 11:36:04 +02:00
file-op-9p.h 9p: Added virtfs option 'multidevs=remap|forbid|warn' 2019-10-10 11:36:05 +02:00
Makefile.objs 9p: simplify source file selection 2019-08-20 17:26:19 +02:00
qemu-fsdev-dummy.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
qemu-fsdev-opts.c 9p: Added virtfs option 'multidevs=remap|forbid|warn' 2019-10-10 11:36:05 +02:00
qemu-fsdev-throttle.c fsdev: Add return value to fsdev_throttle_parse_opts() 2019-10-10 11:36:05 +02:00
qemu-fsdev-throttle.h fsdev: Add return value to fsdev_throttle_parse_opts() 2019-10-10 11:36:05 +02:00
qemu-fsdev.c 9p: Added virtfs option 'multidevs=remap|forbid|warn' 2019-10-10 11:36:05 +02:00
qemu-fsdev.h fsdev: Move some types definition to qemu-fsdev.c 2019-05-17 17:34:48 +02:00
virtfs-proxy-helper.c use g_path_get_basename instead of basename 2018-03-06 14:01:29 +01:00
virtfs-proxy-helper.texi