/titanic_44/usr/src/uts/common/fs/cachefs/ |
H A D | cachefs_fscache.c | 70 int fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp); 71 int fscdir_find(cachefscache_t *cachep, ino64_t fsid, fscache_t *fscp); 72 static int fscache_info_sync(fscache_t *fscp); 94 fscache_t *fscp; in fscache_create() local 97 fscp = kmem_cache_alloc(cachefs_fscache_cache, KM_SLEEP); in fscache_create() 99 bzero(fscp, sizeof (*fscp)); in fscache_create() 101 mutex_init(&fscp->fs_fslock, NULL, MUTEX_DEFAULT, NULL); in fscache_create() 102 mutex_init(&fscp->fs_idlelock, NULL, MUTEX_DEFAULT, NULL); in fscache_create() 103 mutex_init(&fscp->fs_dlock, NULL, MUTEX_DEFAULT, NULL); in fscache_create() 104 mutex_init(&fscp->fs_cdlock, NULL, MUTEX_DEFAULT, NULL); in fscache_create() [all …]
|
H A D | cachefs_vfsops.c | 147 fscache_t *fscp = NULL; in cachefs_mount() local 388 fscp = fscache_list_find(cachep, fsid); in cachefs_mount() 389 if (fscp == NULL) { in cachefs_mount() 390 fscp = fscache_create(cachep); in cachefs_mount() 391 error = fscache_activate(fscp, fsid, cacheid, in cachefs_mount() 394 fscache_destroy(fscp); in cachefs_mount() 395 fscp = NULL; in cachefs_mount() 404 fscache_list_add(cachep, fscp); in cachefs_mount() 407 error = fscache_compare_options(fscp, cfs_options); in cachefs_mount() 411 fscp = NULL; in cachefs_mount() [all …]
|
H A D | cachefs_ioctl.c | 89 static void cachefs_modified_fix(fscache_t *fscp); 90 static void cachefs_iosetneedattrs(fscache_t *fscp, cfs_cid_t *cidp); 163 fscache_t *fscp = C_TO_FSCACHE(VTOC(dvp)); in cachefs_pack() local 171 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { in cachefs_pack() 177 error = cachefs_cd_access(fscp, connected, 0); in cachefs_pack() 188 if (CFS_TIMEOUT(fscp, error)) { in cachefs_pack() 189 if (fscp->fs_cdconnected == CFS_CD_CONNECTED) { in cachefs_pack() 190 cachefs_cd_release(fscp); in cachefs_pack() 191 cachefs_cd_timedout(fscp); in cachefs_pack() 195 cachefs_cd_release(fscp); in cachefs_pack() [all …]
|
H A D | cachefs_cnode.c | 87 fscache_t *fscp = C_TO_FSCACHE(cp); in cachefs_cnode_idle() local 107 error = cachefs_cd_access(fscp, 0, 1); in cachefs_cnode_idle() 127 if (fscp->fs_cdconnected == CFS_CD_CONNECTED) { in cachefs_cnode_idle() 139 if (CFS_TIMEOUT(fscp, error)) { in cachefs_cnode_idle() 145 if (fscp->fs_cdconnected == CFS_CD_CONNECTED) { in cachefs_cnode_idle() 147 cachefs_cd_release(fscp); in cachefs_cnode_idle() 148 cachefs_cd_timedout(fscp); in cachefs_cnode_idle() 180 mutex_enter(&fscp->fs_idlelock); in cachefs_cnode_idle() 182 if ((fscp->fs_idlecnt > cachefs_max_idle) && in cachefs_cnode_idle() 183 (fscp->fs_idleclean == 0) && in cachefs_cnode_idle() [all …]
|
H A D | cachefs_dlog.c | 74 static int cachefs_dlog_mapreserve(fscache_t *fscp, int size); 185 cachefs_dlog_setup(fscache_t *fscp, int createfile) in cachefs_dlog_setup() argument 195 mutex_enter(&fscp->fs_dlock); in cachefs_dlog_setup() 198 if (fscp->fs_dlogfile) { in cachefs_dlog_setup() 199 ASSERT(fscp->fs_dmapfile); in cachefs_dlog_setup() 204 error = VOP_LOOKUP(fscp->fs_fscdirvp, CACHEFS_DLOG_FILE, in cachefs_dlog_setup() 205 &fscp->fs_dlogfile, NULL, 0, NULL, kcred, NULL, NULL, NULL); in cachefs_dlog_setup() 218 error = VOP_CREATE(fscp->fs_fscdirvp, CACHEFS_DLOG_FILE, in cachefs_dlog_setup() 219 &vattr, 0, 0666, &fscp->fs_dlogfile, kcred, 0, NULL, NULL); in cachefs_dlog_setup() 230 error = vn_rdwr(UIO_WRITE, fscp->fs_dlogfile, (caddr_t)&version, in cachefs_dlog_setup() [all …]
|
H A D | cachefs_vnops.c | 326 fscache_t *fscp = C_TO_FSCACHE(cp); in cachefs_open() local 355 CFS_BACKFS_NFSV4_ASSERT_FSCACHE(fscp); in cachefs_open() 362 ASSERT(CFS_ISFS_BACKFS_NFSV4(fscp) == 0); in cachefs_open() 363 cachefs_cd_release(fscp); in cachefs_open() 366 error = cachefs_cd_access(fscp, connected, 0); in cachefs_open() 381 if (fscp->fs_cdconnected != CFS_CD_CONNECTED) { in cachefs_open() 383 if ((flag & FWRITE) && CFS_ISFS_WRITE_AROUND(fscp)) { in cachefs_open() 420 if ((flag & FWRITE) && CFS_ISFS_WRITE_AROUND(fscp) && in cachefs_open() 427 CFS_DPRINT_BACKFS_NFSV4(fscp, in cachefs_open() 431 if (CFS_TIMEOUT(fscp, error)) { in cachefs_open() [all …]
|
H A D | cachefs_strict.c | 66 static time_t cachefs_gettime_cached_object(struct fscache *fscp, 70 c_strict_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, in c_strict_init_cached_object() argument 82 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_strict_init_cached_object() 83 (fscp->fs_backvfsp == NULL)) in c_strict_init_cached_object() 88 error = cachefs_getbackvp(fscp, cp); in c_strict_init_cached_object() 109 mdp->md_x_time.tv_sec = cachefs_gettime_cached_object(fscp, cp, in c_strict_init_cached_object() 119 c_strict_check_cached_object(struct fscache *fscp, struct cnode *cp, in c_strict_check_cached_object() argument 136 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_strict_check_cached_object() 137 (fscp->fs_backvfsp == NULL)) in c_strict_check_cached_object() 145 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { in c_strict_check_cached_object() [all …]
|
H A D | cachefs_noopc.c | 54 c_nop_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, in c_nop_init_cached_object() argument 64 ASSERT(CFS_ISFS_BACKFS_NFSV4(fscp) == 0); in c_nop_init_cached_object() 69 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_nop_init_cached_object() 70 (fscp->fs_backvfsp == NULL)) in c_nop_init_cached_object() 75 error = cachefs_getbackvp(fscp, cp); in c_nop_init_cached_object() 99 c_nop_check_cached_object(struct fscache *fscp, struct cnode *cp, in c_nop_check_cached_object() argument 111 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_nop_check_cached_object() 112 (fscp->fs_backvfsp == NULL)) in c_nop_check_cached_object() 122 error = cachefs_getbackvp(fscp, cp); in c_nop_check_cached_object() 144 fscp->fs_stats.st_fails++; in c_nop_check_cached_object() [all …]
|
H A D | cachefs_cod.c | 67 c_cod_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, in c_cod_init_cached_object() argument 77 ASSERT(CFS_ISFS_BACKFS_NFSV4(fscp) == 0); in c_cod_init_cached_object() 82 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_cod_init_cached_object() 83 (fscp->fs_backvfsp == NULL)) in c_cod_init_cached_object() 88 error = cachefs_getbackvp(fscp, cp); in c_cod_init_cached_object() 104 mdp->md_x_time = fscp->fs_cod_time; in c_cod_init_cached_object() 111 c_cod_check_cached_object(struct fscache *fscp, struct cnode *cp, in c_cod_check_cached_object() argument 127 if ((fscp->fs_cdconnected != CFS_CD_CONNECTED) || in c_cod_check_cached_object() 128 (fscp->fs_backvfsp == NULL)) in c_cod_check_cached_object() 133 (C_CACHE_VALID(mdp->md_x_time, fscp->fs_cod_time)) && in c_cod_check_cached_object() [all …]
|
H A D | cachefs_filegrp.c | 185 filegrp_create(struct fscache *fscp, cfs_cid_t *cidp) in filegrp_create() argument 192 fgsize = fscp->fs_info.fi_fgsize; in filegrp_create() 211 (void *)fscp, (void *)fgp, in filegrp_create() 218 fgp->fg_fscp = fscp; in filegrp_create() 234 flags = fscp->fs_flags; in filegrp_create() 279 struct fscache *fscp = fgp->fg_fscp; in filegrp_destroy() local 310 cachefs_rlent_verify(fscp->fs_cache, CACHEFS_RL_GC, in filegrp_destroy() 327 error = VOP_REMOVE(fscp->fs_fsattrdir, fname, kcred, in filegrp_destroy() 333 cachefs_freefile(fscp->fs_cache); in filegrp_destroy() 334 cachefs_freeblocks(fscp->fs_cache, in filegrp_destroy() [all …]
|
H A D | cachefs_resource.c | 314 cachefs_move_modified_to_mf(cachefscache_t *cachep, fscache_t *fscp) in cachefs_move_modified_to_mf() argument 345 if (list_ent->rl_fsid != fscp->fs_cfsid) in cachefs_move_modified_to_mf() 538 struct fscache *fscp; in cachefs_victim() local 546 fscp = NULL; in cachefs_victim() 573 fscp = fscache_list_find(cachep, fsid); in cachefs_victim() 574 if (fscp == NULL) { in cachefs_victim() 575 fscp = fscache_create(cachep); in cachefs_victim() 576 error = fscache_activate(fscp, fsid, NULL, NULL, 0); in cachefs_victim() 580 fscache_destroy(fscp); in cachefs_victim() 581 fscp = NULL; in cachefs_victim() [all …]
|
H A D | cachefs_subr.c | 437 fscache_t *fscp = C_TO_FSCACHE(cp); in cachefs_stop_cache() local 438 cachefscache_t *cachep = fscp->fs_cache; in cachefs_stop_cache() 466 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { in cachefs_stop_cache() 472 ASSERT(fscp == cachep->c_fslist); in cachefs_stop_cache() 473 ASSERT(fscp->fs_next == NULL); in cachefs_stop_cache() 480 error = cachefs_cd_access(fscp, 1, 1); in cachefs_stop_cache() 484 error = cachefs_async_halt(&fscp->fs_workq, 1); in cachefs_stop_cache() 493 cachefs_cnode_traverse(fscp, cachefs_cnode_disable_caching); in cachefs_stop_cache() 496 for (fgp = fscp->fs_filegrp[i]; fgp != NULL; in cachefs_stop_cache() 522 mutex_enter(&fscp->fs_fslock); in cachefs_stop_cache() [all …]
|
H A D | cachefs_dir.c | 66 static int cachefs_dir_complete(fscache_t *fscp, vnode_t *backvp, 87 struct fscache *fscp = C_TO_FSCACHE(dcp); in cachefs_dir_look() local 88 cachefscache_t *cachep = fscp->fs_cache; in cachefs_dir_look() 162 cachefs_log_rfdir(cachep, error, fscp->fs_cfsvfsp, in cachefs_dir_look() 761 struct fscache *fscp = C_TO_FSCACHE(dcp); in cachefs_dir_read() local 762 cachefscache_t *cachep = fscp->fs_cache; in cachefs_dir_read() 791 if (fscp->fs_inum_size > 0) { in cachefs_dir_read() 795 mutex_enter(&fscp->fs_fslock); in cachefs_dir_read() 800 newinum = cachefs_inum_real2fake(fscp, in cachefs_dir_read() 803 newinum = cachefs_fileno_conflict(fscp, in cachefs_dir_read() [all …]
|
H A D | cachefs_log.c | 389 struct fscache *fscp; in cachefs_log_logfile_open() local 396 fscp = VFS_TO_FSCACHE(vfsp); in cachefs_log_logfile_open() 397 cachefs_log_mount(cachep, 0, vfsp, fscp, in cachefs_log_logfile_open() 709 fscache_t *fscp, char *upath, enum uio_seg seg, char *cacheid) in cachefs_log_mount() argument 750 if (fscp) { in cachefs_log_mount() 751 record->flags = fscp->fs_info.fi_mntflags; in cachefs_log_mount() 752 record->popsize = fscp->fs_info.fi_popsize; in cachefs_log_mount() 753 record->fgsize = fscp->fs_info.fi_fgsize; in cachefs_log_mount()
|
/titanic_44/usr/src/uts/common/sys/fs/ |
H A D | cachefs_fscache.h | 201 void fscache_destory(fscache_t *fscp); 202 int fscache_activate(fscache_t *fscp, ino64_t fsid, char *namep, 204 int fscache_enable(fscache_t *fscp, ino64_t fsid, char *namep, 206 void fscache_activate_rw(fscache_t *fscp); 207 void fscache_hold(fscache_t *fscp); 208 void fscache_rele(fscache_t *fscp); 209 int fscache_cnodecnt(fscache_t *fscp, int cnt); 210 int fscache_mounted(fscache_t *fscp, struct vfs *cfsvfsp, struct vfs *backvfsp); 211 int fscache_compare_options(fscache_t *fscp, struct cachefsoptions *opnewp); 212 void fscache_sync(fscache_t *fscp); [all …]
|
H A D | cachefs_dlog.h | 283 int cachefs_dlog_setup(fscache_t *fscp, int createfile); 284 void cachefs_dlog_teardown(fscache_t *fscp); 285 int cachefs_dlog_commit(fscache_t *fscp, off_t offset, int error); 286 int cachefs_dlog_cidmap(fscache_t *fscp); 287 off_t cachefs_dlog_setattr(fscache_t *fscp, struct vattr *vap, int flags, 290 cachefs_dlog_setsecattr(fscache_t *fscp, vsecattr_t *vsec, int flags, 292 off_t cachefs_dlog_create(fscache_t *fscp, cnode_t *pcp, char *nm, 294 off_t cachefs_dlog_remove(fscache_t *fscp, cnode_t *pcp, char *nm, cnode_t *cp, 296 off_t cachefs_dlog_link(fscache_t *fscp, cnode_t *pcp, char *nm, cnode_t *cp, 298 off_t cachefs_dlog_rename(fscache_t *fscp, cnode_t *odcp, char *onm, [all …]
|
H A D | cachefs_filegrp.h | 76 filegrp_t *filegrp_create(struct fscache *fscp, cfs_cid_t *cidp); 96 filegrp_t *filegrp_list_find(struct fscache *fscp, cfs_cid_t *cidp); 97 void filegrp_list_add(struct fscache *fscp, filegrp_t *fgp); 98 void filegrp_list_remove(struct fscache *fscp, filegrp_t *fgp); 99 void filegrp_list_gc(struct fscache *fscp); 100 void filegrp_list_enable_caching_ro(struct fscache *fscp); 101 void filegrp_list_enable_caching_rw(struct fscache *fscp);
|
H A D | cachefs_fs.h | 630 #define CFS_BACKFS_NFSV4_ASSERT_FSCACHE(fscp) \ argument 631 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { \ 632 ASSERT((fscp)->fs_info.fi_mntflags == CFS_BACKFS_NFSV4); \ 633 ASSERT((fscp)->fs_cdconnected == CFS_CD_CONNECTED); \ 636 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { \ 650 #define CFS_BACKFS_NFSV4_ASSERT_FSCACHE(fscp) argument 655 #define CFS_DPRINT_BACKFS_NFSV4(fscp, x) \ argument 656 if (CFS_ISFS_BACKFS_NFSV4(fscp)) { \ 661 #define CFS_DPRINT_BACKFS_NFSV4(fscp, x) argument 1125 void cachefs_cnode_idleclean(fscache_t *fscp, int unmount); [all …]
|