mfs_vfsops.c revision 1.114 1 1.114 pgoyette /* $NetBSD: mfs_vfsops.c,v 1.114 2020/03/16 21:20:13 pgoyette Exp $ */
2 1.2 cgd
3 1.1 mycroft /*
4 1.1 mycroft * Copyright (c) 1989, 1990, 1993, 1994
5 1.1 mycroft * The Regents of the University of California. All rights reserved.
6 1.1 mycroft *
7 1.1 mycroft * Redistribution and use in source and binary forms, with or without
8 1.1 mycroft * modification, are permitted provided that the following conditions
9 1.1 mycroft * are met:
10 1.1 mycroft * 1. Redistributions of source code must retain the above copyright
11 1.1 mycroft * notice, this list of conditions and the following disclaimer.
12 1.1 mycroft * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 mycroft * notice, this list of conditions and the following disclaimer in the
14 1.1 mycroft * documentation and/or other materials provided with the distribution.
15 1.52 agc * 3. Neither the name of the University nor the names of its contributors
16 1.1 mycroft * may be used to endorse or promote products derived from this software
17 1.1 mycroft * without specific prior written permission.
18 1.1 mycroft *
19 1.1 mycroft * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.1 mycroft * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.1 mycroft * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.1 mycroft * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.1 mycroft * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.1 mycroft * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.1 mycroft * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.1 mycroft * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.1 mycroft * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.1 mycroft * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.1 mycroft * SUCH DAMAGE.
30 1.1 mycroft *
31 1.15 fvdl * @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
32 1.1 mycroft */
33 1.36 lukem
34 1.36 lukem #include <sys/cdefs.h>
35 1.114 pgoyette __KERNEL_RCSID(0, "$NetBSD: mfs_vfsops.c,v 1.114 2020/03/16 21:20:13 pgoyette Exp $");
36 1.17 jonathan
37 1.34 mrg #if defined(_KERNEL_OPT)
38 1.17 jonathan #include "opt_compat_netbsd.h"
39 1.17 jonathan #endif
40 1.1 mycroft
41 1.1 mycroft #include <sys/param.h>
42 1.1 mycroft #include <sys/systm.h>
43 1.54 atatat #include <sys/sysctl.h>
44 1.1 mycroft #include <sys/time.h>
45 1.1 mycroft #include <sys/kernel.h>
46 1.1 mycroft #include <sys/proc.h>
47 1.1 mycroft #include <sys/buf.h>
48 1.62 yamt #include <sys/bufq.h>
49 1.1 mycroft #include <sys/mount.h>
50 1.1 mycroft #include <sys/signalvar.h>
51 1.1 mycroft #include <sys/vnode.h>
52 1.91 ad #include <sys/kmem.h>
53 1.97 rumble #include <sys/module.h>
54 1.1 mycroft
55 1.88 dholland #include <miscfs/genfs/genfs.h>
56 1.87 pooka #include <miscfs/specfs/specdev.h>
57 1.33 thorpej
58 1.1 mycroft #include <ufs/ufs/quota.h>
59 1.1 mycroft #include <ufs/ufs/inode.h>
60 1.1 mycroft #include <ufs/ufs/ufsmount.h>
61 1.1 mycroft #include <ufs/ufs/ufs_extern.h>
62 1.1 mycroft
63 1.1 mycroft #include <ufs/ffs/fs.h>
64 1.1 mycroft #include <ufs/ffs/ffs_extern.h>
65 1.1 mycroft
66 1.1 mycroft #include <ufs/mfs/mfsnode.h>
67 1.1 mycroft #include <ufs/mfs/mfs_extern.h>
68 1.1 mycroft
69 1.99 ad MODULE(MODULE_CLASS_VFS, mfs, "ffs");
70 1.97 rumble
71 1.91 ad kmutex_t mfs_lock; /* global lock */
72 1.1 mycroft
73 1.102 pooka /* used for building internal dev_t, minor == 0 reserved for miniroot */
74 1.109 hannken static devminor_t mfs_minor = 1;
75 1.91 ad static int mfs_initcnt;
76 1.1 mycroft
77 1.68 xtraeme extern int (**mfs_vnodeop_p)(void *);
78 1.44 thorpej
79 1.1 mycroft /*
80 1.1 mycroft * mfs vfs operations.
81 1.1 mycroft */
82 1.14 thorpej
83 1.65 perry extern const struct vnodeopv_desc mfs_vnodeop_opv_desc;
84 1.14 thorpej
85 1.31 jdolecek const struct vnodeopv_desc * const mfs_vnodeopv_descs[] = {
86 1.14 thorpej &mfs_vnodeop_opv_desc,
87 1.14 thorpej NULL,
88 1.14 thorpej };
89 1.14 thorpej
90 1.1 mycroft struct vfsops mfs_vfsops = {
91 1.106 hannken .vfs_name = MOUNT_MFS,
92 1.106 hannken .vfs_min_mount_data = sizeof (struct mfs_args),
93 1.106 hannken .vfs_mount = mfs_mount,
94 1.106 hannken .vfs_start = mfs_start,
95 1.106 hannken .vfs_unmount = ffs_unmount,
96 1.106 hannken .vfs_root = ufs_root,
97 1.106 hannken .vfs_quotactl = ufs_quotactl,
98 1.106 hannken .vfs_statvfs = mfs_statvfs,
99 1.106 hannken .vfs_sync = ffs_sync,
100 1.108 hannken .vfs_vget = ufs_vget,
101 1.108 hannken .vfs_loadvnode = ffs_loadvnode,
102 1.110 hannken .vfs_newvnode = ffs_newvnode,
103 1.106 hannken .vfs_fhtovp = ffs_fhtovp,
104 1.106 hannken .vfs_vptofh = ffs_vptofh,
105 1.106 hannken .vfs_init = mfs_init,
106 1.106 hannken .vfs_reinit = mfs_reinit,
107 1.106 hannken .vfs_done = mfs_done,
108 1.106 hannken .vfs_snapshot = (void *)eopnotsupp,
109 1.106 hannken .vfs_extattrctl = vfs_stdextattrctl,
110 1.111 hannken .vfs_suspendctl = genfs_suspendctl,
111 1.106 hannken .vfs_renamelock_enter = genfs_renamelock_enter,
112 1.106 hannken .vfs_renamelock_exit = genfs_renamelock_exit,
113 1.106 hannken .vfs_fsync = (void *)eopnotsupp,
114 1.106 hannken .vfs_opv_descs = mfs_vnodeopv_descs
115 1.1 mycroft };
116 1.97 rumble
117 1.114 pgoyette SYSCTL_SETUP(mfs_sysctl_setup, "mfs sysctl")
118 1.114 pgoyette {
119 1.114 pgoyette
120 1.114 pgoyette sysctl_createv(clog, 0, NULL, NULL,
121 1.114 pgoyette CTLFLAG_PERMANENT|CTLFLAG_ALIAS,
122 1.114 pgoyette CTLTYPE_NODE, "mfs",
123 1.114 pgoyette SYSCTL_DESCR("Memory based file system"),
124 1.114 pgoyette NULL, 1, NULL, 0,
125 1.114 pgoyette CTL_VFS, 3, CTL_EOL);
126 1.114 pgoyette /*
127 1.114 pgoyette * XXX the "1" and the "3" above could be dynamic, thereby
128 1.114 pgoyette * eliminating one more instance of the "number to vfs"
129 1.114 pgoyette * mapping problem, but they are in order as taken from
130 1.114 pgoyette * sys/mount.h
131 1.114 pgoyette */
132 1.114 pgoyette }
133 1.114 pgoyette
134 1.97 rumble static int
135 1.97 rumble mfs_modcmd(modcmd_t cmd, void *arg)
136 1.97 rumble {
137 1.98 rumble int error;
138 1.97 rumble
139 1.97 rumble switch (cmd) {
140 1.97 rumble case MODULE_CMD_INIT:
141 1.98 rumble error = vfs_attach(&mfs_vfsops);
142 1.98 rumble if (error != 0)
143 1.98 rumble break;
144 1.98 rumble break;
145 1.97 rumble case MODULE_CMD_FINI:
146 1.98 rumble error = vfs_detach(&mfs_vfsops);
147 1.98 rumble if (error != 0)
148 1.98 rumble break;
149 1.98 rumble break;
150 1.97 rumble default:
151 1.98 rumble error = ENOTTY;
152 1.98 rumble break;
153 1.97 rumble }
154 1.54 atatat
155 1.98 rumble return (error);
156 1.54 atatat }
157 1.1 mycroft
158 1.65 perry /*
159 1.15 fvdl * Memory based filesystem initialization.
160 1.65 perry */
161 1.15 fvdl void
162 1.68 xtraeme mfs_init(void)
163 1.15 fvdl {
164 1.79 pooka
165 1.91 ad if (mfs_initcnt++ == 0) {
166 1.91 ad mutex_init(&mfs_lock, MUTEX_DEFAULT, IPL_NONE);
167 1.91 ad ffs_init();
168 1.91 ad }
169 1.35 chs }
170 1.35 chs
171 1.35 chs void
172 1.68 xtraeme mfs_reinit(void)
173 1.35 chs {
174 1.91 ad
175 1.35 chs ffs_reinit();
176 1.15 fvdl }
177 1.15 fvdl
178 1.23 jdolecek void
179 1.68 xtraeme mfs_done(void)
180 1.23 jdolecek {
181 1.91 ad
182 1.91 ad if (--mfs_initcnt == 0) {
183 1.91 ad ffs_done();
184 1.91 ad mutex_destroy(&mfs_lock);
185 1.91 ad }
186 1.23 jdolecek }
187 1.15 fvdl
188 1.1 mycroft /*
189 1.1 mycroft * Called by main() when mfs is going to be mounted as root.
190 1.1 mycroft */
191 1.1 mycroft
192 1.10 christos int
193 1.68 xtraeme mfs_mountroot(void)
194 1.1 mycroft {
195 1.15 fvdl struct fs *fs;
196 1.15 fvdl struct mount *mp;
197 1.71 christos struct lwp *l = curlwp; /* XXX */
198 1.1 mycroft struct ufsmount *ump;
199 1.1 mycroft struct mfsnode *mfsp;
200 1.15 fvdl int error = 0;
201 1.1 mycroft
202 1.21 wrstuden if ((error = vfs_rootmountalloc(MOUNT_MFS, "mfs_root", &mp))) {
203 1.21 wrstuden vrele(rootvp);
204 1.15 fvdl return (error);
205 1.21 wrstuden }
206 1.1 mycroft
207 1.91 ad mfsp = kmem_alloc(sizeof(*mfsp), KM_SLEEP);
208 1.1 mycroft rootvp->v_data = mfsp;
209 1.1 mycroft rootvp->v_op = mfs_vnodeop_p;
210 1.1 mycroft rootvp->v_tag = VT_MFS;
211 1.1 mycroft mfsp->mfs_baseoff = mfs_rootbase;
212 1.1 mycroft mfsp->mfs_size = mfs_rootsize;
213 1.1 mycroft mfsp->mfs_vnode = rootvp;
214 1.26 thorpej mfsp->mfs_proc = NULL; /* indicate kernel space */
215 1.39 hannken mfsp->mfs_shutdown = 0;
216 1.91 ad cv_init(&mfsp->mfs_cv, "mfs");
217 1.91 ad mfsp->mfs_refcnt = 1;
218 1.70 yamt bufq_alloc(&mfsp->mfs_buflist, "fcfs", 0);
219 1.71 christos if ((error = ffs_mountfs(rootvp, mp, l)) != 0) {
220 1.113 hannken vfs_unbusy(mp);
221 1.70 yamt bufq_free(mfsp->mfs_buflist);
222 1.112 hannken vfs_rele(mp);
223 1.91 ad kmem_free(mfsp, sizeof(*mfsp));
224 1.1 mycroft return (error);
225 1.65 perry }
226 1.104 christos mountlist_append(mp);
227 1.1 mycroft mp->mnt_vnodecovered = NULLVP;
228 1.1 mycroft ump = VFSTOUFS(mp);
229 1.1 mycroft fs = ump->um_fs;
230 1.15 fvdl (void) copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0);
231 1.85 pooka (void)ffs_statvfs(mp, &mp->mnt_stat);
232 1.113 hannken vfs_unbusy(mp);
233 1.1 mycroft return (0);
234 1.1 mycroft }
235 1.1 mycroft
236 1.1 mycroft /*
237 1.1 mycroft * VFS Operations.
238 1.1 mycroft *
239 1.1 mycroft * mount system call
240 1.1 mycroft */
241 1.1 mycroft /* ARGSUSED */
242 1.1 mycroft int
243 1.85 pooka mfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
244 1.1 mycroft {
245 1.85 pooka struct lwp *l = curlwp;
246 1.1 mycroft struct vnode *devvp;
247 1.80 dsl struct mfs_args *args = data;
248 1.1 mycroft struct ufsmount *ump;
249 1.25 augustss struct fs *fs;
250 1.25 augustss struct mfsnode *mfsp;
251 1.71 christos struct proc *p;
252 1.109 hannken devminor_t minor;
253 1.80 dsl int flags, error = 0;
254 1.80 dsl
255 1.107 maxv if (args == NULL)
256 1.107 maxv return EINVAL;
257 1.80 dsl if (*data_len < sizeof *args)
258 1.80 dsl return EINVAL;
259 1.37 chs
260 1.71 christos p = l->l_proc;
261 1.41 christos if (mp->mnt_flag & MNT_GETARGS) {
262 1.41 christos struct vnode *vp;
263 1.41 christos
264 1.41 christos ump = VFSTOUFS(mp);
265 1.41 christos if (ump == NULL)
266 1.41 christos return EIO;
267 1.41 christos
268 1.41 christos vp = ump->um_devvp;
269 1.41 christos if (vp == NULL)
270 1.41 christos return EIO;
271 1.41 christos
272 1.41 christos mfsp = VTOMFS(vp);
273 1.41 christos if (mfsp == NULL)
274 1.41 christos return EIO;
275 1.41 christos
276 1.80 dsl args->fspec = NULL;
277 1.80 dsl args->base = mfsp->mfs_baseoff;
278 1.80 dsl args->size = mfsp->mfs_size;
279 1.80 dsl *data_len = sizeof *args;
280 1.80 dsl return 0;
281 1.41 christos }
282 1.37 chs /*
283 1.37 chs * XXX turn off async to avoid hangs when writing lots of data.
284 1.37 chs * the problem is that MFS needs to allocate pages to clean pages,
285 1.37 chs * so if we wait until the last minute to clean pages then there
286 1.37 chs * may not be any pages available to do the cleaning.
287 1.42 chs * ... and since the default partially-synchronous mode turns out
288 1.42 chs * to not be sufficient under heavy load, make it full synchronous.
289 1.37 chs */
290 1.37 chs mp->mnt_flag &= ~MNT_ASYNC;
291 1.42 chs mp->mnt_flag |= MNT_SYNCHRONOUS;
292 1.1 mycroft
293 1.1 mycroft /*
294 1.1 mycroft * If updating, check whether changing from read-only to
295 1.1 mycroft * read/write; if there is no device name, that's all we do.
296 1.1 mycroft */
297 1.1 mycroft if (mp->mnt_flag & MNT_UPDATE) {
298 1.1 mycroft ump = VFSTOUFS(mp);
299 1.1 mycroft fs = ump->um_fs;
300 1.1 mycroft if (fs->fs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
301 1.1 mycroft flags = WRITECLOSE;
302 1.1 mycroft if (mp->mnt_flag & MNT_FORCE)
303 1.1 mycroft flags |= FORCECLOSE;
304 1.71 christos error = ffs_flushfiles(mp, flags, l);
305 1.1 mycroft if (error)
306 1.1 mycroft return (error);
307 1.1 mycroft }
308 1.53 dbj if (fs->fs_ronly && (mp->mnt_iflag & IMNT_WANTRDWR))
309 1.1 mycroft fs->fs_ronly = 0;
310 1.80 dsl if (args->fspec == NULL)
311 1.69 jmmv return EINVAL;
312 1.1 mycroft return (0);
313 1.1 mycroft }
314 1.109 hannken mutex_enter(&mfs_lock);
315 1.109 hannken minor = mfs_minor++;
316 1.109 hannken mutex_exit(&mfs_lock);
317 1.109 hannken error = bdevvp(makedev(255, minor), &devvp);
318 1.1 mycroft if (error)
319 1.1 mycroft return (error);
320 1.91 ad mfsp = kmem_alloc(sizeof(*mfsp), KM_SLEEP);
321 1.109 hannken /*
322 1.109 hannken * Changing v_op and v_data here is safe as we are
323 1.109 hannken * the exclusive owner of this device node.
324 1.109 hannken */
325 1.109 hannken KASSERT(devvp->v_op == spec_vnodeop_p);
326 1.109 hannken KASSERT(devvp->v_data == NULL);
327 1.109 hannken devvp->v_op = mfs_vnodeop_p;
328 1.1 mycroft devvp->v_data = mfsp;
329 1.80 dsl mfsp->mfs_baseoff = args->base;
330 1.80 dsl mfsp->mfs_size = args->size;
331 1.1 mycroft mfsp->mfs_vnode = devvp;
332 1.26 thorpej mfsp->mfs_proc = p;
333 1.39 hannken mfsp->mfs_shutdown = 0;
334 1.90 ad cv_init(&mfsp->mfs_cv, "mfsidl");
335 1.91 ad mfsp->mfs_refcnt = 1;
336 1.70 yamt bufq_alloc(&mfsp->mfs_buflist, "fcfs", 0);
337 1.71 christos if ((error = ffs_mountfs(devvp, mp, l)) != 0) {
338 1.39 hannken mfsp->mfs_shutdown = 1;
339 1.1 mycroft vrele(devvp);
340 1.1 mycroft return (error);
341 1.1 mycroft }
342 1.1 mycroft ump = VFSTOUFS(mp);
343 1.1 mycroft fs = ump->um_fs;
344 1.80 dsl error = set_statvfs_info(path, UIO_USERSPACE, args->fspec,
345 1.81 pooka UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l);
346 1.58 christos if (error)
347 1.58 christos return error;
348 1.58 christos (void)strncpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname,
349 1.58 christos sizeof(fs->fs_fsmnt));
350 1.58 christos fs->fs_fsmnt[sizeof(fs->fs_fsmnt) - 1] = '\0';
351 1.57 enami /* XXX: cleanup on error */
352 1.58 christos return 0;
353 1.1 mycroft }
354 1.1 mycroft
355 1.1 mycroft /*
356 1.1 mycroft * Used to grab the process and keep it in the kernel to service
357 1.1 mycroft * memory filesystem I/O requests.
358 1.1 mycroft *
359 1.28 thorpej * Loop servicing I/O requests.
360 1.28 thorpej * Copy the requested data into or out of the memory filesystem
361 1.28 thorpej * address space.
362 1.1 mycroft */
363 1.1 mycroft /* ARGSUSED */
364 1.1 mycroft int
365 1.85 pooka mfs_start(struct mount *mp, int flags)
366 1.1 mycroft {
367 1.91 ad struct vnode *vp;
368 1.91 ad struct mfsnode *mfsp;
369 1.77 ad struct proc *p;
370 1.28 thorpej struct buf *bp;
371 1.78 christos void *base;
372 1.91 ad int sleepreturn = 0, refcnt, error;
373 1.77 ad ksiginfoq_t kq;
374 1.1 mycroft
375 1.91 ad /*
376 1.91 ad * Ensure that file system is still mounted when getting mfsnode.
377 1.91 ad * Add a reference to the mfsnode to prevent it disappearing in
378 1.91 ad * this routine.
379 1.91 ad */
380 1.113 hannken if ((error = vfs_busy(mp)) != 0)
381 1.91 ad return error;
382 1.91 ad vp = VFSTOUFS(mp)->um_devvp;
383 1.91 ad mfsp = VTOMFS(vp);
384 1.91 ad mutex_enter(&mfs_lock);
385 1.91 ad mfsp->mfs_refcnt++;
386 1.91 ad mutex_exit(&mfs_lock);
387 1.113 hannken vfs_unbusy(mp);
388 1.91 ad
389 1.28 thorpej base = mfsp->mfs_baseoff;
390 1.91 ad mutex_enter(&mfs_lock);
391 1.39 hannken while (mfsp->mfs_shutdown != 1) {
392 1.101 yamt while ((bp = bufq_get(mfsp->mfs_buflist)) != NULL) {
393 1.91 ad mutex_exit(&mfs_lock);
394 1.30 simonb mfs_doio(bp, base);
395 1.91 ad mutex_enter(&mfs_lock);
396 1.30 simonb }
397 1.1 mycroft /*
398 1.1 mycroft * If a non-ignored signal is received, try to unmount.
399 1.15 fvdl * If that fails, or the filesystem is already in the
400 1.15 fvdl * process of being unmounted, clear the signal (it has been
401 1.15 fvdl * "processed"), otherwise we will loop here, as tsleep
402 1.15 fvdl * will always return EINTR/ERESTART.
403 1.1 mycroft */
404 1.15 fvdl if (sleepreturn != 0) {
405 1.91 ad mutex_exit(&mfs_lock);
406 1.96 ad if (dounmount(mp, 0, curlwp) != 0) {
407 1.91 ad p = curproc;
408 1.77 ad ksiginfo_queue_init(&kq);
409 1.92 ad mutex_enter(p->p_lock);
410 1.77 ad sigclearall(p, NULL, &kq);
411 1.92 ad mutex_exit(p->p_lock);
412 1.77 ad ksiginfo_queue_drain(&kq);
413 1.77 ad }
414 1.15 fvdl sleepreturn = 0;
415 1.91 ad mutex_enter(&mfs_lock);
416 1.12 fvdl continue;
417 1.9 mycroft }
418 1.28 thorpej
419 1.91 ad sleepreturn = cv_wait_sig(&mfsp->mfs_cv, &mfs_lock);
420 1.1 mycroft }
421 1.101 yamt KASSERT(bufq_peek(mfsp->mfs_buflist) == NULL);
422 1.91 ad refcnt = --mfsp->mfs_refcnt;
423 1.91 ad mutex_exit(&mfs_lock);
424 1.91 ad if (refcnt == 0) {
425 1.91 ad bufq_free(mfsp->mfs_buflist);
426 1.91 ad cv_destroy(&mfsp->mfs_cv);
427 1.91 ad kmem_free(mfsp, sizeof(*mfsp));
428 1.91 ad }
429 1.15 fvdl return (sleepreturn);
430 1.1 mycroft }
431 1.1 mycroft
432 1.1 mycroft /*
433 1.1 mycroft * Get file system statistics.
434 1.1 mycroft */
435 1.10 christos int
436 1.85 pooka mfs_statvfs(struct mount *mp, struct statvfs *sbp)
437 1.1 mycroft {
438 1.1 mycroft int error;
439 1.1 mycroft
440 1.85 pooka error = ffs_statvfs(mp, sbp);
441 1.58 christos if (error)
442 1.58 christos return error;
443 1.58 christos (void)strncpy(sbp->f_fstypename, mp->mnt_op->vfs_name,
444 1.58 christos sizeof(sbp->f_fstypename));
445 1.58 christos sbp->f_fstypename[sizeof(sbp->f_fstypename) - 1] = '\0';
446 1.58 christos return 0;
447 1.1 mycroft }
448