VirtualBox

Changeset 23551 in vbox


Ignore:
Timestamp:
Oct 5, 2009 11:28:35 AM (15 years ago)
Author:
vboxsync
Message:

Linux guest additions: fixed the s_maxbytes member of the super_block structure to allow sendfile() operations on shared folders (returns with -EOVERFLOW otherwise)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r21683 r23551  
    261261        sb->s_blocksize = 1024;
    262262#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 4, 3)
    263         sb->s_maxbytes = ~0ULL; /* seek */
     263        /* Required for seek/sendfile.
     264         *
     265         * Must by less than or equal to INT64_MAX despite the fact that the
     266         * declaration of this variable is unsigned long long. See determination
     267         * of 'loff_t max' in fs/read_write.c / do_sendfile(). I don't know the
     268         * correct limit but MAX_LFS_FILESIZE (8TB-1 on 32-bit boxes) takes the
     269         * page cache into account and is the suggested limit. */
     270# if defined MAX_LFS_FILESIZE
     271        sb->s_maxbytes = MAX_LFS_FILESIZE;
     272# else
     273        sb->s_maxbytes = 0x7fffffffffffffffULL;
     274# endif
    264275#endif
    265276        sb->s_op = &sf_super_ops;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette