Skip to contentSkip to conversation

fs: Add VirtualBox guest shared folder (vboxsf) support

PATCH Superseded Hans de Goede 2 participants 5 messages Dec 12, 2019 – Jan 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v19 cover fs: Add VirtualBox guest shared folder (vboxsf) support

Hello Everyone,

Here is the 19th version of my cleaned-up / refactored version of the VirtualBox shared-folder VFS driver.

This version addresses all remarks from Al Viro's review of v18.

I believe that this is ready for upstream merging now, if this needs more work please let me know.

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Regards,

Hans

---

Full changelog:

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Changes in v18:
- Move back to fs/vboxsf for direct submission to Linus
- Squash in a few small fixes done during vboxsf's brief stint in staging
- Add handling of short copies to vboxsf_write_end
- Add a comment about our simple_write_begin usage (Suggested by David Howell)

Changes in v17:
- Submit upstream through drivers/staging as this is not getting any traction on the fsdevel list
- Add TODO file
- vboxsf_free_inode uses sbi->idr, call rcu_barrier from put_super to make sure all delayed rcu free inodes are flushed

Changes in v16:
- Make vboxsf_parse_monolithic() static, reported-by: kbuild test robot

Changes in v15:
- Rebase on top of 5.4-rc1

Changes in v14
- Add a commment explaining possible read cache strategies and which one has been chosen
- Change pagecache-invalidation on open (inode_revalidate) to use invalidate_inode_pages2() so that mmap-ed pages are dropped from the cache too
- Add a comment to vboxsf_file_release explaining why the filemap_write_and_wait() call is done there
- Some minor code tweaks

Changes in v13
- Add SPDX tag to Makefile, use foo-y := to set objectfile list
- Drop kerneldoc headers stating the obvious from vfs callbacks, to avoid them going stale
- Replace sf_ prefix of functions and data-types with vboxsf_
- Use more normal naming scheme for sbi and private inode data:

    struct vboxsf_sbi *sbi = VBOXSF_SBI(inode->i_sb);
    struct vboxsf_inode *sf_i = VBOXSF_I(inode);

- Refactor directory reading code
- Use goto based unwinding instead of nested if-s in a number of places
- Consolidate dir unlink and rmdir inode_operations into a single function
- Use the page-cache for regular reads/writes too
- Directly set super_operations.free_inode to what used to be our vboxsf_i_callback, instead of setting super_operations.destroy_inode to a function which just does: call_rcu(&inode->i_rcu, vboxsf_i_callback);
- Use spinlock_irqsafe for ino_idr_lock
vboxsf_free_inode may be called from a RCU callback, and thus from softirq context, so we need to use spinlock_irqsafe vboxsf_new_inode. On alloc_inode failure vboxsf_free_inode may be called from process context, so it too needs to use spinlock_irqsafe.

Changes in v12:
- Move make_kuid / make_kgid calls to option parsing time and add uid_valid / gid_valid checks.
- In init_fs_context call current_uid_gid() to init uid and gid
- Validate dmode, fmode, dmask and fmask options during option parsing
- Use correct types for various mount option variables (kuid_t, kgid_t, umode_t)
- Some small coding-style tweaks

Changes in v11:
- Convert to the new Documentation/filesystems/mount_api.txt mount API
- Fixed all the function kerneldoc comments to have things in the proper order
- Change type of d_type variable passed as type to dir_emit from int to unsigned int
- Replaced the fake-ino overflow test with the one suggested by David Howells
- Fixed various coding style issues

Changes in v10:
-Code-style fixes and remove some unneeded checks as suggested by Al Viro -Stop handle reuse between sf_create_aux and sf_reg_open, the code for this
was racy and the re-use meant the O_APPEND was not passed to the host for newly created files with O_APPEND set
-Use idr to generate unique inode number, modelled after the kernfs code -Only read and write the contents of the passed in offset pointer once in
sf_reg_write
-Keep a list of refcounted open handles in the inode, so that writepage can
get a writeable handle this way. This replaces the old very racy code which was just storing a pointer to the last opened struct file inside the inode. This is modelled after how the cifs and fuse code do this

