Lines Matching defs:pt
69 struct webdavnode *pt = VTOWEBDAV(vp);
72 printf("tag VT_WEBDAV, webdav, id=%ld, obj_ref=%ld, cache_vnode=%ld\n", pt->pt_fileid, pt->pt_obj_ref, pt->pt_cache_vnode);
582 struct webdavnode *pt;
595 pt = VTOWEBDAV(vp);
598 if (pt->pt_status & WEBDAV_DELETED)
604 cachevp = pt->pt_cache_vnode;
632 VATTR_RETURN(vap, va_fileid, pt->pt_fileid);
634 webdav_timespec64_to_timespec(pt->pt_atime, &ts);
637 webdav_timespec64_to_timespec(pt->pt_mtime, &ts);
640 webdav_timespec64_to_timespec(pt->pt_ctime, &ts);
643 webdav_timespec64_to_timespec(pt->pt_createtime, &ts);
698 request_getattr.obj_id = pt->pt_obj_id;
731 if ( pt->pt_status & WEBDAV_DIRTY )
739 timespec_to_webdav_timespec64(vap->va_create_time, &pt->pt_createtime);
741 else if ( (pt->pt_status & WEBDAV_ACCESSED) )
777 timespec_to_webdav_timespec64(vap->va_create_time, &pt->pt_createtime);
782 timespec_to_webdav_timespec64(vap->va_access_time, &pt->pt_atime);
783 timespec_to_webdav_timespec64(vap->va_modify_time, &pt->pt_mtime);
784 timespec_to_webdav_timespec64(vap->va_change_time, &pt->pt_ctime);
787 timespec_to_webdav_timespec64(ts, &pt->pt_timestamp_refresh);
988 struct webdavnode *pt;
1085 pt = isdot ? pt_dvp : VTOWEBDAV(pt_dvp->pt_parent);
1086 reply_lookup.obj_id = pt->pt_obj_id;
1087 reply_lookup.obj_fileid = pt->pt_fileid;
1089 reply_lookup.obj_atime = pt->pt_atime;
1090 reply_lookup.obj_mtime = pt->pt_mtime;
1091 reply_lookup.obj_ctime = pt-> pt_ctime;
1092 reply_lookup.obj_createtime = pt->pt_createtime;
1093 reply_lookup.obj_filesize = pt->pt_filesize;
1238 struct webdavnode *pt;
1249 pt = VTOWEBDAV(vp);
1258 if (pt->pt_writeseq_enabled && pt->pt_opencount_write && (ap->a_mode & FWRITE))
1270 if (pt->pt_cache_vnode)
1273 ++pt->pt_opencount;
1274 if ( pt->pt_opencount == 0 )
1277 --pt->pt_opencount;
1283 ++pt->pt_opencount_write;
1292 pt->pt_status |= WEBDAV_DIR_NOT_LOADED;
1301 request_open.obj_id = pt->pt_obj_id;
1351 pt->pt_cache_vnode = associatecachefile.cachevp;
1354 pt->pt_opencount = 1;
1357 pt->pt_opencount_write = 1;
1366 pt->pt_status |= WEBDAV_DIR_NOT_LOADED;
1391 struct webdavnode *pt;
1398 pt = VTOWEBDAV(vp);
1400 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
1401 pt->pt_lastvop = webdav_vnop_open;
1403 webdav_unlock(pt);
1436 struct webdavnode *pt;
1445 pt = VTOWEBDAV(vp);
1446 cachevp = pt->pt_cache_vnode;
1450 if ( !(pt->pt_status & WEBDAV_DIRTY) ||
1451 (pt->pt_status & WEBDAV_DELETED) )
1506 if ( pt->pt_filesize != (off_t)attrbuf.va_data_size )
1510 pt->pt_filesize = (off_t)attrbuf.va_data_size;
1524 if ( pt->pt_status & WEBDAV_WASMAPPED )
1564 pt->pt_status &= ~WEBDAV_DIRTY;
1567 request_fsync.obj_id = pt->pt_obj_id;
1619 struct webdavnode *pt;
1624 pt = VTOWEBDAV(ap->a_vp);
1626 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
1627 pt->pt_lastvop = webdav_vnop_fsync;
1629 if ( (pt->pt_cache_vnode != NULLVP) && vnode_isreg(ap->a_vp) )
1637 webdav_unlock(pt);
1662 struct webdavnode *pt;
1664 pt = VTOWEBDAV(vp);
1670 if ( pt->pt_cache_vnode != NULLVP )
1679 if ( vnode_isreg(vp) && (pt->pt_writeseq_enabled == 0) && (force_fsync || (pt->pt_opencount == 0)) )
1699 if ( (pt->pt_opencount == 0) && !(pt->pt_status & WEBDAV_ISMAPPED) )
1705 request_close.obj_id = pt->pt_obj_id;
1730 temp = pt->pt_cache_vnode;
1731 pt->pt_cache_vnode = NULLVP;
1771 struct webdavnode *pt;
1777 pt = VTOWEBDAV(ap->a_vp);
1785 force_fsync = (((ap->a_fflag & FWRITE) != 0) && vnode_isreg(ap->a_vp) && (pt->pt_writeseq_enabled == 0));
1788 --pt->pt_opencount;
1797 --pt->pt_opencount_write;
1798 pt->pt_writeseq_enabled = 0;
1816 struct webdavnode *pt;
1821 pt = VTOWEBDAV(ap->a_vp);
1822 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
1823 pt->pt_lastvop = webdav_vnop_close;
1825 webdav_unlock(pt);
1841 struct webdavnode *pt;
1846 pt = VTOWEBDAV(ap->a_vp);
1847 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
1848 pt->pt_lastvop = webdav_vnop_mmap;
1849 pt->pt_status |= (WEBDAV_ISMAPPED | WEBDAV_WASMAPPED);
1850 webdav_unlock(pt);
1866 struct webdavnode *pt;
1871 pt = VTOWEBDAV(ap->a_vp);
1872 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
1873 pt->pt_lastvop = webdav_vnop_mnomap;
1876 pt->pt_status &= ~WEBDAV_ISMAPPED;
1880 webdav_unlock(pt);
1908 struct webdavnode *pt;
1913 pt = VTOWEBDAV(vp);
1941 request_read.obj_id = pt->pt_obj_id;
2008 struct webdavnode *pt;
2024 pt = VTOWEBDAV(vp);
2025 cachevp = pt->pt_cache_vnode;
2053 pt->pt_status |= WEBDAV_ACCESSED;
2142 if ( pt->pt_filesize < (off_t)attrbuf.va_data_size )
2145 pt->pt_filesize = (off_t)attrbuf.va_data_size;
2196 if ( pt->pt_status & WEBDAV_WASMAPPED )
2323 pt->pt_status |= WEBDAV_DIRTY;
2372 pt->pt_status |= WEBDAV_DIRTY;
2453 struct webdavnode *pt;
2458 pt = VTOWEBDAV(ap->a_vp);
2459 webdav_lock(pt, WEBDAV_SHARED_LOCK);
2460 pt->pt_lastvop = webdav_vnop_read;
2463 webdav_unlock(pt);
2486 struct webdavnode *pt;
2497 pt = VTOWEBDAV(ap->a_vp);
2498 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
2508 if (!pt->pt_writeseq_enabled)
2510 pt->pt_lastvop = webdav_vnop_write;
2513 webdav_unlock(pt);
2521 webdav_unlock(pt);
2526 cachevp = pt->pt_cache_vnode;
2536 req->obj_id = pt->pt_obj_id;
2539 req->file_len = pt->pt_writeseq_len;
2548 if (pt->pt_writeseq_offset != uio_offset(in_uio))
2551 uio_offset(in_uio), pt->pt_writeseq_offset);
2597 pt->pt_writeseq_offset += req->count;
2615 req->count = pt->pt_writeseq_offset + req->count;
2627 pt->pt_writeseq_offset += req->count;
2638 webdav_unlock(pt);
2667 struct webdavnode *pt;
2673 pt = VTOWEBDAV(vp);
2675 webdav_lock(pt, WEBDAV_SHARED_LOCK);
2676 pt->pt_lastvop = webdav_vnop_getattr;
2681 webdav_unlock(pt);
2713 struct webdavnode *pt;
2724 pt = VTOWEBDAV(vp);
2729 if (pt != VTOWEBDAV(dvp))
2730 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
2731 pt->pt_lastvop = webdav_vnop_remove;
2750 request_remove.obj_id = pt->pt_obj_id;
2794 pt->pt_status |= WEBDAV_DELETED;
2799 webdav_unlock(pt);
2800 if (VTOWEBDAV(dvp) != pt)
2832 struct webdavnode *pt;
2842 pt = VTOWEBDAV(vp);
2848 if (pt != VTOWEBDAV(dvp))
2849 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
2850 pt->pt_lastvop = webdav_vnop_rmdir;
2854 if ( pt == VTOWEBDAV(dvp) )
2863 request_rmdir.obj_id = pt->pt_obj_id;
2900 pt->pt_status |= WEBDAV_DELETED;
2905 webdav_unlock(pt);
2906 if (VTOWEBDAV(dvp) != pt)
3345 struct webdavnode *pt;
3357 pt = VTOWEBDAV(vp);
3359 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
3360 pt->pt_lastvop = webdav_vnop_setattr;
3371 if (pt->pt_cache_vnode == NULLVP)
3386 cachevp = pt->pt_cache_vnode;
3474 if ( ap->a_vap->va_data_size != attrbuf.va_data_size || (off_t)ap->a_vap->va_data_size != pt->pt_filesize )
3476 pt->pt_status |= WEBDAV_DIRTY;
3484 pt->pt_filesize = (off_t)ap->a_vap->va_data_size;
3501 webdav_unlock(pt);
3536 struct webdavnode *pt;
3548 pt = VTOWEBDAV(vp);
3552 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
3553 pt->pt_lastvop = webdav_vnop_readdir;
3563 cachevp = pt->pt_cache_vnode;
3581 if ( (uio_offset(uio) == 0) || (pt->pt_status & WEBDAV_DIR_NOT_LOADED) )
3586 request_readdir.obj_id = pt->pt_obj_id;
3612 pt->pt_status |= WEBDAV_DIR_NOT_LOADED;
3617 pt->pt_status &= ~WEBDAV_DIR_NOT_LOADED;
3665 webdav_unlock(pt);
3706 struct webdavnode *pt;
3711 pt = VTOWEBDAV(vp);
3729 lck_rw_destroy(&pt->pt_rwlock, webdav_rwlock_group);
3730 FREE(pt, M_TEMP);
3861 struct webdavnode *pt;
3871 pt = VTOWEBDAV(vp);
3873 cachevp = pt->pt_cache_vnode;
3989 if ( pt->pt_filesize < (off_t)attrbuf.va_data_size )
3993 pt->pt_filesize = (off_t)attrbuf.va_data_size;
4100 struct webdavnode *pt;
4111 pt = VTOWEBDAV(vp);
4113 cachevp = pt->pt_cache_vnode;
4135 cachevp = pt->pt_cache_vnode;
4210 if ( pt->pt_filesize < (off_t)attrbuf.va_data_size )
4214 pt->pt_filesize = (off_t)attrbuf.va_data_size;
4253 pt->pt_status |= WEBDAV_DIRTY;
4307 struct webdavnode *pt;
4343 pt = VTOWEBDAV(vp);
4345 webdav_lock(pt, WEBDAV_EXCLUSIVE_LOCK);
4346 if (pt->pt_writeseq_enabled) {
4351 } else if (pt->pt_opencount_write > 1) {
4353 printf("KWRITESEQ: webdav_ioctl: pt_opencount_write too high: %u\n", pt->pt_opencount_write);
4360 pt->pt_writeseq_enabled = 1;
4361 pt->pt_writeseq_len = wrseq_ptr->file_len;
4362 pt->pt_writeseq_offset = 0;
4365 webdav_unlock(pt);