Print this page
6879933 Let SMBFS support extensible attributes per. PSARC 2007/315


 581         /*
 582          * Assign a unique device id to the mount
 583          */
 584         mutex_enter(&smbfs_minor_lock);
 585         do {
 586                 smbfs_minor = (smbfs_minor + 1) & MAXMIN32;
 587                 smbfs_dev = makedevice(smbfs_major, smbfs_minor);
 588         } while (vfs_devismounted(smbfs_dev));
 589         mutex_exit(&smbfs_minor_lock);
 590 
 591         vfsp->vfs_dev        = smbfs_dev;
 592         vfs_make_fsid(&vfsp->vfs_fsid, smbfs_dev, smbfsfstyp);
 593         vfsp->vfs_data       = (caddr_t)smi;
 594         vfsp->vfs_fstype = smbfsfstyp;
 595         vfsp->vfs_bsize = MAXBSIZE;
 596         vfsp->vfs_bcount = 0;
 597 
 598         smi->smi_vfsp        = vfsp;
 599         smbfs_zonelist_add(smi);        /* undo in smbfs_freevfs */
 600 




 601         /*
 602          * Create the root vnode, which we need in unmount
 603          * for the call to smbfs_check_table(), etc.
 604          * Release this hold in smbfs_unmount.
 605          */
 606         rtnp = smbfs_node_findcreate(smi, "\\", 1, NULL, 0, 0,
 607             &smbfs_fattr0);
 608         ASSERT(rtnp != NULL);
 609         rtnp->r_vnode->v_type = VDIR;
 610         rtnp->r_vnode->v_flag |= VROOT;
 611         smi->smi_root = rtnp;
 612 
 613         /*
 614          * NFS does other stuff here too:
 615          *   async worker threads
 616          *   init kstats
 617          *
 618          * End of code from NFS nfsrootvp()
 619          */
 620         return (0);




 581         /*
 582          * Assign a unique device id to the mount
 583          */
 584         mutex_enter(&smbfs_minor_lock);
 585         do {
 586                 smbfs_minor = (smbfs_minor + 1) & MAXMIN32;
 587                 smbfs_dev = makedevice(smbfs_major, smbfs_minor);
 588         } while (vfs_devismounted(smbfs_dev));
 589         mutex_exit(&smbfs_minor_lock);
 590 
 591         vfsp->vfs_dev        = smbfs_dev;
 592         vfs_make_fsid(&vfsp->vfs_fsid, smbfs_dev, smbfsfstyp);
 593         vfsp->vfs_data       = (caddr_t)smi;
 594         vfsp->vfs_fstype = smbfsfstyp;
 595         vfsp->vfs_bsize = MAXBSIZE;
 596         vfsp->vfs_bcount = 0;
 597 
 598         smi->smi_vfsp        = vfsp;
 599         smbfs_zonelist_add(smi);        /* undo in smbfs_freevfs */
 600 
 601         /* PSARC 2007/227 VFS Feature Registration */
 602         vfs_set_feature(vfsp, VFSFT_XVATTR);
 603         vfs_set_feature(vfsp, VFSFT_SYSATTR_VIEWS);
 604 
 605         /*
 606          * Create the root vnode, which we need in unmount
 607          * for the call to smbfs_check_table(), etc.
 608          * Release this hold in smbfs_unmount.
 609          */
 610         rtnp = smbfs_node_findcreate(smi, "\\", 1, NULL, 0, 0,
 611             &smbfs_fattr0);
 612         ASSERT(rtnp != NULL);
 613         rtnp->r_vnode->v_type = VDIR;
 614         rtnp->r_vnode->v_flag |= VROOT;
 615         smi->smi_root = rtnp;
 616 
 617         /*
 618          * NFS does other stuff here too:
 619          *   async worker threads
 620          *   init kstats
 621          *
 622          * End of code from NFS nfsrootvp()
 623          */
 624         return (0);