VirtualBox

Ignore:
Timestamp:
Jun 30, 2010 8:04:26 AM (14 years ago)
Author:
vboxsync
Message:

Additions/Solaris/SharedFolders: stat caching to reduce number of host calls. introduced stat_ttl option during mount.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c

    r28800 r30519  
    3636#include "vboxfs_vnode.h"
    3737#include "vboxfs_vfs.h"
     38#include "vboxfs.h"
    3839
    3940#ifdef u
     
    6465        /* Option       Cancels Opt     Arg     Flags           Data */
    6566        {"uid",         NULL,           NULL,   MO_HASVALUE,    NULL},
    66         {"gid",         NULL,           NULL,   MO_HASVALUE,    NULL}
     67        {"gid",         NULL,           NULL,   MO_HASVALUE,    NULL},
     68        {"stat_ttl",    NULL,           NULL,   MO_HASVALUE,    NULL}
    6769};
    6870
     
    227229        uid_t uid = 0;
    228230        gid_t gid = 0;
     231        int stat_ttl = DEF_STAT_TTL_MS;
    229232        char *optval;
    230233        long val;
     
    287290            (gid_t)val == val)
    288291                gid = val;
     292
     293        /*
     294         * ttl to use for stat caches
     295         */
     296        if (vfs_optionisset(vfsp, "stat_ttl", &optval) &&
     297            ddi_strtol(optval, NULL, 10, &val) == 0 &&
     298            (int)val == val)
     299                stat_ttl = val;
    289300
    290301        /*
     
    339350        sffs->sf_uid = uid;
    340351        sffs->sf_gid = gid;
     352        sffs->sf_stat_ttl = stat_ttl;
    341353        sffs->sf_share_name = share_name;
    342354        sffs->sf_mntpath = mount_point;
     
    362374        strcpy(path, ".");
    363375        mutex_enter(&sffs_lock);
    364         sfnode = sfnode_make(sffs, path, VDIR, NULL, NULL);
     376        sfnode = sfnode_make(sffs, path, VDIR, NULL, NULL, NULL, 0);
    365377        sffs->sf_rootnode = sfnode_get_vnode(sfnode);
    366378        sffs->sf_rootnode->v_flag |= VROOT;
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