fs: Add VirtualBox guest shared folder (vboxsf) support
Subsystems (2)
v4 cover fs: Add VirtualBox guest shared folder (vboxsf) support
Hi All,
As mentioned in the v2 cover letter, now that the vboxguest driver which the vboxsf (guest shared folder) fs driver depends on is queued for merging into 4.16 in char-misc-next, all the dependencies for the vboxsf are in place.
So now its time to work towards also getting vboxsf merged.
This version addresses (AFAIK) all comments made in response to v2.
Changes in v4:
-Drop "name=..." mount option, instead use the dev_name argument to the
mount syscall, to keep compatibility with existing fstab entries
-Fix "nls=%" match_table_t entry to "nls=%s"
Changes in v3:
-Use text only mount options, instead of a custom data struct -Stop caching full path in inode data, if parents gets renamed it will change -Fixed negative dentries handling
-Dropped the force_reread flag for dirs, not sure what it was actually for
but it is no good, doing a re-read on unlink of a file will lead to another file being skipped if the caller has already iterated over the entry for the unlinked file.
-Use file_inode(), file_dentry() and d_inode() helpers
-Prefix any non object-private symbols with vboxsf_ so as to not pollute
the global namespace when builtin
-Add MAINTAINERS entry
-Misc. cleanups
Changes in v2:
-Removed various unused wrapper functions
-Don't use i_private, instead defined alloc_inode and destroy_inode
methods and use container_of.
-Drop obsolete comment referencing people to
http://www.atnf.csiro.au/people/rgooch/linux/vfs.txt
-move the single symlink op of from lnkops.c to file.c
-Use SPDX license headers
-Replace SHFLROOT / SHFLHANDLE defines with normal types -Removed unnecessary S_ISREG checks
-Got rid of bounce_buffer in regops, instead add a "user" flag to
vboxsf_read / vboxsf_write, re-using the existing __user address support in the vboxguest module
-Make vboxsf_wrappers return regular linux errno values
-Use i_size_write to update size on writing
-Convert doxygen style comments to kerneldoc style comments
Please review.
Regards,
Hans
PATCH v4 1/1 fs: Add VirtualBox guest shared folder (vboxsf) support
VirtualBox hosts can share folders with guests, this commit adds a VFS driver implementing the Linux-guest side of this, allowing folders exported by the host to be mounted under Linux.
This driver depends on the guest <-> host IPC functions exported by the vboxguest driver.
--- MAINTAINERS | 6 + fs/Kconfig | 1 + fs/Makefile | 1 + fs/vboxsf/Kconfig | 9 + fs/vboxsf/Makefile | 3 + fs/vboxsf/dir.c | 575 +++++++++++++++++++++++++++ fs/vboxsf/file.c | 414 ++++++++++++++++++++ fs/vboxsf/shfl_hostintf.h | 919 ++++++++++++++++++++++++++++++++++++++++++++ fs/vboxsf/super.c | 429 +++++++++++++++++++++ fs/vboxsf/utils.c | 536 ++++++++++++++++++++++++++ fs/vboxsf/vboxsf_wrappers.c | 370 ++++++++++++++++++ fs/vboxsf/vfsmod.h | 133 +++++++ 12 files changed, 3396 insertions(+) create mode 100644 fs/vboxsf/Kconfig create mode 100644 fs/vboxsf/Makefile create mode 100644 fs/vboxsf/dir.c create mode 100644 fs/vboxsf/file.c create mode 100644 fs/vboxsf/shfl_hostintf.h create mode 100644 fs/vboxsf/super.c create mode 100644 fs/vboxsf/utils.c create mode 100644 fs/vboxsf/vboxsf_wrappers.c create mode 100644 fs/vboxsf/vfsmod.h
MAINTAINERS +6 -0
@@ -14585,6 +14585,12 @@ F: include/linux/vbox_utils.h F: include/uapi/linux/vbox*.h F: drivers/virt/vboxguest/ +VIRTUAL BOX SHARED FOLDER VFS DRIVER: +M: Hans de Goede <[email protected]> +L: [email protected] +S: Maintained +F: fs/vboxsf/* + VIRTUAL SERIO DEVICE DRIVER M: Stephen Chandler Paul <[email protected]> S: Maintained
fs/Kconfig +1 -0
@@ -248,6 +248,7 @@ source "fs/pstore/Kconfig" source "fs/sysv/Kconfig" source "fs/ufs/Kconfig" source "fs/exofs/Kconfig" +source "fs/vboxsf/Kconfig" endif # MISC_FILESYSTEMS
fs/Makefile +1 -0
@@ -129,3 +129,4 @@ obj-y += exofs/ # Multiple modules obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_PSTORE) += pstore/ obj-$(CONFIG_EFIVAR_FS) += efivarfs/ +obj-$(CONFIG_VBOXSF_FS) += vboxsf/
fs/vboxsf/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config VBOXSF_FS + tristate "VirtualBox guest shared folder (vboxsf) support" + depends on VBOXGUEST + help + VirtualBox hosts can share folders with guests, this driver + implements the Linux-guest side of this allowing folders exported + by the host to be mounted under Linux. + + If you want to use shared folders in VirtualBox guests, answer Y or M.
fs/vboxsf/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_VBOXSF_FS) += vboxsf.o + +vboxsf-objs := dir.o file.o utils.o vboxsf_wrappers.o super.o
fs/vboxsf/dir.c new file +575 -0
575 lines not on this page · raw message
fs/vboxsf/file.c new file +414 -0
414 lines not on this page · raw message
fs/vboxsf/shfl_hostintf.h new file +919 -0
919 lines not on this page · raw message
fs/vboxsf/super.c new file +429 -0
429 lines not on this page · raw message
fs/vboxsf/utils.c new file +536 -0
536 lines not on this page · raw message
fs/vboxsf/vboxsf_wrappers.c new file +370 -0
92 lines not on this page · raw message
fs/vboxsf/vfsmod.h new file +133 -0
133 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.14.3
Part of the diff is not shown here. View the raw message.