1856 }
1857
1858 return (error);
1859 }
1860
1861 /*
1862 * mntfs provides a new vnode for each open(2). Two vnodes will represent the
1863 * same instance of /etc/mnttab if they share the same (zone-specific) vfs.
1864 */
1865 /* ARGSUSED */
1866 int
1867 mntcmp(vnode_t *vp1, vnode_t *vp2, caller_context_t *ct)
1868 {
1869 return (vp1 != NULL && vp2 != NULL && vp1->v_vfsp == vp2->v_vfsp);
1870 }
1871
1872 /*
1873 * /mntfs vnode operations vector
1874 */
1875 const fs_operation_def_t mnt_vnodeops_template[] = {
1876 VOPNAME_OPEN, { .vop_open = mntopen },
1877 VOPNAME_CLOSE, { .vop_close = mntclose },
1878 VOPNAME_READ, { .vop_read = mntread },
1879 VOPNAME_IOCTL, { .vop_ioctl = mntioctl },
1880 VOPNAME_GETATTR, { .vop_getattr = mntgetattr },
1881 VOPNAME_ACCESS, { .vop_access = mntaccess },
1882 VOPNAME_FSYNC, { .vop_fsync = mntfsync },
1883 VOPNAME_INACTIVE, { .vop_inactive = mntinactive },
1884 VOPNAME_SEEK, { .vop_seek = mntseek },
1885 VOPNAME_POLL, { .vop_poll = mntpoll },
1886 VOPNAME_CMP, { .vop_cmp = mntcmp },
1887 VOPNAME_DISPOSE, { .error = fs_error },
1888 VOPNAME_SHRLOCK, { .error = fs_error },
1889 NULL, NULL
1890 };
|
1856 }
1857
1858 return (error);
1859 }
1860
1861 /*
1862 * mntfs provides a new vnode for each open(2). Two vnodes will represent the
1863 * same instance of /etc/mnttab if they share the same (zone-specific) vfs.
1864 */
1865 /* ARGSUSED */
1866 int
1867 mntcmp(vnode_t *vp1, vnode_t *vp2, caller_context_t *ct)
1868 {
1869 return (vp1 != NULL && vp2 != NULL && vp1->v_vfsp == vp2->v_vfsp);
1870 }
1871
1872 /*
1873 * /mntfs vnode operations vector
1874 */
1875 const fs_operation_def_t mnt_vnodeops_template[] = {
1876 { VOPNAME_OPEN, { .vop_open = mntopen } },
1877 { VOPNAME_CLOSE, { .vop_close = mntclose } },
1878 { VOPNAME_READ, { .vop_read = mntread } },
1879 { VOPNAME_IOCTL, { .vop_ioctl = mntioctl } },
1880 { VOPNAME_GETATTR, { .vop_getattr = mntgetattr } },
1881 { VOPNAME_ACCESS, { .vop_access = mntaccess } },
1882 { VOPNAME_FSYNC, { .vop_fsync = mntfsync } },
1883 { VOPNAME_INACTIVE, { .vop_inactive = mntinactive } },
1884 { VOPNAME_SEEK, { .vop_seek = mntseek } },
1885 { VOPNAME_POLL, { .vop_poll = mntpoll } },
1886 { VOPNAME_CMP, { .vop_cmp = mntcmp } },
1887 { VOPNAME_DISPOSE, { .error = fs_error } },
1888 { VOPNAME_SHRLOCK, { .error = fs_error } },
1889 { NULL, { NULL } }
1890 };
|