VirtualBox

Changeset 88716 in vbox


Ignore:
Timestamp:
Apr 26, 2021 8:41:51 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144033
Message:

linux/vboxsf: Document 5.10+ adjustments. We cannot provide both regular and iterative read/write methods because the kernel thinks there might be semantics differences and refuses to do in-kernel reads/writes to our FS. For in-kernel reads/writes there must only be .write_iter/.read_iter now. Restored removed newlines (fingers off my newlines). Rebalanced newlines (multi-function #ifdefs have newline before and after). bugref:9994

File:
1 edited

Legend:

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

    r88571 r88716  
    14671467}
    14681468
    1469 
    1470 #if RTLNX_VER_MAX(5,10,0)
     1469#if RTLNX_VER_MAX(5,10,0) /* No regular .read/.write for 5.10, only .read_iter/.write_iter or in-kernel reads/writes fail. */
     1470
    14711471/**
    14721472 * Read function used when accessing files that are memory mapped.
     
    16271627}
    16281628
     1629
    16291630/**
    16301631 * Read from a regular file.
     
    17251726    return vbsf_reg_read_locking(file, buf, size, off, pSuperInfo, sf_r);
    17261727}
     1728
    17271729#endif /* < 5.10.0 */
    1728 
    17291730
    17301731/**
     
    18141815}
    18151816
    1816 
    1817 #if RTLNX_VER_MAX(5,10,0)
     1817#if RTLNX_VER_MAX(5,10,0) /* No regular .read/.write for 5.10, only .read_iter/.write_iter or in-kernel reads/writes fail. */
     1818
    18181819/**
    18191820 * Fallback case of vbsf_reg_write() that locks the user buffers and let the host
     
    19421943    return cbRet;
    19431944}
     1945
    19441946
    19451947/**
     
    20792081    return vbsf_reg_write_locking(file, buf, size, off, pos, inode, sf_i, pSuperInfo, sf_r);
    20802082}
     2083
    20812084#endif /* < 5.10.0 */
    2082 
    20832085#if RTLNX_VER_MIN(2,6,19)
    20842086
     
    35083510struct file_operations vbsf_reg_fops = {
    35093511    .open            = vbsf_reg_open,
    3510 #if RTLNX_VER_MAX(5,10,0)
     3512#if RTLNX_VER_MAX(5,10,0) /* No regular .read/.write for 5.10, only .read_iter/.write_iter or in-kernel reads/writes fail. */
    35113513    .read            = vbsf_reg_read,
    35123514    .write           = vbsf_reg_write,
Note: See TracChangeset for help on using the changeset viewer.

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