_________________________________________________________________ sun microsystems Systems Architecture Committee _________________________________________________________________ Subject: Vnode Interfaces Submitted by: Rich B, et al File: PSARC/2001/679/opinion.ms Date: April 2nd, 2003 Committee: Ralph C (opinion written by Gary W.) James C, Joseph K, Richard M, Terrence M, Glenn S, Andy T. Product Approval Committee: Solaris PAC 1. Summary This project is a reduction of the project presented for inception. The original project proposed a stable set of interfaces for building Solaris file systems. This project provides private interfaces relative to file system interac- tion with vnodes. These are required by PSARC/2001/246, Virtual Memory Interfaces (VMI) and Full NFSv4 support. (See PSARC/1999/289). This project: o separates the vnode from the file system specific node, o separates the vnode into "public" and "private" parts, o provides accessor functions for the private parts, o provides for registration of vnode and vfs opera- tions, and o updates the file system module loading to support the registration functionality. 2. Decision & Precedence Information The project is approved as specified in reference [1]. The project may be delivered in a minor release of Solaris. 3. Interfaces The project exports the following interfaces. ____________________________________________________________________________ | Interfaces Exported | |________________________|_______________________|_________________________| |Interface | Classification | Comments | |________________________|_______________________|_________________________| |vn_alloc() | Consolidation Private| Allocate a vnode | |vn_reinit() | Consolidation Private| (Re)initialize a vnode | |vn_free() | Consolidation Private| Free an allocated vnode| |VN_SET_VFS_TYPE_DEV() | Consolidation Private| Initialize device vnode| | | | | |vn_is_readonly() | Consolidation Private| vnode accessor func- | | | | tions | |vn_has_flocks() | Consolidation Private| | |vn_has_mandatory_locks()| Consolidation Private| | |vn_has_cached_data() | Consolidation Private| | |vn_mountedvfs() | Consolidation Private| | |vn_ismntpt() | Consolidation Private| | |vn_setops() | Consolidation Private| | |vn_getops() | Consolidation Private| | |vn_matchops() | Consolidation Private| | |vn_matchopval() | Consolidation Private| | | | | | |vfs_setops() | Consolidation Private| VFS accessor functions | |vfs_getops() | Consolidation Private| | |vfs_matchops() | Consolidation Private| | |vfs_can_sync() | Consolidation Private| | | | | | |vn_make_ops() | Consolidation Private| vnode and VFS registry | | | | functions | |vfs_setfsops() | Consolidation Private| | |vfs_makefsops() | Consolidation Private| | |vn_freevnodeops() | Consolidation Private| | |vfs_freevfsops() | Consolidation Private| | |vfs_freevfsops_by_type()| Consolidation Private| | |VSW_INSTALLED() | Consolidation Private| | | | | | |fsop_mount() | Consolidation Private| File System Operations | |fsop_unmount() | Consolidation Private| | |fsop_root() | Consolidation Private| | |fsop_statfs() | Consolidation Private| | |fsop_sync() | Consolidation Private| | |fsop_vget() | Consolidation Private| | |fsop_mountroot() | Consolidation Private| | |fsop_freefs() | Consolidation Private| | | | | | |fop_open() | Consolidation Private| File Operations | |fop_close() | Consolidation Private| | |fop_read() | Consolidation Private| | |fop_write() | Consolidation Private| | |fop_ioctl() | Consolidation Private| | |________________________|_______________________|_________________________| ____________________________________________________________________________ | Interfaces Exported | |________________________|_______________________|_________________________| |Interface | Classification | Comments | |________________________|_______________________|_________________________| |fop_setfl() | Consolidation Private| | |fop_getattr() | Consolidation Private| | |fop_setattr() | Consolidation Private| | |fop_access() | Consolidation Private| | |fop_lookup() | Consolidation Private| | |fop_create() | Consolidation Private| | |fop_remove() | Consolidation Private| | |fop_link() | Consolidation Private| | |fop_rename() | Consolidation Private| | |fop_mkdir() | Consolidation Private| | |fop_rmdir() | Consolidation Private| | |fop_readdir() | Consolidation Private| | |fop_symlink() | Consolidation Private| | |fop_readlink() | Consolidation Private| | |fop_fsync() | Consolidation Private| | |fop_inactive() | Consolidation Private| | |fop_fid() | Consolidation Private| | |fop_rwlock() | Consolidation Private| | |fop_rwunlock() | Consolidation Private| | |fop_seek() | Consolidation Private| | |fop_cmp() | Consolidation Private| | |fop_frlock() | Consolidation Private| | |fop_space() | Consolidation Private| | |fop_realvp() | Consolidation Private| | |fop_getpage() | Consolidation Private| | |fop_putpage() | Consolidation Private| | |fop_map() | Consolidation Private| | |fop_addmap() | Consolidation Private| | |fop_delmap() | Consolidation Private| | |fop_poll() | Consolidation Private| | |fop_dump() | Consolidation Private| | |fop_pathconf() | Consolidation Private| | |fop_pageio() | Consolidation Private| | |fop_dumpctl() | Consolidation Private| | |fop_dispose() | Consolidation Private| | |fop_setsecattr() | Consolidation Private| | |fop_getsecattr() | Consolidation Private| | |fop_shrlock() | Consolidation Private| | | | | | |vnodeops | Consolidation Private| mdb macro for vnodeops | | | | structure | |vfsops | Consolidation Private| mdb macro for vfsops | | | | structure | |________________________|_______________________|_________________________| 4. Opinion The majority of the discussion centered around what was not in this project rather than what was in the project. The committee would like to see the completion of the original project. 4.1. Is the Project a Step Forward? The project proposes no advance in the stability of the vnode or VFS interfaces. They are still Consolidation Private. The committee reluctantly agreed with the project team's argument that the team needed more time to do its diligence before raising the commitment level. The commit- tee agreed, even with a Consolidation Private stability, this project was a step forward. 4.2. Vnode Structure not all Private The project modifies the vnode to expose some parts as "pub- lic," that require direct access, and other parts as "private," that are accessed through supplied functions. The committee questioned the reason for such a split. The project team responded that they saw no good reason to pro- vide accessor functions for all the vnode fields. The com- mittee agreed not to pursue requiring changes here at this time, but to wait for the next step of the project. 4.3. Private Vnode Parts Still Visible Even though the project exports accessor functions for the vnode fields declared "private," the symbols for those fields are still visible for use. The committee questioned why those symbols were still exposed and gave the team a number of suggestions on how to hide them that led to strong project advice, as captured in the second item of Appendix B below. 4.4. Contracts This project changes consolidation private interfaces that have been contracted to parties outside the consolidation. The new taxonomy remains private; thus, the project team is reminded to update/renegotiate the existing contracts. 5. Minority Opinion(s) None. 6. Advisory Information 6.1. Complete the Original Project This project originally proposed to provide a stable set of interfaces for building Solaris file systems. The committee believes such a project is long overdue and advises the steering committees to ensure the original project's goals are met in a timely manner. 6.2. Complete Diligence The project team was reluctant to ascribe a stable taxonomy to the proposed interfaces because of lack of time to do a thorough investigation of the potential consumers. The steering committees are advised to continue this project to ensure that the investigation is done and the proposed or updated interfaces are raised to a stable taxonomy. 7. Appendices 7.1. Appendix A: Technical Changes Required None. 7.2. Appendix B: Technical Changes Advised 1. The project team is advised to invest the time to ensure the interfaces not only meet the needs of the Virtual Memory Interface (PSARC/2001/246) and NFSv4 (PSARC/1999/289), but also meet the needs of other file systems such as QFS (PSARC/2001/599) and Veritas File System (PSARC/2000/283). 2. The project team is strongly advised to find and implement a way to hide the "private" vnode fields from programs. The committee will likely reject any future project, or this project if it returns for another step, unless the private fields are hidden. 7.3. Appendix C: Reference Material Unless stated otherwise, path names are relative to the case directory PSARC/2001/679. 1. Specification File: final.materials/*