VirtualBox

Ticket #2921: vfsmod.c.diff

File vfsmod.c.diff, 910 bytes (added by Frank Mehnert, 15 years ago)
  • vfsmod.

    old new  
    263263        sb->s_magic = 0xface;
    264264        sb->s_blocksize = 1024;
    265265#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 4, 3)
    266         sb->s_maxbytes = ~0ULL; /* seek */
     266        /* Required for seek/sendfile.
     267         *
     268         * Must by less than or equal to INT64_MAX despite the fact that the
     269         * declaration of this variable is unsigned long long. See determination
     270         * of 'loff_t max' in fs/read_write.c / do_sendfile(). I don't know the
     271         * correct limit but MAX_LFS_FILESIZE (8TB-1 on 32-bit boxes) takes the
     272         * page cache into account and is the suggested limit. */
     273# if defined MAX_LFS_FILESIZE
     274        sb->s_maxbytes = MAX_LFS_FILESIZE;
     275# else
     276        sb->s_maxbytes = 0x7fffffffffffffffULL;
     277# endif
    267278#endif
    268279        sb->s_op = &sf_super_ops;
    269280

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