Changes in v9:
-Change license from GPL-2.0 or CDDL-1.0 to MIT, following upstream's
license change from: https://www.virtualbox.org/changeset/72627/vbox
I've gotten permission by email from VirtualBox upstream to retro-actively apply the license-change to my "fork" of the vboxsf code
-Fix not being able to mount any shared-folders when built with gcc9 -Adjust for recent vboxguest changes
-Fix potential buffer overrun in vboxsf_nlscpy
-Fix build errors in some configs, caught by buildbot
-Fix 3 sparse warnings
-Some changes from upstream VirtualBox svn:
-Use 0x786f4256 /* 'VBox' little endian */ as super-magic matching upstream -Implement AT_STATX_SYNC_TYPE support
-Properly return -EPERM when symlink creation is not supported

Changes in v8:
-Fix broken error-handling / oops when the vboxsf_map_folder() call fails -Fix umount using umount.nfs to umount vboxsf mounts
-Prefixed the modules init and exit function names with vboxsf_ -Delay connecting to the vbox hypervisor until the first mount, this fixes
vboxsf not working when it is builtin (in which case it may be initialized before the vboxguest driver has bound to the guest communication PCI device)
-Fix sf_write_end return value, return the number of bytes written or 0 on error:
https://github.com/jwrdegoede/vboxsf/issues/2
-Use an ida id in the name passed to super_setup_bdi_name so that the same
shared-folder can be mounted twice without causing a
"sysfs: cannot create duplicate filename" error
https://github.com/jwrdegoede/vboxsf/issues/3

Changes in v7:
-Do not propagate sgid / suid bits between guest-host, note hosts with
VirtualBox version 5.2.6 or newer will filter these out regardless of what we do
-Better error messages when we cannot connect to the VirtualBox guest PCI
device, which may e.g. happen when trying to use vboxsf outside a vbox vm

Changes in v6:
-Address: https://www.virtualbox.org/ticket/819 which really is multiple bugs:
1) Fix MAP_SHARED not being supported
2) Fix changes done through regular read/write on the guest side not being seen by guest apps using mmap() access
3) Fix any changes done on the host side not being seen by guest apps using mmap() access

Changes in v5:
-Honor CONFIG_NLS_DEFAULT (reported-by [email protected])

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

#1 lore raw

PATCH v19 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.

---
Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Changes in v18:
- Move back to fs/vboxsf for direct submission to Linus
- Squash in a few small fixes done during vboxsf's brief stint in staging
- Add handling of short copies to vboxsf_write_end
- Add a comment about our simple_write_begin usage (Suggested by David Howell)

Changes in v17:
- Submit upstream through drivers/staging as this is not getting any traction on the fsdevel list
- Add TODO file
- vboxsf_free_inode uses sbi->idr, call rcu_barrier from put_super to make sure all delayed rcu free inodes are flushed

Changes in v16:
- Make vboxsf_parse_monolithic() static, reported-by: kbuild test robot

Changes in v15:
- Rebase on top of 5.4-rc1

Changes in v14
- Add a commment explaining possible read cache strategies and which one has been chosen
- Change pagecache-invalidation on open (inode_revalidate) to use invalidate_inode_pages2() so that mmap-ed pages are dropped from the cache too
- Add a comment to vboxsf_file_release explaining why the filemap_write_and_wait() call is done there
- Some minor code tweaks

Changes in v13
- Add SPDX tag to Makefile, use foo-y := to set objectfile list
- Drop kerneldoc headers stating the obvious from vfs callbacks, to avoid them going stale
- Replace sf_ prefix of functions and data-types with vboxsf_
- Use more normal naming scheme for sbi and private inode data:

    struct vboxsf_sbi *sbi = VBOXSF_SBI(inode->i_sb);
    struct vboxsf_inode *sf_i = VBOXSF_I(inode);

