VirtualBox

Changeset 96227 in vbox


Ignore:
Timestamp:
Aug 16, 2022 3:38:28 PM (2 years ago)
Author:
vboxsync
Message:

Additions: Linux: vboxsf: Initial support for kernel 6.0, bugref:10279.

File:
1 edited

Legend:

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

    r95210 r96227  
    20962096#endif /* < 5.10.0 */
    20972097#if RTLNX_VER_MIN(2,6,19)
     2098/* See kernel 6.0.0 change eba2d3d798295dc43cae8fade102f9d083a2a741. */
     2099# if RTLNX_VER_MIN(6,0,0)
     2100#  define VBOX_IOV_GET_PAGES iov_iter_get_pages2
     2101# else
     2102#  define VBOX_IOV_GET_PAGES iov_iter_get_pages
     2103# endif
    20982104
    20992105/**
     
    21862192                    iov_iter_advance(iter, 0);
    21872193# endif
    2188                 cbSegRet = iov_iter_get_pages(iter, papPages, iov_iter_count(iter), cMaxPages, &offPage0);
     2194                cbSegRet = VBOX_IOV_GET_PAGES(iter, papPages, iov_iter_count(iter), cMaxPages, &offPage0);
    21892195                if (cbSegRet > 0) {
     2196# if RTLNX_VER_MAX(6,0,0)
    21902197                    iov_iter_advance(iter, cbSegRet);
     2198#endif
    21912199                    cbChunk    = (size_t)cbSegRet;
    21922200                    cPages     = RT_ALIGN_Z(offPage0 + cbSegRet, PAGE_SIZE) >> PAGE_SHIFT;
     
    22122220                    cbSeg = iov_iter_single_seg_count(iter);
    22132221                }
    2214                 cbSegRet = iov_iter_get_pages(iter, &papPages[cPages], iov_iter_count(iter), 1, &offPgProbe);
     2222                cbSegRet = VBOX_IOV_GET_PAGES(iter, &papPages[cPages], iov_iter_count(iter), 1, &offPgProbe);
    22152223                if (cbSegRet > 0) {
     2224# if RTLNX_VER_MAX(6,0,0)
    22162225                    iov_iter_advance(iter, cbSegRet); /** @todo maybe not do this if we stash the page? */
     2226#endif
    22172227                    Assert(offPgProbe + cbSegRet <= PAGE_SIZE);
    22182228                    if (offPgProbe == 0) {
     
    22302240                        cbSeg -= cbSegRet;
    22312241                        if (cbSeg > 0) {
    2232                             cbSegRet = iov_iter_get_pages(iter, &papPages[cPages], iov_iter_count(iter), cMaxPages, &offPgProbe);
     2242                            cbSegRet = VBOX_IOV_GET_PAGES(iter, &papPages[cPages], iov_iter_count(iter), cMaxPages, &offPgProbe);
    22332243                            if (cbSegRet > 0) {
    22342244                                size_t const cPgRet = RT_ALIGN_Z((size_t)cbSegRet, PAGE_SIZE) >> PAGE_SHIFT;
    22352245                                Assert(offPgProbe == 0);
     2246# if RTLNX_VER_MAX(6,0,0)
    22362247                                iov_iter_advance(iter, cbSegRet);
     2248# endif
    22372249                                SFLOG3(("vbsf_iter_lock_pages: iov_iter_get_pages() -> %#zx; %#zx pages\n", cbSegRet, cPgRet));
    22382250                                cPages    += cPgRet;
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