diff options
author | Michael Meskes <meskes@debian.org> | 2009-11-19 17:48:11 +0100 |
---|---|---|
committer | Michael Meskes <meskes@debian.org> | 2009-11-19 17:48:11 +0100 |
commit | fd892711c6bdc0ef96b6b3ea13b668cb2a38196e (patch) | |
tree | e6ec126da2bcd6a490d5661118630edf983580ec /src/VBox/Additions/linux/sharedfolders/vfsmod.c | |
parent | 8dc3a7e38d0783262b1aa8c3462e7359d8996d98 (diff) | |
parent | b35715c68a1bec309bc1990353e35c20a21d5c47 (diff) | |
download | virtualbox-debian/3.0.10-dfsg-2bpo50+1.tar.gz |
Merge branch 'master' into lennydebian/3.0.10-dfsg-2bpo50+1
Conflicts:
debian/changelog
Diffstat (limited to 'src/VBox/Additions/linux/sharedfolders/vfsmod.c')
-rw-r--r-- | src/VBox/Additions/linux/sharedfolders/vfsmod.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.c b/src/VBox/Additions/linux/sharedfolders/vfsmod.c index 0f5a12b89..c951bcf9b 100644 --- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c +++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c @@ -263,7 +263,18 @@ sf_read_super_aux (struct super_block *sb, void *data, int flags) sb->s_magic = 0xface; sb->s_blocksize = 1024; #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 4, 3) - sb->s_maxbytes = ~0ULL; /* seek */ + /* Required for seek/sendfile. + * + * Must by less than or equal to INT64_MAX despite the fact that the + * declaration of this variable is unsigned long long. See determination + * of 'loff_t max' in fs/read_write.c / do_sendfile(). I don't know the + * correct limit but MAX_LFS_FILESIZE (8TB-1 on 32-bit boxes) takes the + * page cache into account and is the suggested limit. */ +# if defined MAX_LFS_FILESIZE + sb->s_maxbytes = MAX_LFS_FILESIZE; +# else + sb->s_maxbytes = 0x7fffffffffffffffULL; +# endif #endif sb->s_op = &sf_super_ops; |