- Refactor directory reading code
- Use goto based unwinding instead of nested if-s in a number of places
- Consolidate dir unlink and rmdir inode_operations into a single function
- Use the page-cache for regular reads/writes too
- Directly set super_operations.free_inode to what used to be our vboxsf_i_callback, instead of setting super_operations.destroy_inode to a function which just does: call_rcu(&inode->i_rcu, vboxsf_i_callback);
- Use spinlock_irqsafe for ino_idr_lock
vboxsf_free_inode may be called from a RCU callback, and thus from softirq context, so we need to use spinlock_irqsafe vboxsf_new_inode. On alloc_inode failure vboxsf_free_inode may be called from process context, so it too needs to use spinlock_irqsafe.

Changes in v12:
- Move make_kuid / make_kgid calls to option parsing time and add uid_valid / gid_valid checks.
- In init_fs_context call current_uid_gid() to init uid and gid
- Validate dmode, fmode, dmask and fmask options during option parsing
- Use correct types for various mount option variables (kuid_t, kgid_t, umode_t)
- Some small coding-style tweaks

Changes in v11:
- Convert to the new Documentation/filesystems/mount_api.txt mount API
- Fixed all the function kerneldoc comments to have things in the proper order
- Change type of d_type variable passed as type to dir_emit from int to unsigned int
- Replaced the fake-ino overflow test with the one suggested by David Howells
- Fixed various coding style issues

See cover-letter for full changelog including older versions

---
 MAINTAINERS                 |   6 +
 fs/Kconfig                  |   1 +
 fs/Makefile                 |   1 +
 fs/vboxsf/Kconfig           |  10 +
 fs/vboxsf/Makefile          |   5 +
 fs/vboxsf/dir.c             | 427 +++++++++++++++++
 fs/vboxsf/file.c            | 379 +++++++++++++++
 fs/vboxsf/shfl_hostintf.h   | 901 ++++++++++++++++++++++++++++++++++++
 fs/vboxsf/super.c           | 497 ++++++++++++++++++++
 fs/vboxsf/utils.c           | 551 ++++++++++++++++++++++
 fs/vboxsf/vboxsf_wrappers.c | 371 +++++++++++++++
 fs/vboxsf/vfsmod.h          | 137 ++++++
 12 files changed, 3286 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
index 02d5278a4c9a..90302540b12d 100644
@@ -17591,6 +17591,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
index 7b623e9fc1b0..8493a3f0c4b1 100644
@@ -264,6 +264,7 @@ source "fs/pstore/Kconfig"
 source "fs/sysv/Kconfig"
 source "fs/ufs/Kconfig"
 source "fs/erofs/Kconfig"
+source "fs/vboxsf/Kconfig"
 
 endif # MISC_FILESYSTEMS
 
fs/Makefile +1 -0
index 1148c555c4d3..b807cbff3790 100644
@@ -133,3 +133,4 @@ obj-$(CONFIG_CEPH_FS)		+= ceph/
 obj-$(CONFIG_PSTORE)		+= pstore/
 obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
 obj-$(CONFIG_EROFS_FS)		+= erofs/
+obj-$(CONFIG_VBOXSF_FS)		+= vboxsf/
fs/vboxsf/Kconfig new file +10 -0
new file mode 100644
index 000000000000..b84586ae08b3
@@ -0,0 +1,10 @@
+config VBOXSF_FS
+	tristate "VirtualBox guest shared folder (vboxsf) support"
+	depends on X86 && VBOXGUEST
+	select NLS
+	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 +5 -0
new file mode 100644
index 000000000000..9e4328e79623
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+
+obj-$(CONFIG_VBOXSF_FS) += vboxsf.o
+
+vboxsf-y := dir.o file.o utils.o vboxsf_wrappers.o super.o
fs/vboxsf/dir.c new file +427 -0

427 lines not on this page · raw message

fs/vboxsf/file.c new file +379 -0

379 lines not on this page · raw message

fs/vboxsf/shfl_hostintf.h new file +901 -0

901 lines not on this page · raw message

fs/vboxsf/super.c new file +497 -0

497 lines not on this page · raw message

fs/vboxsf/utils.c new file +551 -0

551 lines not on this page · raw message

fs/vboxsf/vboxsf_wrappers.c new file +371 -0

207 lines not on this page · raw message

fs/vboxsf/vfsmod.h new file +137 -0

137 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.23.0

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Hans de Goede

