VirtualBox

Ignore:
Timestamp:
Oct 23, 2017 3:11:37 PM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/sharedfolders: stop using generic caching I/O functions.
bugref:2548: Complete shared folders filesystem for Linux guests

Our shared folder file-system driver currently makes use of generic
implementations of read_iter, write_iter and send_file which assume that file-
system data may safely be cached. This does not apply to our shared folders
driver. For kernels 2.6.31 and later we can simply stop using those
functions and the kernel will fall back to defaults which work for us. For
older kernels this still needs to be fixed, and is visible when files are
memory-mapped. See public bugs #819 and #17053.

Fix contributed by David Ellingsworth <david@…>.

File:
1 edited

Legend:

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

    r69151 r69165  
    563563    .mmap        = sf_reg_mmap,
    564564#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    565 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
     565# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
     566/** @todo This code is known to cause caching of data which should not be
     567 * cached.  Investigate. */
     568#  if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
    566569    .splice_read = generic_file_splice_read,
    567 # else
     570#  else
    568571    .sendfile    = generic_file_sendfile,
    569 # endif
    570 # if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
    571     .read_iter   = generic_file_read_iter,
    572     .write_iter  = generic_file_write_iter,
    573 # else
     572#  endif
    574573    .aio_read    = generic_file_aio_read,
    575574    .aio_write   = generic_file_aio_write,
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