Lines Matching defs:fsp
84 struct pcfs *fsp, /* filsystem for node */
94 ASSERT(fsp->pcfs_flags & PCFS_LOCKED);
99 scluster = pc_getstartcluster(fsp, ep);
109 hp = &pcdhead[PCDHASH(fsp, scluster)];
113 if ((fsp == VFSTOPCFS(PCTOV(pcp)->v_vfsp)) &&
122 hp = &pcfhead[PCFHASH(fsp, blkno, offset)];
126 if ((fsp == VFSTOPCFS(PCTOV(pcp)->v_vfsp)) &&
157 if (IS_FAT32(fsp)) {
160 scluster = fsp->pcfs_rdirstart;
161 if (pc_fileclsize(fsp, scluster, &ncl)) {
167 pcp->pc_size = fsp->pcfs_clsize * ncl;
170 fsp->pcfs_rdirsec * fsp->pcfs_secsize;
175 if (pc_fileclsize(fsp, scluster, &ncl)) {
180 pcp->pc_size = fsp->pcfs_clsize * ncl;
186 fsp->pcfs_frefs++;
189 fsp->pcfs_nrefs++;
190 VFS_HOLD(PCFSTOVFS(fsp));
192 vp->v_vfsp = PCFSTOVFS(fsp);
216 struct pcfs *fsp;
223 fsp = VFSTOPCFS(vp->v_vfsp);
224 ASSERT(fsp->pcfs_flags & PCFS_LOCKED);
254 (void) pc_syncfat(fsp);
280 fsp->pcfs_frefs--;
282 fsp->pcfs_nrefs--;
285 if (fsp->pcfs_nrefs < 0) {
288 if (fsp->pcfs_frefs < 0) {
303 pc_mark_mod(struct pcfs *fsp, struct pcnode *pcp)
325 pc_mark_acc(struct pcfs *fsp, struct pcnode *pcp)
330 if (fsp->pcfs_flags & PCFS_NOATIME || PCTOV(pcp)->v_type == VDIR)
360 struct pcfs *fsp;
369 fsp = VFSTOPCFS(vp->v_vfsp);
383 uint_t llcn = howmany((offset_t)length, fsp->pcfs_clsize);
390 if ((daddr_t)howmany((offset_t)pcp->pc_size, fsp->pcfs_clsize) <
401 if (pc_fileclsize(fsp, pcp->pc_scluster, &ncl)) {
406 pcp->pc_size = fsp->pcfs_clsize * ncl;
415 if (pc_blkoff(fsp, length) == 0) {
433 roundup(length, MIN(fsp->pcfs_clsize, MAXBSIZE)) -
442 howmany((offset_t)length, fsp->pcfs_clsize));
450 pc_mark_mod(fsp, pcp);
460 struct pcfs *fsp;
462 fsp = VFSTOPCFS(PCTOV(pcp)->v_vfsp);
463 if (pcp->pc_eblkno >= fsp->pcfs_datastart ||
464 (pcp->pc_eblkno - fsp->pcfs_rdirstart) <
465 (fsp->pcfs_rdirsec & ~(fsp->pcfs_spcl - 1))) {
466 *bpp = bread(fsp->pcfs_xdev,
467 pc_dbdaddr(fsp, pcp->pc_eblkno), fsp->pcfs_clsize);
469 *bpp = bread(fsp->pcfs_xdev,
470 pc_dbdaddr(fsp, pcp->pc_eblkno),
471 (int)(fsp->pcfs_datastart - pcp->pc_eblkno) *
472 fsp->pcfs_secsize);
476 pc_mark_irrecov(fsp);
490 struct pcfs *fsp;
495 fsp = VFSTOPCFS(vp->v_vfsp);
506 pc_mark_irrecov(fsp);
529 struct pcfs *fsp;
532 fsp = VFSTOPCFS(vp->v_vfsp);
533 if (IS_FAT32(fsp) && (vp->v_flag & VROOT)) {
554 pc_setstartcluster(fsp, &pcp->pc_entry, pcp->pc_scluster);
573 pc_verify(struct pcfs *fsp)
578 if (!fsp || fsp->pcfs_flags & PCFS_IRRECOV)
581 if (!(fsp->pcfs_flags & PCFS_NOCHK) && fsp->pcfs_fatp) {
589 PC_DPRINTF1(4, "pc_verify fsp=0x%p\n", (void *)fsp);
590 error = cdev_ioctl(fsp->pcfs_vfs->vfs_dev,
606 pc_mark_irrecov(fsp);
608 } else if (fsp->pcfs_fatjustread) {
616 fsp->pcfs_fatjustread = 0;
630 pc_mark_irrecov(fsp);
634 if (error == 0 && fsp->pcfs_fatp == NULL) {
635 error = pc_getfat(fsp);
647 pc_mark_irrecov(struct pcfs *fsp)
649 if (!(fsp->pcfs_flags & PCFS_NOCHK)) {
650 if (pc_lockfs(fsp, 1, 0)) {
661 fsp->pcfs_flags |= PCFS_IRRECOV;
668 (void) pc_unlockfs(fsp);
676 pc_diskchanged(struct pcfs *fsp)
691 PC_DPRINTF1(1, "pc_diskchanged fsp=0x%p\n", (void *)fsp);
693 vfsp = PCFSTOVFS(fsp);
722 fsp->pcfs_nrefs --;
727 for (hp = pcfhead; fsp->pcfs_frefs && hp < &pcfhead[NPCHASH]; hp++) {
728 for (pcp = hp->pch_forw; fsp->pcfs_frefs &&
754 fsp->pcfs_frefs--;
755 fsp->pcfs_nrefs--;
761 if (fsp->pcfs_frefs) {
765 if (fsp->pcfs_nrefs) {
771 fsp->pcfs_fatp != (uchar_t *)0) {
772 pc_invalfat(fsp);
774 binval(fsp->pcfs_xdev);