1 /* $OpenBSD: ntfs_vnops.c,v 1.42 2016/09/01 08:40:39 natano Exp $ */ 2 /* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */ 3 4 /* 5 * Copyright (c) 1992, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * John Heidemann of the UCLA Ficus project. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. Neither the name of the University nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * Id: ntfs_vnops.c,v 1.5 1999/05/12 09:43:06 semenu Exp 36 * 37 */ 38 39 #include <sys/param.h> 40 #include <sys/systm.h> 41 #include <sys/time.h> 42 #include <sys/stat.h> 43 #include <sys/vnode.h> 44 #include <sys/lock.h> 45 #include <sys/mount.h> 46 #include <sys/namei.h> 47 #include <sys/malloc.h> 48 #include <sys/buf.h> 49 #include <sys/dirent.h> 50 #include <sys/specdev.h> 51 52 /*#define NTFS_DEBUG 1*/ 53 #include <ntfs/ntfs.h> 54 #include <ntfs/ntfs_inode.h> 55 #include <ntfs/ntfs_subr.h> 56 57 #include <sys/unistd.h> /* for pathconf(2) constants */ 58 59 int ntfs_read(void *); 60 int ntfs_getattr(void *); 61 int ntfs_inactive(void *); 62 int ntfs_print(void *); 63 int ntfs_reclaim(void *); 64 int ntfs_strategy(void *); 65 int ntfs_access(void *v); 66 int ntfs_open(void *v); 67 int ntfs_close(void *); 68 int ntfs_readdir(void *); 69 int ntfs_lookup(void *); 70 int ntfs_bmap(void *); 71 int ntfs_fsync(void *); 72 int ntfs_pathconf(void *); 73 74 int ntfs_prtactive = 0; /* 1 => print out reclaim of active vnodes */ 75 76 /* 77 * This is a noop, simply returning what one has been given. 78 */ 79 int 80 ntfs_bmap(void *v) 81 { 82 struct vop_bmap_args *ap = v; 83 DPRINTF("ntfs_bmap: vn: %p, blk: %lld\n", 84 ap->a_vp, (long long)ap->a_bn); 85 if (ap->a_vpp != NULL) 86 *ap->a_vpp = ap->a_vp; 87 if (ap->a_bnp != NULL) 88 *ap->a_bnp = ap->a_bn; 89 if (ap->a_runp != NULL) 90 *ap->a_runp = 0; 91 return (0); 92 } 93 94 int 95 ntfs_read(void *v) 96 { 97 struct vop_read_args *ap = v; 98 struct vnode *vp = ap->a_vp; 99 struct fnode *fp = VTOF(vp); 100 struct ntnode *ip = FTONT(fp); 101 struct uio *uio = ap->a_uio; 102 struct ntfsmount *ntmp = ip->i_mp; 103 u_int64_t toread; 104 int error; 105 106 DPRINTF("ntfs_read: ino: %u, off: %lld resid: %zu, segflg: %d\n", 107 ip->i_number, uio->uio_offset, uio->uio_resid, uio->uio_segflg); 108 109 DPRINTF("ntfs_read: filesize: %llu", fp->f_size); 110 111 /* don't allow reading after end of file */ 112 if (uio->uio_offset > fp->f_size) 113 toread = 0; 114 else 115 toread = MIN(uio->uio_resid, fp->f_size - uio->uio_offset); 116 117 DPRINTF(", toread: %llu\n", toread); 118 119 if (toread == 0) 120 return (0); 121 122 error = ntfs_readattr(ntmp, ip, fp->f_attrtype, 123 fp->f_attrname, uio->uio_offset, toread, NULL, uio); 124 if (error) { 125 printf("ntfs_read: ntfs_readattr failed: %d\n",error); 126 return (error); 127 } 128 129 return (0); 130 } 131 132 int 133 ntfs_getattr(void *v) 134 { 135 struct vop_getattr_args *ap = v; 136 struct vnode *vp = ap->a_vp; 137 struct fnode *fp = VTOF(vp); 138 struct ntnode *ip = FTONT(fp); 139 struct vattr *vap = ap->a_vap; 140 141 DPRINTF("ntfs_getattr: %u, flags: %u\n", ip->i_number, ip->i_flag); 142 143 vap->va_fsid = ip->i_dev; 144 vap->va_fileid = ip->i_number; 145 vap->va_mode = ip->i_mp->ntm_mode; 146 vap->va_nlink = ip->i_nlink; 147 vap->va_uid = ip->i_mp->ntm_uid; 148 vap->va_gid = ip->i_mp->ntm_gid; 149 vap->va_rdev = 0; /* XXX UNODEV ? */ 150 vap->va_size = fp->f_size; 151 vap->va_bytes = fp->f_allocated; 152 vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access); 153 vap->va_mtime = ntfs_nttimetounix(fp->f_times.t_write); 154 vap->va_ctime = ntfs_nttimetounix(fp->f_times.t_create); 155 vap->va_flags = ip->i_flag; 156 vap->va_gen = 0; 157 vap->va_blocksize = ip->i_mp->ntm_spc * ip->i_mp->ntm_bps; 158 vap->va_type = vp->v_type; 159 vap->va_filerev = 0; 160 161 /* 162 * Ensure that a directory link count is always 1 so that things 163 * like fts_read() do not try to be smart and end up skipping over 164 * directories. Additionally, ip->i_nlink will not be initialised 165 * until the ntnode has been loaded for the file. 166 */ 167 if (vp->v_type == VDIR || ip->i_nlink < 1) 168 vap->va_nlink = 1; 169 170 return (0); 171 } 172 173 174 /* 175 * Last reference to an ntnode. If necessary, write or delete it. 176 */ 177 int 178 ntfs_inactive(void *v) 179 { 180 struct vop_inactive_args *ap = v; 181 struct vnode *vp = ap->a_vp; 182 struct proc *p = ap->a_p; 183 #ifdef NTFS_DEBUG 184 struct ntnode *ip = VTONT(vp); 185 #endif 186 187 DPRINTF("ntfs_inactive: vnode: %p, ntnode: %u\n", vp, ip->i_number); 188 189 #ifdef DIAGNOSTIC 190 if (ntfs_prtactive && vp->v_usecount != 0) 191 vprint("ntfs_inactive: pushing active", vp); 192 #endif 193 194 VOP_UNLOCK(vp, p); 195 196 /* XXX since we don't support any filesystem changes 197 * right now, nothing more needs to be done 198 */ 199 return (0); 200 } 201 202 /* 203 * Reclaim an fnode/ntnode so that it can be used for other purposes. 204 */ 205 int 206 ntfs_reclaim(void *v) 207 { 208 struct vop_reclaim_args *ap = v; 209 struct vnode *vp = ap->a_vp; 210 struct fnode *fp = VTOF(vp); 211 struct ntnode *ip = FTONT(fp); 212 struct proc *p = ap->a_p; 213 int error; 214 215 DPRINTF("ntfs_reclaim: vnode: %p, ntnode: %u\n", vp, ip->i_number); 216 217 #ifdef DIAGNOSTIC 218 if (ntfs_prtactive && vp->v_usecount != 0) 219 vprint("ntfs_reclaim: pushing active", vp); 220 #endif 221 222 if ((error = ntfs_ntget(ip, p)) != 0) 223 return (error); 224 225 /* Purge old data structures associated with the inode. */ 226 cache_purge(vp); 227 228 ntfs_frele(fp); 229 ntfs_ntput(ip, p); 230 231 vp->v_data = NULL; 232 233 return (0); 234 } 235 236 int 237 ntfs_print(void *v) 238 { 239 struct vop_print_args *ap = v; 240 struct ntnode *ip = VTONT(ap->a_vp); 241 242 printf("tag VT_NTFS, ino %u, flag %#x, usecount %d, nlink %ld\n", 243 ip->i_number, ip->i_flag, ip->i_usecount, ip->i_nlink); 244 245 return (0); 246 } 247 248 /* 249 * Calculate the logical to physical mapping if not done already, 250 * then call the device strategy routine. 251 */ 252 int 253 ntfs_strategy(void *v) 254 { 255 struct vop_strategy_args *ap = v; 256 struct buf *bp = ap->a_bp; 257 struct vnode *vp = bp->b_vp; 258 struct fnode *fp = VTOF(vp); 259 struct ntnode *ip = FTONT(fp); 260 struct ntfsmount *ntmp = ip->i_mp; 261 int error, s; 262 263 DPRINTF("ntfs_strategy: blkno: %lld, lblkno: %lld\n", 264 (long long)bp->b_blkno, (long long)bp->b_lblkno); 265 266 DPRINTF("strategy: bcount: %ld flags: 0x%lx\n", 267 bp->b_bcount, bp->b_flags); 268 269 if (bp->b_flags & B_READ) { 270 u_int32_t toread; 271 272 if (ntfs_cntob(bp->b_blkno) >= fp->f_size) { 273 clrbuf(bp); 274 error = 0; 275 } else { 276 toread = MIN(bp->b_bcount, 277 fp->f_size - ntfs_cntob(bp->b_blkno)); 278 DPRINTF("ntfs_strategy: toread: %u, fsize: %llu\n", 279 toread, fp->f_size); 280 281 error = ntfs_readattr(ntmp, ip, fp->f_attrtype, 282 fp->f_attrname, ntfs_cntob(bp->b_blkno), 283 toread, bp->b_data, NULL); 284 285 if (error) { 286 printf("ntfs_strategy: ntfs_readattr failed\n"); 287 bp->b_error = error; 288 bp->b_flags |= B_ERROR; 289 } 290 291 bzero(bp->b_data + toread, bp->b_bcount - toread); 292 } 293 } else { 294 bp->b_error = error = EROFS; 295 bp->b_flags |= B_ERROR; 296 } 297 s = splbio(); 298 biodone(bp); 299 splx(s); 300 return (error); 301 } 302 303 int 304 ntfs_access(void *v) 305 { 306 struct vop_access_args *ap = v; 307 struct vnode *vp = ap->a_vp; 308 struct ntnode *ip = VTONT(vp); 309 struct ucred *cred = ap->a_cred; 310 mode_t mask, mode = ap->a_mode; 311 gid_t *gp; 312 int i; 313 314 DPRINTF("ntfs_access: %u\n", ip->i_number); 315 316 /* 317 * Disallow write attempts unless the file is a socket, fifo, or 318 * a block or character device resident on the file system. 319 */ 320 if (mode & VWRITE) { 321 switch ((int)vp->v_type) { 322 case VDIR: 323 case VLNK: 324 case VREG: 325 return (EROFS); 326 } 327 } 328 329 /* Otherwise, user id 0 always gets access. */ 330 if (cred->cr_uid == 0) 331 return (0); 332 333 mask = 0; 334 335 /* Otherwise, check the owner. */ 336 if (cred->cr_uid == ip->i_mp->ntm_uid) { 337 if (mode & VEXEC) 338 mask |= S_IXUSR; 339 if (mode & VREAD) 340 mask |= S_IRUSR; 341 if (mode & VWRITE) 342 mask |= S_IWUSR; 343 return ((ip->i_mp->ntm_mode & mask) == mask ? 0 : EACCES); 344 } 345 346 /* Otherwise, check the groups. */ 347 for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++) 348 if (ip->i_mp->ntm_gid == *gp) { 349 if (mode & VEXEC) 350 mask |= S_IXGRP; 351 if (mode & VREAD) 352 mask |= S_IRGRP; 353 if (mode & VWRITE) 354 mask |= S_IWGRP; 355 return ((ip->i_mp->ntm_mode&mask) == mask ? 0 : EACCES); 356 } 357 358 /* Otherwise, check everyone else. */ 359 if (mode & VEXEC) 360 mask |= S_IXOTH; 361 if (mode & VREAD) 362 mask |= S_IROTH; 363 if (mode & VWRITE) 364 mask |= S_IWOTH; 365 return ((ip->i_mp->ntm_mode & mask) == mask ? 0 : EACCES); 366 } 367 368 /* 369 * Open called. 370 * 371 * Nothing to do. 372 */ 373 int 374 ntfs_open(void *v) 375 { 376 #if NTFS_DEBUG 377 struct vop_open_args *ap = v; 378 struct vnode *vp = ap->a_vp; 379 struct ntnode *ip = VTONT(vp); 380 381 printf("ntfs_open: %d\n",ip->i_number); 382 #endif 383 384 /* 385 * Files marked append-only must be opened for appending. 386 */ 387 388 return (0); 389 } 390 391 /* 392 * Close called. 393 * 394 * Update the times on the inode. 395 */ 396 int 397 ntfs_close(void *v) 398 { 399 #if NTFS_DEBUG 400 struct vop_close_args *ap = v; 401 struct vnode *vp = ap->a_vp; 402 struct ntnode *ip = VTONT(vp); 403 404 printf("ntfs_close: %d\n",ip->i_number); 405 #endif 406 407 return (0); 408 } 409 410 int 411 ntfs_readdir(void *v) 412 { 413 struct vop_readdir_args *ap = v; 414 struct vnode *vp = ap->a_vp; 415 struct fnode *fp = VTOF(vp); 416 struct ntnode *ip = FTONT(fp); 417 struct uio *uio = ap->a_uio; 418 struct ntfsmount *ntmp = ip->i_mp; 419 int i, error = 0; 420 u_int32_t faked = 0, num; 421 struct dirent cde; 422 off_t off; 423 424 DPRINTF("ntfs_readdir %u off: %lld resid: %zu\n", ip->i_number, 425 uio->uio_offset, uio->uio_resid); 426 427 off = uio->uio_offset; 428 memset(&cde, 0, sizeof(cde)); 429 430 /* Simulate . in every dir except ROOT */ 431 if (ip->i_number != NTFS_ROOTINO && uio->uio_offset == 0) { 432 cde.d_fileno = ip->i_number; 433 cde.d_reclen = sizeof(struct dirent); 434 cde.d_type = DT_DIR; 435 cde.d_namlen = 1; 436 cde.d_off = sizeof(struct dirent); 437 cde.d_name[0] = '.'; 438 cde.d_name[1] = '\0'; 439 error = uiomove(&cde, sizeof(struct dirent), uio); 440 if (error) 441 goto out; 442 } 443 444 /* Simulate .. in every dir including ROOT */ 445 if (uio->uio_offset < 2 * sizeof(struct dirent)) { 446 cde.d_fileno = NTFS_ROOTINO; /* XXX */ 447 cde.d_reclen = sizeof(struct dirent); 448 cde.d_type = DT_DIR; 449 cde.d_namlen = 2; 450 cde.d_off = 2 * sizeof(struct dirent); 451 cde.d_name[0] = '.'; 452 cde.d_name[1] = '.'; 453 cde.d_name[2] = '\0'; 454 error = uiomove(&cde, sizeof(struct dirent), uio); 455 if (error) 456 goto out; 457 } 458 459 faked = (ip->i_number == NTFS_ROOTINO) ? 1 : 2; 460 num = uio->uio_offset / sizeof(struct dirent) - faked; 461 462 while (uio->uio_resid >= sizeof(struct dirent)) { 463 struct attr_indexentry *iep; 464 char *fname; 465 size_t remains; 466 int sz; 467 468 error = ntfs_ntreaddir(ntmp, fp, num, &iep, uio->uio_procp); 469 if (error) 470 goto out; 471 472 if (NULL == iep) 473 break; 474 475 for(; !(iep->ie_flag & NTFS_IEFLAG_LAST) && (uio->uio_resid >= sizeof(struct dirent)); 476 iep = NTFS_NEXTREC(iep, struct attr_indexentry *)) 477 { 478 if(!ntfs_isnamepermitted(ntmp,iep)) 479 continue; 480 481 remains = sizeof(cde.d_name) - 1; 482 fname = cde.d_name; 483 for(i=0; i<iep->ie_fnamelen; i++) { 484 sz = (*ntmp->ntm_wput)(fname, remains, 485 iep->ie_fname[i]); 486 fname += sz; 487 remains -= sz; 488 } 489 *fname = '\0'; 490 DPRINTF("ntfs_readdir: elem: %u, fname:[%s] type: %u, " 491 "flag: %u, ", 492 num, cde.d_name, iep->ie_fnametype, iep->ie_flag); 493 cde.d_namlen = fname - (char *) cde.d_name; 494 cde.d_fileno = iep->ie_number; 495 cde.d_type = (iep->ie_fflag & NTFS_FFLAG_DIR) ? DT_DIR : DT_REG; 496 cde.d_reclen = sizeof(struct dirent); 497 cde.d_off = uio->uio_offset + sizeof(struct dirent); 498 DPRINTF("%s\n", cde.d_type == DT_DIR ? "dir" : "reg"); 499 500 error = uiomove(&cde, sizeof(struct dirent), uio); 501 if (error) 502 goto out; 503 num++; 504 } 505 } 506 507 DPRINTF("ntfs_readdir: %u entries (%lld bytes) read\n", 508 num, uio->uio_offset - off); 509 DPRINTF("ntfs_readdir: off: %lld resid: %zu\n", 510 uio->uio_offset, uio->uio_resid); 511 512 /* 513 if (ap->a_eofflag) 514 *ap->a_eofflag = VTONT(ap->a_vp)->i_size <= uio->uio_offset; 515 */ 516 out: 517 if (fp->f_dirblbuf != NULL) { 518 free(fp->f_dirblbuf, M_NTFSDIR, 0); 519 fp->f_dirblbuf = NULL; 520 } 521 return (error); 522 } 523 524 int 525 ntfs_lookup(void *v) 526 { 527 struct vop_lookup_args *ap = v; 528 struct vnode *dvp = ap->a_dvp; 529 struct ntnode *dip = VTONT(dvp); 530 struct ntfsmount *ntmp = dip->i_mp; 531 struct componentname *cnp = ap->a_cnp; 532 struct ucred *cred = cnp->cn_cred; 533 int error; 534 int lockparent = cnp->cn_flags & LOCKPARENT; 535 struct proc *p = cnp->cn_proc; 536 #if NTFS_DEBUG 537 int wantparent = cnp->cn_flags & (LOCKPARENT|WANTPARENT); 538 #endif 539 DPRINTF("ntfs_lookup: \"%.*s\" (%ld bytes) in %u, lp: %d, wp: %d \n", 540 (unsigned int)cnp->cn_namelen, cnp->cn_nameptr, cnp->cn_namelen, 541 dip->i_number, lockparent, wantparent); 542 543 error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_proc); 544 if(error) 545 return (error); 546 547 if ((cnp->cn_flags & ISLASTCN) && 548 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) 549 return (EROFS); 550 551 /* 552 * We now have a segment name to search for, and a directory 553 * to search. 554 * 555 * Before tediously performing a linear scan of the directory, 556 * check the name cache to see if the directory/name pair 557 * we are looking for is known already. 558 */ 559 if ((error = cache_lookup(ap->a_dvp, ap->a_vpp, cnp)) >= 0) 560 return (error); 561 562 if(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { 563 DPRINTF("ntfs_lookup: faking . directory in %u\n", 564 dip->i_number); 565 566 vref(dvp); 567 *ap->a_vpp = dvp; 568 error = 0; 569 } else if (cnp->cn_flags & ISDOTDOT) { 570 struct ntvattr *vap; 571 572 DPRINTF("ntfs_lookup: faking .. directory in %u\n", 573 dip->i_number); 574 575 VOP_UNLOCK(dvp, p); 576 cnp->cn_flags |= PDIRUNLOCK; 577 578 error = ntfs_ntvattrget(ntmp, dip, NTFS_A_NAME, NULL, 0, &vap); 579 if(error) 580 return (error); 581 582 DPRINTF("ntfs_lookup: parentdir: %u\n", 583 vap->va_a_name->n_pnumber); 584 error = VFS_VGET(ntmp->ntm_mountp, 585 vap->va_a_name->n_pnumber,ap->a_vpp); 586 ntfs_ntvattrrele(vap); 587 if (error) { 588 if (vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p) == 0) 589 cnp->cn_flags &= ~PDIRUNLOCK; 590 return (error); 591 } 592 593 if (lockparent && (cnp->cn_flags & ISLASTCN)) { 594 error = vn_lock(dvp, LK_EXCLUSIVE, p); 595 if (error) { 596 vput( *(ap->a_vpp) ); 597 return (error); 598 } 599 cnp->cn_flags &= ~PDIRUNLOCK; 600 } 601 } else { 602 error = ntfs_ntlookupfile(ntmp, dvp, cnp, ap->a_vpp, p); 603 if (error) { 604 DPRINTF("ntfs_ntlookupfile: returned %d\n", error); 605 return (error); 606 } 607 608 DPRINTF("ntfs_lookup: found ino: %u\n", 609 VTONT(*ap->a_vpp)->i_number); 610 611 if(!lockparent || (cnp->cn_flags & ISLASTCN) == 0) { 612 VOP_UNLOCK(dvp, p); 613 cnp->cn_flags |= PDIRUNLOCK; 614 } 615 } 616 617 if (cnp->cn_flags & MAKEENTRY) 618 cache_enter(dvp, *ap->a_vpp, cnp); 619 620 return (error); 621 } 622 623 /* 624 * Flush the blocks of a file to disk. 625 * 626 * This function is worthless for vnodes that represent directories. Maybe we 627 * could just do a sync if they try an fsync on a directory file. 628 */ 629 int 630 ntfs_fsync(void *v) 631 { 632 return (0); 633 } 634 635 /* 636 * Return POSIX pathconf information applicable to NTFS filesystem 637 */ 638 int 639 ntfs_pathconf(void *v) 640 { 641 struct vop_pathconf_args *ap = v; 642 int error = 0; 643 644 switch (ap->a_name) { 645 case _PC_LINK_MAX: 646 *ap->a_retval = 1; 647 break; 648 case _PC_NAME_MAX: 649 *ap->a_retval = NTFS_MAXFILENAME; 650 break; 651 case _PC_CHOWN_RESTRICTED: 652 *ap->a_retval = 1; 653 break; 654 case _PC_NO_TRUNC: 655 *ap->a_retval = 0; 656 break; 657 default: 658 error = EINVAL; 659 break; 660 } 661 662 return (error); 663 } 664 665 /* 666 * Global vfs data structures 667 */ 668 struct vops ntfs_vops = { 669 .vop_getattr = ntfs_getattr, 670 .vop_inactive = ntfs_inactive, 671 .vop_reclaim = ntfs_reclaim, 672 .vop_print = ntfs_print, 673 .vop_pathconf = ntfs_pathconf, 674 .vop_islocked = vop_generic_islocked, 675 .vop_unlock = vop_generic_unlock, 676 .vop_lock = vop_generic_lock, 677 .vop_lookup = ntfs_lookup, 678 .vop_access = ntfs_access, 679 .vop_close = ntfs_close, 680 .vop_open = ntfs_open, 681 .vop_readdir = ntfs_readdir, 682 .vop_fsync = ntfs_fsync, 683 .vop_bmap = ntfs_bmap, 684 .vop_strategy = ntfs_strategy, 685 .vop_bwrite = vop_generic_bwrite, 686 .vop_read = ntfs_read, 687 }; 688