Lines Matching defs:fsp

110 static void hs_addfreeb(struct hsfs *fsp, struct hsnode *hp);
112 uint_t last_offset, char *nm, int nmlen, struct hsfs *fsp,
115 static int strip_trailing(struct hsfs *fsp, char *nm, int len);
116 static int hs_namelen(struct hsfs *fsp, char *nm, int len);
211 struct hsfs *fsp;
218 for (fsp = hs_mounttab; fsp != NULL; fsp = fsp->hsfs_next) {
222 (void) dnlc_purge_vfsp(fsp->hsfs_vfs, 0);
227 rw_enter(&fsp->hsfs_hash_lock, RW_WRITER);
228 mutex_enter(&fsp->hsfs_free_lock);
229 for (hp = fsp->hsfs_free_f; hp != NULL; hp = fsp->hsfs_free_f) {
233 fsp->hsfs_free_f = hp->hs_freef;
234 if (fsp->hsfs_free_f != NULL) {
235 fsp->hsfs_free_f->hs_freeb = NULL;
237 fsp->hsfs_free_b = NULL;
243 hs_freenode(HTOV(hp), fsp, 1);
245 mutex_exit(&fsp->hsfs_free_lock);
246 rw_exit(&fsp->hsfs_hash_lock);
255 hs_addfreeb(struct hsfs *fsp, struct hsnode *hp)
260 mutex_enter(&fsp->hsfs_free_lock);
261 ep = fsp->hsfs_free_b;
262 fsp->hsfs_free_b = hp; /* hp is the last entry in free list */
266 fsp->hsfs_free_f = hp; /* hp is only entry in free list */
270 mutex_exit(&fsp->hsfs_free_lock);
278 hs_getfree(struct hsfs *fsp)
282 ASSERT(RW_WRITE_HELD(&fsp->hsfs_hash_lock));
291 mutex_enter(&fsp->hsfs_free_lock);
292 if ((fsp->hsfs_nohsnode < nhsnode) || (fsp->hsfs_free_f == NULL)) {
293 mutex_exit(&fsp->hsfs_free_lock);
295 fsp->hsfs_nohsnode++;
300 hp = fsp->hsfs_free_f;
302 fsp->hsfs_free_f = hp->hs_freef;
303 if (fsp->hsfs_free_f != NULL)
304 fsp->hsfs_free_f->hs_freeb = NULL;
306 fsp->hsfs_free_b = NULL;
307 mutex_exit(&fsp->hsfs_free_lock);
309 for (tp = &fsp->hsfs_hash[HS_HPASH(hp)]; *tp != NULL;
351 hs_remfree(struct hsfs *fsp, struct hsnode *hp)
353 mutex_enter(&fsp->hsfs_free_lock);
357 fsp->hsfs_free_b = hp->hs_freeb;
361 fsp->hsfs_free_f = hp->hs_freef;
362 mutex_exit(&fsp->hsfs_free_lock);
382 struct hsfs *fsp;
384 fsp = VFS_TO_HSFS(vfsp);
386 ASSERT(RW_LOCK_HELD(&fsp->hsfs_hash_lock));
388 for (tp = fsp->hsfs_hash[HS_HASH(nodeid)]; tp != NULL;
417 hs_remfree(fsp, tp);
427 hs_addhash(struct hsfs *fsp, struct hsnode *hp)
431 ASSERT(RW_WRITE_HELD(&fsp->hsfs_hash_lock));
434 hp->hs_hash = fsp->hsfs_hash[hashno];
435 fsp->hsfs_hash[hashno] = hp;
445 struct hsfs *fsp;
451 fsp = VFS_TO_HSFS(vfsp);
452 rvp = fsp->hsfs_rootvp;
454 rw_enter(&fsp->hsfs_hash_lock, RW_WRITER);
456 for (hp = fsp->hsfs_hash[i]; hp != NULL; hp = hp->hs_hash) {
470 rw_exit(&fsp->hsfs_hash_lock);
476 for (hp = fsp->hsfs_hash[i]; hp != NULL; hp = nhp) {
486 hs_remfree(fsp, hp);
487 hs_freenode(vp, fsp, 1);
492 ASSERT(fsp->hsfs_nohsnode == 1);
493 rw_exit(&fsp->hsfs_hash_lock);
520 struct hsfs *fsp;
523 fsp = VFS_TO_HSFS(vfsp);
545 hvp = &fsp->hsfs_vol;
561 (fsp->hsfs_flags & HSFSMNT_INODE) == 0) {
569 rw_enter(&fsp->hsfs_hash_lock, RW_READER);
578 rw_exit(&fsp->hsfs_hash_lock);
579 rw_enter(&fsp->hsfs_hash_lock, RW_WRITER);
587 hp = hs_getfree(fsp);
625 rw_exit(&fsp->hsfs_hash_lock);
635 hs_addhash(fsp, hp);
645 rw_exit(&fsp->hsfs_hash_lock);
663 hs_freenode(vnode_t *vp, struct hsfs *fsp, int nopage)
668 ASSERT(RW_LOCK_HELD(&fsp->hsfs_hash_lock));
670 if (nopage || (fsp->hsfs_nohsnode >= nhsnode)) {
672 for (tp = &fsp->hsfs_hash[HS_HPASH(hp)]; *tp != NULL;
697 fsp->hsfs_nohsnode--;
700 hs_addfreeb(fsp, hp); /* add to back of free list */
716 struct hsfs *fsp;
723 fsp = VFS_TO_HSFS(vfsp);
730 secbp = bread(fsp->hsfs_devvp->v_rdev, secno * 4, HS_SECTOR_SIZE);
739 error = hs_parsedir(fsp, &dirp[off], &hd, (char *)NULL, (int *)NULL,
768 struct hsfs *fsp;
793 fsp = VFS_TO_HSFS(dvp->v_vfsp);
794 is_rrip = IS_RRIP_IMPLEMENTED(fsp);
805 cmpname_size = (int)(fsp->hsfs_namemax + 1);
822 if ((fsp->hsfs_flags & HSFSMNT_NOTRAILDOT) &&
826 if (fsp->hsfs_vol_type == HS_VOL_TYPE_ISO_V2 ||
827 fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET) {
862 cmpname, cmpnamelen, fsp, dhp, dvp, vpp, &error)) {
924 struct hsfs *fsp,
946 if (fsp->hsfs_vol_type == HS_VOL_TYPE_HS) {
965 hs_log_bogus_disk_warning(fsp,
969 hdp->uid = fsp -> hsfs_vol.vol_uid;
970 hdp->gid = fsp -> hsfs_vol.vol_gid;
971 hdp->mode = hdp-> mode | (fsp -> hsfs_vol.vol_prot & 0777);
972 } else if ((fsp->hsfs_vol_type == HS_VOL_TYPE_ISO) ||
973 (fsp->hsfs_vol_type == HS_VOL_TYPE_ISO_V2) ||
974 (fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET)) {
995 hs_log_bogus_disk_warning(fsp,
999 hdp->uid = fsp -> hsfs_vol.vol_uid;
1000 hdp->gid = fsp -> hsfs_vol.vol_gid;
1001 hdp->mode = hdp-> mode | (fsp -> hsfs_vol.vol_prot & 0777);
1008 if (IS_SUSP_IMPLEMENTED(fsp)) {
1011 hdp, fsp,
1048 if (fsp->hsfs_vol.vol_set_size != 1 &&
1049 fsp->hsfs_vol.vol_set_size != HDE_VOL_SET(dirp)) {
1066 * are NOT identical to fsp->hsfs_namemax on this filesystem.
1075 hs_log_bogus_disk_warning(fsp,
1080 if (on_disk_namelen > fsp->hsfs_namelen &&
1081 hs_namelen(fsp, on_disk_name, on_disk_namelen) >
1082 fsp->hsfs_namelen) {
1083 hs_log_bogus_disk_warning(fsp,
1084 fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET ?
1089 on_disk_namelen = fsp->hsfs_namemax; /* Paranoia */
1092 if (fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET) {
1094 on_disk_namelen, fsp->hsfs_namemax,
1095 fsp->hsfs_flags);
1098 * has been truncated to fsp->hsfs_namemax.
1102 hs_log_bogus_disk_warning(fsp,
1110 on_disk_namelen, fsp->hsfs_flags);
1114 if ((fsp->hsfs_flags & HSFSMNT_NOTRAILDOT) &&
1402 struct hsfs *fsp;
1412 fsp = VFS_TO_HSFS(vp ->v_vfsp);
1416 secbp = bread(fsp->hsfs_devvp->v_rdev, secno * 4, HS_SECTOR_SIZE);
1430 (void) hs_parsedir(fsp, &secp[secoff], hdp, (char *)NULL,
1448 struct hsfs *fsp,
1479 is_rrip = IS_RRIP_IMPLEMENTED(fsp);
1516 hs_log_bogus_disk_warning(fsp,
1544 hs_log_bogus_disk_warning(fsp,
1547 } else if (dnamelen > fsp->hsfs_namelen &&
1548 hs_namelen(fsp, dname, dnamelen) > fsp->hsfs_namelen) {
1549 hs_log_bogus_disk_warning(fsp,
1550 fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET ?
1555 dnamelen = fsp->hsfs_namemax; /* Paranoia */
1568 fsp, &hd);
1594 if ((fsp->hsfs_flags & HSFSMNT_NOVERSION) == 0) {
1595 if (fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET) {
1612 } else if (fsp->hsfs_vol_type != HS_VOL_TYPE_ISO_V2 &&
1613 fsp->hsfs_vol_type != HS_VOL_TYPE_JOLIET) {
1614 dnamelen = strip_trailing(fsp, dname, dnamelen);
1619 if (fsp->hsfs_vol_type == HS_VOL_TYPE_ISO_V2) {
1621 } else if (fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET) {
1626 hs_log_bogus_disk_warning(fsp,
1631 (fsp->hsfs_flags & HSFSMNT_NOTRAILDOT) &&
1644 !HSFS_HAVE_LOWER_CASE(fsp) && *nm < *dname) {
1654 parsedir_res = hs_parsedir(fsp, dirp, &hd,
1688 !HSFS_HAVE_LOWER_CASE(fsp) && res < 0) {
1721 strip_trailing(struct hsfs *fsp, char *nm, int len)
1734 hs_log_bogus_disk_warning(fsp, HSFS_ERR_TRAILING_JUNK, 0);
1740 hs_namelen(struct hsfs *fsp, char *nm, int len)
1744 if (fsp->hsfs_vol_type == HS_VOL_TYPE_ISO_V2) {
1746 } else if (fsp->hsfs_vol_type == HS_VOL_TYPE_JOLIET) {