Hi All,

Quoted 10 lines · Hans de Goede

Hello Everyone,

Here is the 19th version of my cleaned-up / refactored version of the VirtualBox shared-folder VFS driver.

This version addresses all remarks from Al Viro's review of v18.

I believe that this is ready for upstream merging now, if this needs more work please let me know.

Quoted 7 lines

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Ping? Can I please either get some feedback on this patch, or can we get this merged / queued up for 5.6 please ?

Regards,

Hans

Quoted 174 lines

---

Full changelog:

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Changes in v18:
- Move back to fs/vboxsf for direct submission to Linus
- Squash in a few small fixes done during vboxsf's brief stint in staging
- Add handling of short copies to vboxsf_write_end
- Add a comment about our simple_write_begin usage (Suggested by David Howell)

Changes in v17:
- Submit upstream through drivers/staging as this is not getting any traction on the fsdevel list
- Add TODO file
- vboxsf_free_inode uses sbi->idr, call rcu_barrier from put_super to make sure all delayed rcu free inodes are flushed

Changes in v16:
- Make vboxsf_parse_monolithic() static, reported-by: kbuild test robot

Changes in v15:
- Rebase on top of 5.4-rc1

Changes in v14
- Add a commment explaining possible read cache strategies and which one has been chosen
- Change pagecache-invalidation on open (inode_revalidate) to use invalidate_inode_pages2() so that mmap-ed pages are dropped from the cache too
- Add a comment to vboxsf_file_release explaining why the filemap_write_and_wait() call is done there
- Some minor code tweaks

Changes in v13
- Add SPDX tag to Makefile, use foo-y := to set objectfile list
- Drop kerneldoc headers stating the obvious from vfs callbacks, to avoid them going stale
- Replace sf_ prefix of functions and data-types with vboxsf_
- Use more normal naming scheme for sbi and private inode data:

     struct vboxsf_sbi *sbi = VBOXSF_SBI(inode->i_sb);
     struct vboxsf_inode *sf_i = VBOXSF_I(inode);

- Refactor directory reading code
- Use goto based unwinding instead of nested if-s in a number of places
- Consolidate dir unlink and rmdir inode_operations into a single function
- Use the page-cache for regular reads/writes too
- Directly set super_operations.free_inode to what used to be our vboxsf_i_callback, instead of setting super_operations.destroy_inode to a function which just does: call_rcu(&inode->i_rcu, vboxsf_i_callback);
- Use spinlock_irqsafe for ino_idr_lock
vboxsf_free_inode may be called from a RCU callback, and thus from softirq context, so we need to use spinlock_irqsafe vboxsf_new_inode. On alloc_inode failure vboxsf_free_inode may be called from process context, so it too needs to use spinlock_irqsafe.

Changes in v12:
- Move make_kuid / make_kgid calls to option parsing time and add uid_valid / gid_valid checks.
- In init_fs_context call current_uid_gid() to init uid and gid
- Validate dmode, fmode, dmask and fmask options during option parsing
- Use correct types for various mount option variables (kuid_t, kgid_t, umode_t)
- Some small coding-style tweaks

Changes in v11:
- Convert to the new Documentation/filesystems/mount_api.txt mount API
- Fixed all the function kerneldoc comments to have things in the proper order
- Change type of d_type variable passed as type to dir_emit from int to unsigned int
- Replaced the fake-ino overflow test with the one suggested by David Howells
- Fixed various coding style issues

Changes in v10:

(quoted diff) +0 -5
-Code-style fixes and remove some unneeded checks as suggested by Al Viro
-Stop handle reuse between sf_create_aux and sf_reg_open, the code for this
  was racy and the re-use meant the O_APPEND was not passed to the host for
  newly created files with O_APPEND set
-Use idr to generate unique inode number, modelled after the kernfs code
-Only read and write the contents of the passed in offset pointer once in
  sf_reg_write
-Keep a list of refcounted open handles in the inode, so that writepage can
  get a writeable handle this way. This replaces the old very racy code which
  was just storing a pointer to the last opened struct file inside the inode.
  This is modelled after how the cifs and fuse code do this

Changes in v9:

