diff options
| author | Felix Geyer <debfx-pkg@fobos.de> | 2011-10-17 14:18:31 +0200 |
|---|---|---|
| committer | Felix Geyer <debfx-pkg@fobos.de> | 2011-10-17 14:18:31 +0200 |
| commit | 1cf00a61132b69bc7e27254fdd74bf105d2da28c (patch) | |
| tree | a7d314cc5ec77b4ce3e1f037af600b53ae1d43f8 /src/VBox/Additions/linux/sharedfolders | |
| parent | f8fd93b0b6b13ba94584bb61c1efd1a761f438c9 (diff) | |
| download | virtualbox-1cf00a61132b69bc7e27254fdd74bf105d2da28c.tar.gz | |
Imported Upstream version 4.1.4-dfsgupstream/4.1.4-dfsg
Diffstat (limited to 'src/VBox/Additions/linux/sharedfolders')
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/Makefile.kmk | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | src/VBox/Additions/linux/sharedfolders/files_vboxsf | 2 | ||||
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c | 2 | ||||
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/utils.c | 10 | ||||
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/vbsfmount.c | 2 | ||||
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/vfsmod.c | 5 | ||||
| -rw-r--r-- | src/VBox/Additions/linux/sharedfolders/vfsmod.h | 2 |
7 files changed, 17 insertions, 8 deletions
diff --git a/src/VBox/Additions/linux/sharedfolders/Makefile.kmk b/src/VBox/Additions/linux/sharedfolders/Makefile.kmk index c1d35c038..8baa2ef52 100644 --- a/src/VBox/Additions/linux/sharedfolders/Makefile.kmk +++ b/src/VBox/Additions/linux/sharedfolders/Makefile.kmk @@ -1,4 +1,4 @@ -# $Id: Makefile.kmk 38194 2011-07-27 09:55:19Z vboxsync $ +# $Id: Makefile.kmk $ ## @file # Sub-Makefile for the vboxsf (linux shared folders module). # diff --git a/src/VBox/Additions/linux/sharedfolders/files_vboxsf b/src/VBox/Additions/linux/sharedfolders/files_vboxsf index 6d94398c8..6ad29a626 100644..100755 --- a/src/VBox/Additions/linux/sharedfolders/files_vboxsf +++ b/src/VBox/Additions/linux/sharedfolders/files_vboxsf @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: files_vboxsf 37350 2011-06-07 13:44:25Z vboxsync $ +# $Id: files_vboxsf $ ## @file # Shared file between Makefile.kmk and export_modules # diff --git a/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c b/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c index 9a8c02cd0..16f814ebf 100644 --- a/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c +++ b/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c @@ -530,7 +530,7 @@ main (int argc, char **argv) break; case 3: - panic_err("%s: Could not add an entry to the mount table.", argv[0]); + /* panic_err("%s: Could not add an entry to the mount table.", argv[0]); */ break; default: diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c b/src/VBox/Additions/linux/sharedfolders/utils.c index cb12d8337..22d5b01ad 100644 --- a/src/VBox/Additions/linux/sharedfolders/utils.c +++ b/src/VBox/Additions/linux/sharedfolders/utils.c @@ -18,6 +18,7 @@ */ #include "vfsmod.h" +#include <iprt/asm.h> #include <linux/nfs_fs.h> #include <linux/vfs.h> @@ -827,9 +828,13 @@ struct dentry_operations sf_dentry_ops = .d_revalidate = sf_dentry_revalidate }; -int sf_init_backing_dev(struct sf_glob_info *sf_g, const char *name) +int sf_init_backing_dev(struct sf_glob_info *sf_g) { int rc = 0; + /* Each new shared folder map gets a new uint64_t identifier, + * allocated in sequence. We ASSUME the sequence will not wrap. */ + static uint64_t s_u64Sequence = 0; + uint64_t u64CurrentSequence = ASMAtomicIncU64(&s_u64Sequence); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) sf_g->bdi.ra_pages = 0; /* No readahead */ @@ -844,7 +849,8 @@ int sf_init_backing_dev(struct sf_glob_info *sf_g, const char *name) rc = bdi_init(&sf_g->bdi); # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) if (!rc) - rc = bdi_register(&sf_g->bdi, NULL, "vboxsf-%s", name); + rc = bdi_register(&sf_g->bdi, NULL, "vboxsf-%llu", + (unsigned long long)u64CurrentSequence); # endif /* >= 2.6.26 */ # endif /* >= 2.6.24 */ #endif /* >= 2.6.0 */ diff --git a/src/VBox/Additions/linux/sharedfolders/vbsfmount.c b/src/VBox/Additions/linux/sharedfolders/vbsfmount.c index 2f580db50..f6f704cb8 100644 --- a/src/VBox/Additions/linux/sharedfolders/vbsfmount.c +++ b/src/VBox/Additions/linux/sharedfolders/vbsfmount.c @@ -1,4 +1,4 @@ -/* $Id: vbsfmount.c 31205 2010-07-29 12:48:43Z vboxsync $ */ +/* $Id: vbsfmount.c $ */ /** @file * vbsfmount - Commonly used code to mount shared folders on Linux-based * systems. Currently used by mount.vboxsf and VBoxService. diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.c b/src/VBox/Additions/linux/sharedfolders/vfsmod.c index b0228096e..95aad5279 100644 --- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c +++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c @@ -277,10 +277,13 @@ static int sf_read_super_aux(struct super_block *sb, void *data, int flags) goto fail3; } - if (sf_init_backing_dev(sf_g, info->name)) + if (sf_init_backing_dev(sf_g)) { err = -EINVAL; LogFunc(("could not init bdi\n")); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25) + unlock_new_inode(iroot); +#endif goto fail4; } diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.h b/src/VBox/Additions/linux/sharedfolders/vfsmod.h index 51920eef6..21ab0c14b 100644 --- a/src/VBox/Additions/linux/sharedfolders/vfsmod.h +++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.h @@ -116,7 +116,7 @@ extern void sf_dir_info_empty(struct sf_dir_info *p); extern struct sf_dir_info *sf_dir_info_alloc(void); extern int sf_dir_read_all(struct sf_glob_info *sf_g, struct sf_inode_info *sf_i, struct sf_dir_info *sf_d, SHFLHANDLE handle); -extern int sf_init_backing_dev(struct sf_glob_info *sf_g, const char *name); +extern int sf_init_backing_dev(struct sf_glob_info *sf_g); extern void sf_done_backing_dev(struct sf_glob_info *sf_g); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) |
