126 caller_context_t *);
127 static int pcfs_pathconf(struct vnode *, int, ulong_t *, struct cred *,
128 caller_context_t *);
129
130 int pcfs_putapage(struct vnode *, page_t *, u_offset_t *, size_t *, int,
131 struct cred *);
132 static int rwpcp(struct pcnode *, struct uio *, enum uio_rw, int);
133 static int get_long_fn_chunk(struct pcdir_lfn *ep, char *buf);
134
135 extern krwlock_t pcnodes_lock;
136
137 #define lround(r) (((r)+sizeof (long long)-1)&(~(sizeof (long long)-1)))
138
139 /*
140 * vnode op vectors for files and directories.
141 */
142 struct vnodeops *pcfs_fvnodeops;
143 struct vnodeops *pcfs_dvnodeops;
144
145 const fs_operation_def_t pcfs_fvnodeops_template[] = {
146 VOPNAME_OPEN, { .vop_open = pcfs_open },
147 VOPNAME_CLOSE, { .vop_close = pcfs_close },
148 VOPNAME_READ, { .vop_read = pcfs_read },
149 VOPNAME_WRITE, { .vop_write = pcfs_write },
150 VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr },
151 VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr },
152 VOPNAME_ACCESS, { .vop_access = pcfs_access },
153 VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync },
154 VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive },
155 VOPNAME_FID, { .vop_fid = pcfs_fid },
156 VOPNAME_SEEK, { .vop_seek = pcfs_seek },
157 VOPNAME_SPACE, { .vop_space = pcfs_space },
158 VOPNAME_GETPAGE, { .vop_getpage = pcfs_getpage },
159 VOPNAME_PUTPAGE, { .vop_putpage = pcfs_putpage },
160 VOPNAME_MAP, { .vop_map = pcfs_map },
161 VOPNAME_ADDMAP, { .vop_addmap = pcfs_addmap },
162 VOPNAME_DELMAP, { .vop_delmap = pcfs_delmap },
163 VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf },
164 VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
165 NULL, NULL
166 };
167
168 const fs_operation_def_t pcfs_dvnodeops_template[] = {
169 VOPNAME_OPEN, { .vop_open = pcfs_open },
170 VOPNAME_CLOSE, { .vop_close = pcfs_close },
171 VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr },
172 VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr },
173 VOPNAME_ACCESS, { .vop_access = pcfs_access },
174 VOPNAME_LOOKUP, { .vop_lookup = pcfs_lookup },
175 VOPNAME_CREATE, { .vop_create = pcfs_create },
176 VOPNAME_REMOVE, { .vop_remove = pcfs_remove },
177 VOPNAME_RENAME, { .vop_rename = pcfs_rename },
178 VOPNAME_MKDIR, { .vop_mkdir = pcfs_mkdir },
179 VOPNAME_RMDIR, { .vop_rmdir = pcfs_rmdir },
180 VOPNAME_READDIR, { .vop_readdir = pcfs_readdir },
181 VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync },
182 VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive },
183 VOPNAME_FID, { .vop_fid = pcfs_fid },
184 VOPNAME_SEEK, { .vop_seek = pcfs_seek },
185 VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf },
186 VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
187 NULL, NULL
188 };
189
190
191 /*ARGSUSED*/
192 static int
193 pcfs_open(
194 struct vnode **vpp,
195 int flag,
196 struct cred *cr,
197 caller_context_t *ct)
198 {
199 return (0);
200 }
201
202 /*
203 * files are sync'ed on close to keep floppy up to date
204 */
205
206 /*ARGSUSED*/
207 static int
|
126 caller_context_t *);
127 static int pcfs_pathconf(struct vnode *, int, ulong_t *, struct cred *,
128 caller_context_t *);
129
130 int pcfs_putapage(struct vnode *, page_t *, u_offset_t *, size_t *, int,
131 struct cred *);
132 static int rwpcp(struct pcnode *, struct uio *, enum uio_rw, int);
133 static int get_long_fn_chunk(struct pcdir_lfn *ep, char *buf);
134
135 extern krwlock_t pcnodes_lock;
136
137 #define lround(r) (((r)+sizeof (long long)-1)&(~(sizeof (long long)-1)))
138
139 /*
140 * vnode op vectors for files and directories.
141 */
142 struct vnodeops *pcfs_fvnodeops;
143 struct vnodeops *pcfs_dvnodeops;
144
145 const fs_operation_def_t pcfs_fvnodeops_template[] = {
146 { VOPNAME_OPEN, { .vop_open = pcfs_open } },
147 { VOPNAME_CLOSE, { .vop_close = pcfs_close } },
148 { VOPNAME_READ, { .vop_read = pcfs_read } },
149 { VOPNAME_WRITE, { .vop_write = pcfs_write } },
150 { VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr } },
151 { VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr } },
152 { VOPNAME_ACCESS, { .vop_access = pcfs_access } },
153 { VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync } },
154 { VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive } },
155 { VOPNAME_FID, { .vop_fid = pcfs_fid } },
156 { VOPNAME_SEEK, { .vop_seek = pcfs_seek } },
157 { VOPNAME_SPACE, { .vop_space = pcfs_space } },
158 { VOPNAME_GETPAGE, { .vop_getpage = pcfs_getpage } },
159 { VOPNAME_PUTPAGE, { .vop_putpage = pcfs_putpage } },
160 { VOPNAME_MAP, { .vop_map = pcfs_map } },
161 { VOPNAME_ADDMAP, { .vop_addmap = pcfs_addmap } },
162 { VOPNAME_DELMAP, { .vop_delmap = pcfs_delmap } },
163 { VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf } },
164 { VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support } },
165 { NULL, { NULL } }
166 };
167
168 const fs_operation_def_t pcfs_dvnodeops_template[] = {
169 { VOPNAME_OPEN, { .vop_open = pcfs_open } },
170 { VOPNAME_CLOSE, { .vop_close = pcfs_close } },
171 { VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr } },
172 { VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr } },
173 { VOPNAME_ACCESS, { .vop_access = pcfs_access } },
174 { VOPNAME_LOOKUP, { .vop_lookup = pcfs_lookup } },
175 { VOPNAME_CREATE, { .vop_create = pcfs_create } },
176 { VOPNAME_REMOVE, { .vop_remove = pcfs_remove } },
177 { VOPNAME_RENAME, { .vop_rename = pcfs_rename } },
178 { VOPNAME_MKDIR, { .vop_mkdir = pcfs_mkdir } },
179 { VOPNAME_RMDIR, { .vop_rmdir = pcfs_rmdir } },
180 { VOPNAME_READDIR, { .vop_readdir = pcfs_readdir } },
181 { VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync } },
182 { VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive } },
183 { VOPNAME_FID, { .vop_fid = pcfs_fid } },
184 { VOPNAME_SEEK, { .vop_seek = pcfs_seek } },
185 { VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf } },
186 { VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support } },
187 { NULL, { NULL } }
188 };
189
190
191 /*ARGSUSED*/
192 static int
193 pcfs_open(
194 struct vnode **vpp,
195 int flag,
196 struct cred *cr,
197 caller_context_t *ct)
198 {
199 return (0);
200 }
201
202 /*
203 * files are sync'ed on close to keep floppy up to date
204 */
205
206 /*ARGSUSED*/
207 static int
|