(quoted diff) +0 -7
-Change license from GPL-2.0 or CDDL-1.0 to MIT, following upstream's
  license change from: https://www.virtualbox.org/changeset/72627/vbox
  I've gotten permission by email from VirtualBox upstream to retro-actively
  apply the license-change to my "fork" of the vboxsf code
-Fix not being able to mount any shared-folders when built with gcc9
-Adjust for recent vboxguest changes
-Fix potential buffer overrun in vboxsf_nlscpy
-Fix build errors in some configs, caught by buildbot
-Fix 3 sparse warnings
-Some changes from upstream VirtualBox svn:
  -Use 0x786f4256 /* 'VBox' little endian */ as super-magic matching upstream
  -Implement AT_STATX_SYNC_TYPE support
  -Properly return -EPERM when symlink creation is not supported

Changes in v8:

(quoted diff) +0 -6
-Fix broken error-handling / oops when the vboxsf_map_folder() call fails
-Fix umount using umount.nfs to umount vboxsf mounts
-Prefixed the modules init and exit function names with vboxsf_
-Delay connecting to the vbox hypervisor until the first mount, this fixes
  vboxsf not working when it is builtin (in which case it may be initialized
  before the vboxguest driver has bound to the guest communication PCI device)
-Fix sf_write_end return value, return the number of bytes written or 0 on error:
  https://github.com/jwrdegoede/vboxsf/issues/2
-Use an ida id in the name passed to super_setup_bdi_name so that the same
  shared-folder can be mounted twice without causing a
  "sysfs: cannot create duplicate filename" error
  https://github.com/jwrdegoede/vboxsf/issues/3

Changes in v7:

(quoted diff) +0 -2
-Do not propagate sgid / suid bits between guest-host, note hosts with
  VirtualBox version 5.2.6 or newer will filter these out regardless of what
  we do
-Better error messages when we cannot connect to the VirtualBox guest PCI
  device, which may e.g. happen when trying to use vboxsf outside a vbox vm

Changes in v6:
-Address: https://www.virtualbox.org/ticket/819 which really is multiple bugs:
1) Fix MAP_SHARED not being supported
2) Fix changes done through regular read/write on the guest side not being seen by guest apps using mmap() access
3) Fix any changes done on the host side not being seen by guest apps using mmap() access

Changes in v5:
-Honor CONFIG_NLS_DEFAULT (reported-by [email protected])

Changes in v4:

(quoted diff) +0 -2
-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:

(quoted diff) +0 -8
-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:

(quoted diff) +0 -11
-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
maintainer
#3 lore raw
Quoted 21 lines · Hans de Goede

Hi All,

Quoted 10 lines · Hans de Goede

Hello Everyone,

Here is the 19th version of my cleaned-up / refactored version of the VirtualBox shared-folder VFS driver.

This version addresses all remarks from Al Viro's review of v18.

I believe that this is ready for upstream merging now, if this needs more work please let me know.

Quoted 7 lines

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Quoted 2 lines

Ping? Can I please either get some feedback on this patch, or can we get this merged / queued up for 5.6 please ?

Merged and pushed into #for-next

#4 lore raw

Hi,

Quoted 22 lines · Al Viro
Quoted 21 lines · Hans de Goede

Hi All,

Quoted 17 lines · Hans de Goede

Hello Everyone,

Here is the 19th version of my cleaned-up / refactored version of the VirtualBox shared-folder VFS driver.

This version addresses all remarks from Al Viro's review of v18.

I believe that this is ready for upstream merging now, if this needs more work please let me know.

Changes in v19:
- Misc. small code tweaks suggested by Al Viro (no functional changes)
- Do not increment dir_context->pos when dir_emit has returned false.
- Add a WARN_ON check for trying to access beyond the end of a vboxsf directory buffer, this uses WARN_ON as this means the host has given us corrupt data
- Catch the user passing the "nls" opt more then once

Quoted 4 lines
Quoted 2 lines

Ping? Can I please either get some feedback on this patch, or can we get this merged / queued up for 5.6 please ?

Merged and pushed into #for-next

Great, thank you.

Regards,

Hans