Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 379 
 380 static int nfs4_do_symlink_cache = 1;
 381 
 382 static int nfs4_pathconf_disable_cache = 0;
 383 
 384 /*
 385  * These are the vnode ops routines which implement the vnode interface to
 386  * the networked file system.  These routines just take their parameters,
 387  * make them look networkish by putting the right info into interface structs,
 388  * and then calling the appropriate remote routine(s) to do the work.
 389  *
 390  * Note on directory name lookup cacheing:  If we detect a stale fhandle,
 391  * we purge the directory cache relative to that vnode.  This way, the
 392  * user won't get burned by the cache repeatedly.  See <nfs/rnode4.h> for
 393  * more details on rnode locking.
 394  */
 395 
 396 struct vnodeops *nfs4_vnodeops;
 397 
 398 const fs_operation_def_t nfs4_vnodeops_template[] = {
 399         VOPNAME_OPEN,           { .vop_open = nfs4_open },
 400         VOPNAME_CLOSE,          { .vop_close = nfs4_close },
 401         VOPNAME_READ,           { .vop_read = nfs4_read },
 402         VOPNAME_WRITE,          { .vop_write = nfs4_write },
 403         VOPNAME_IOCTL,          { .vop_ioctl = nfs4_ioctl },
 404         VOPNAME_GETATTR,        { .vop_getattr = nfs4_getattr },
 405         VOPNAME_SETATTR,        { .vop_setattr = nfs4_setattr },
 406         VOPNAME_ACCESS,         { .vop_access = nfs4_access },
 407         VOPNAME_LOOKUP,         { .vop_lookup = nfs4_lookup },
 408         VOPNAME_CREATE,         { .vop_create = nfs4_create },
 409         VOPNAME_REMOVE,         { .vop_remove = nfs4_remove },
 410         VOPNAME_LINK,           { .vop_link = nfs4_link },
 411         VOPNAME_RENAME,         { .vop_rename = nfs4_rename },
 412         VOPNAME_MKDIR,          { .vop_mkdir = nfs4_mkdir },
 413         VOPNAME_RMDIR,          { .vop_rmdir = nfs4_rmdir },
 414         VOPNAME_READDIR,        { .vop_readdir = nfs4_readdir },
 415         VOPNAME_SYMLINK,        { .vop_symlink = nfs4_symlink },
 416         VOPNAME_READLINK,       { .vop_readlink = nfs4_readlink },
 417         VOPNAME_FSYNC,          { .vop_fsync = nfs4_fsync },
 418         VOPNAME_INACTIVE,       { .vop_inactive = nfs4_inactive },
 419         VOPNAME_FID,            { .vop_fid = nfs4_fid },
 420         VOPNAME_RWLOCK,         { .vop_rwlock = nfs4_rwlock },
 421         VOPNAME_RWUNLOCK,       { .vop_rwunlock = nfs4_rwunlock },
 422         VOPNAME_SEEK,           { .vop_seek = nfs4_seek },
 423         VOPNAME_FRLOCK,         { .vop_frlock = nfs4_frlock },
 424         VOPNAME_SPACE,          { .vop_space = nfs4_space },
 425         VOPNAME_REALVP,         { .vop_realvp = nfs4_realvp },
 426         VOPNAME_GETPAGE,        { .vop_getpage = nfs4_getpage },
 427         VOPNAME_PUTPAGE,        { .vop_putpage = nfs4_putpage },
 428         VOPNAME_MAP,            { .vop_map = nfs4_map },
 429         VOPNAME_ADDMAP,         { .vop_addmap = nfs4_addmap },
 430         VOPNAME_DELMAP,         { .vop_delmap = nfs4_delmap },
 431         /* no separate nfs4_dump */
 432         VOPNAME_DUMP,           { .vop_dump = nfs_dump },
 433         VOPNAME_PATHCONF,       { .vop_pathconf = nfs4_pathconf },
 434         VOPNAME_PAGEIO,         { .vop_pageio = nfs4_pageio },
 435         VOPNAME_DISPOSE,        { .vop_dispose = nfs4_dispose },
 436         VOPNAME_SETSECATTR,     { .vop_setsecattr = nfs4_setsecattr },
 437         VOPNAME_GETSECATTR,     { .vop_getsecattr = nfs4_getsecattr },
 438         VOPNAME_SHRLOCK,        { .vop_shrlock = nfs4_shrlock },
 439         VOPNAME_VNEVENT,        { .vop_vnevent = fs_vnevent_support },
 440         NULL,                   NULL
 441 };
 442 
 443 /*
 444  * The following are subroutines and definitions to set args or get res
 445  * for the different nfsv4 ops
 446  */
 447 
 448 void
 449 nfs4args_lookup_free(nfs_argop4 *argop, int arglen)
 450 {
 451         int             i;
 452 
 453         for (i = 0; i < arglen; i++) {
 454                 if (argop[i].argop == OP_LOOKUP) {
 455                         kmem_free(
 456                             argop[i].nfs_argop4_u.oplookup.
 457                             objname.utf8string_val,
 458                             argop[i].nfs_argop4_u.oplookup.
 459                             objname.utf8string_len);
 460                 }




 379 
 380 static int nfs4_do_symlink_cache = 1;
 381 
 382 static int nfs4_pathconf_disable_cache = 0;
 383 
 384 /*
 385  * These are the vnode ops routines which implement the vnode interface to
 386  * the networked file system.  These routines just take their parameters,
 387  * make them look networkish by putting the right info into interface structs,
 388  * and then calling the appropriate remote routine(s) to do the work.
 389  *
 390  * Note on directory name lookup cacheing:  If we detect a stale fhandle,
 391  * we purge the directory cache relative to that vnode.  This way, the
 392  * user won't get burned by the cache repeatedly.  See <nfs/rnode4.h> for
 393  * more details on rnode locking.
 394  */
 395 
 396 struct vnodeops *nfs4_vnodeops;
 397 
 398 const fs_operation_def_t nfs4_vnodeops_template[] = {
 399         { VOPNAME_OPEN,         { .vop_open = nfs4_open } },
 400         { VOPNAME_CLOSE,        { .vop_close = nfs4_close } },
 401         { VOPNAME_READ,         { .vop_read = nfs4_read } },
 402         { VOPNAME_WRITE,        { .vop_write = nfs4_write } },
 403         { VOPNAME_IOCTL,        { .vop_ioctl = nfs4_ioctl } },
 404         { VOPNAME_GETATTR,      { .vop_getattr = nfs4_getattr } },
 405         { VOPNAME_SETATTR,      { .vop_setattr = nfs4_setattr } },
 406         { VOPNAME_ACCESS,       { .vop_access = nfs4_access } },
 407         { VOPNAME_LOOKUP,       { .vop_lookup = nfs4_lookup } },
 408         { VOPNAME_CREATE,       { .vop_create = nfs4_create } },
 409         { VOPNAME_REMOVE,       { .vop_remove = nfs4_remove } },
 410         { VOPNAME_LINK,         { .vop_link = nfs4_link } },
 411         { VOPNAME_RENAME,       { .vop_rename = nfs4_rename } },
 412         { VOPNAME_MKDIR,        { .vop_mkdir = nfs4_mkdir } },
 413         { VOPNAME_RMDIR,        { .vop_rmdir = nfs4_rmdir } },
 414         { VOPNAME_READDIR,      { .vop_readdir = nfs4_readdir } },
 415         { VOPNAME_SYMLINK,      { .vop_symlink = nfs4_symlink } },
 416         { VOPNAME_READLINK,     { .vop_readlink = nfs4_readlink } },
 417         { VOPNAME_FSYNC,        { .vop_fsync = nfs4_fsync } },
 418         { VOPNAME_INACTIVE,     { .vop_inactive = nfs4_inactive } },
 419         { VOPNAME_FID,          { .vop_fid = nfs4_fid } },
 420         { VOPNAME_RWLOCK,       { .vop_rwlock = nfs4_rwlock } },
 421         { VOPNAME_RWUNLOCK,     { .vop_rwunlock = nfs4_rwunlock } },
 422         { VOPNAME_SEEK,         { .vop_seek = nfs4_seek } },
 423         { VOPNAME_FRLOCK,       { .vop_frlock = nfs4_frlock } },
 424         { VOPNAME_SPACE,        { .vop_space = nfs4_space } },
 425         { VOPNAME_REALVP,       { .vop_realvp = nfs4_realvp } },
 426         { VOPNAME_GETPAGE,      { .vop_getpage = nfs4_getpage } },
 427         { VOPNAME_PUTPAGE,      { .vop_putpage = nfs4_putpage } },
 428         { VOPNAME_MAP,          { .vop_map = nfs4_map } },
 429         { VOPNAME_ADDMAP,       { .vop_addmap = nfs4_addmap } },
 430         { VOPNAME_DELMAP,       { .vop_delmap = nfs4_delmap } },
 431         /* no separate nfs4_dump */
 432         { VOPNAME_DUMP,         { .vop_dump = nfs_dump } },
 433         { VOPNAME_PATHCONF,     { .vop_pathconf = nfs4_pathconf } },
 434         { VOPNAME_PAGEIO,       { .vop_pageio = nfs4_pageio } },
 435         { VOPNAME_DISPOSE,      { .vop_dispose = nfs4_dispose } },
 436         { VOPNAME_SETSECATTR,   { .vop_setsecattr = nfs4_setsecattr } },
 437         { VOPNAME_GETSECATTR,   { .vop_getsecattr = nfs4_getsecattr } },
 438         { VOPNAME_SHRLOCK,      { .vop_shrlock = nfs4_shrlock } },
 439         { VOPNAME_VNEVENT,      { .vop_vnevent = fs_vnevent_support } },
 440         { NULL,                 { NULL } }
 441 };
 442 
 443 /*
 444  * The following are subroutines and definitions to set args or get res
 445  * for the different nfsv4 ops
 446  */
 447 
 448 void
 449 nfs4args_lookup_free(nfs_argop4 *argop, int arglen)
 450 {
 451         int             i;
 452 
 453         for (i = 0; i < arglen; i++) {
 454                 if (argop[i].argop == OP_LOOKUP) {
 455                         kmem_free(
 456                             argop[i].nfs_argop4_u.oplookup.
 457                             objname.utf8string_val,
 458                             argop[i].nfs_argop4_u.oplookup.
 459                             objname.utf8string_len);
 460                 }