summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Handle MNT_UPDATE export requests first and return so we do notphk2004-12-111-14/+14
| | | | | | interpret the rest of the msdosfs_args structure. Detected by: marcel
* typophk2004-12-111-1/+1
|
* First save from editor, *then* commit.phk2004-12-071-2/+1
|
* Fix exports.phk2004-12-071-6/+4
|
* The remaining part of nmount/omount/rootfs mount changes. I cannot sensiblyphk2004-12-072-128/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | split the conversion of the remaining three filesystems out from the root mounting changes, so in one go: cd9660: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() nfs(client): Convert to nmount (the simple way, mount_nfs(8) is still necessary). Add omount compat shims. Drop COMPAT_PRELITE2 mount arg compatibility. ffs: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() Remove vfs_omount() method, all filesystems are now converted. Remove MNTK_WANTRDWR, handling RO/RW conversions is a filesystem task, and they all do it now. Change rootmounting to use DEVFS trampoline: vfs_mount.c: Mount devfs on /. Devfs needs no 'from' so this is clean. symlink /dev to /. This makes it possible to lookup /dev/foo. Mount "real" root filesystem on /. Surgically move the devfs mountpoint from under the real root filesystem onto /dev in the real root filesystem. Remove now unnecessary getdiskbyname(). kern_init.c: Don't do devfs mounting and rootvnode assignment here, it was already handled by vfs_mount.c. Remove now unused bdevvp(), addaliasu() and addalias(). Put the few necessary lines in devfs where they belong. This eliminates the second-last source of bogo vnodes, leaving only the lemming-syncer. Remove rootdev variable, it doesn't give meaning in a global context and was not trustworth anyway. Correct information is provided by statfs(/).
* Use vfs_mountedfrom().phk2004-12-061-2/+2
| | | | | Since VFS_STATFS() always calls the filesystem with mp->mnt_stat now, the vfs_statfs method is now a no-op. Explain this in a comment.
* Trust vfs_mount to call VFS_STATFS() on all mounts.phk2004-12-061-2/+0
|
* Convert to nmount. Add omount compat.phk2004-12-065-39/+100
| | | | Unpropagate the sm_args function into the runtime part.
* Convert to nmount. Add omount compat.phk2004-12-061-27/+37
| | | | Use vfs_mountedon(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert to nmount. Add omount compat.phk2004-12-062-61/+80
| | | | | | Same comment about charset conversions apply. Use vfs_mountedfrom(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert to nmount. Add backwards compat cmount method.phk2004-12-063-47/+81
| | | | | | | Same comment as msdosfs applies: It would be nice if we had generic option names for charset conversions. Use vfs_mountefrom(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert nwfs to nmount, but take the low road: There is no way this isphk2004-12-061-9/+29
| | | | | ever going to work without a dedicated mount_nwfs(8) program so simply stick struct nwfs_args into a nmount argument and leave it at that.
* Fix a typo in PFS_TRACE.kan2004-12-061-1/+1
| | | | | PR: kern/74461 Submitted by: Craig Rodrigues <rodrigc at crodrigues.org>
* ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS()phk2004-12-061-4/+1
|
* Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS().phk2004-12-062-8/+3
|
* Use vfs_mountedfrom() and rely on vfs_mount.c to call VFS_STATFS()phk2004-12-061-3/+2
|
* Convert coda to nmount.phk2004-12-061-19/+13
|
* Convert msdosfs to nmount.phk2004-12-061-75/+121
| | | | | | | | | | | | | Add a vfs_cmount() function which converts omount argument stucture to nmount arguments. Convert vfs_omount() to vfs_mount() and parse nmount arguments. This is 100% compatible with existing userland. Later on, but before userland gets converted to nmount we may want to revisit the names of the mountoptions, for instance it may make sense to use consistent options for charset conversion etc.
* Fix warningphk2004-12-061-1/+1
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-0513-80/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Remove embryonic rootfs mounting facility.phk2004-12-041-30/+1
| | | | | In the near future rootfs mounting will not require special handling in the filesystems.
* Remove the de_devvp and stop VREF'ing it for every vnode we create.phk2004-12-023-11/+1
|
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-0139-747/+529
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Fix unvalidated pointer dereference. This is FreeBSD-SA-04:17.procfs.cperciva2004-12-011-1/+13
|
* hpfs_lookup() should have a vop_cachedlookup_t prototype an correspondingphk2004-12-011-2/+2
| | | | argument.
* Correctly prototype union_write with vop_write_t, not vop_read_t.phk2004-12-011-2/+2
|
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-0115-230/+230
|
* Ignore MNT_NODEV, it is implicit in choice of filesystem these days.phk2004-11-261-1/+1
|
* Eliminate null_open() and use instead null_bypass().phk2004-11-261-24/+0
| | | | | | | | Null_open() was only here to handle MNT_NODEV, but since that does not affect any filesystems anymore, it could only have any effect if you nullfs mounted a devfs but didn't want devices to show up. If you need that, there are easier ways.
* Use system wide no-op vfs_start function.phk2004-11-254-67/+0
|
* Add dropped implementation of ioctl for fifos.phk2004-11-181-1/+20
|
* Make vnode bypass for fifos (read, write, poll) mandatory.phk2004-11-171-133/+6
|
* Make vnode bypass for devices mandatory.phk2004-11-171-200/+1
|
* Make vnode bypass the default for devices.phk2004-11-151-1/+1
| | | | | | Can be disabled in case of problems with vfs.devfs.fops=0 in loader.conf
* Add file ops to fifofs so that we can bypass vnodes (and Giant) for thephk2004-11-151-1/+164
| | | | | | heavy-duty operations (read, write, poll/select, kqueue). Disabled for now, enable with "vfs.fifofs.fops=1" in loader.conf.
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-157-20/+20
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
* Integrate most of vop_revoke() into devfs_revoke() where it belongs.phk2004-11-131-1/+24
|
* Add the devfs_fp_check() function which helps us get from a struct filephk2004-11-131-70/+34
| | | | | | | | to a cdev and a devsw, doing all the relevant checks along the way. Add the check to see if fp->f_vnode->v_rdev differs from our cached fp->f_data copy of our cdev. If it does the device was revoked and we return ENXIO.
* VOP_REVOKE() is only ever for VCHR vnodes, so unionfs does notphk2004-11-131-20/+0
| | | | need a vop_revoke() method.
* fifos doesn't need a vop_lookup, the default will do fine.phk2004-11-131-19/+0
|
* Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.phk2004-11-134-11/+11
| | | | | | | | Use this in all the places where sleeping with the lock held is not an issue. The distinction will become significant once we finalize the exact lock-type to use for this kind of case.
* Remove stale comment after previous commit.trhodes2004-11-091-3/+0
| | | | Noticed by: pjd
* Detect root mount attempts on the flag, not on the NULL path.phk2004-11-092-2/+2
|
* Refuse attempts to mount root filesystemphk2004-11-096-5/+10
|
* Refuse attemps to mount root filesystemphk2004-11-094-2/+6
|
* Add optional device vnode bypass to DEVFS.phk2004-11-081-0/+287
| | | | | | | | | | | | | | | | | | | | | | | | The tunable vfs.devfs.fops controls this feature and defaults to off. When enabled (vfs.devfs.fops=1 in loader), device vnodes opened through a filedescriptor gets a special fops vector which instead of the detour through the vnode layer goes directly to DEVFS. Amongst other things this allows us to run Giant free read/write to device drivers which have been weaned off D_NEEDGIANT. Currently this means /dev/null, /dev/zero, disks, (and maybe the random stuff ?) On a 700MHz K7 machine this doubles the speed of dd if=/dev/zero of=/dev/null bs=1 count=1000000 This roughly translates to shaving 2usec of each read/write syscall. The poll/kqfilter paths need more work before they are giant free, this work is ongoing in p4::phk_bufwork Please test this and report any problems, LORs etc.
* Properly implement a default version of VOP_GETWRITEMOUNT.phk2004-11-062-2/+0
| | | | | Remove improper access to vop_stdgetwritemount() which should and will instead rely on the VOP default path.
* Add back securelevel check for disks.phk2004-11-041-0/+12
| | | | | | XXX: This should live in geom_dev.c but we don't have access to the cred there. XXX: XXX: This may not matter anymore since filesystems use geom_vfs.
* s/ffs/ntfs/phk2004-11-041-2/+6
| | | | | | Fix error handling to not use VOP_CLOSE() on the disk. Spotted by: tegge
* Make a more whole-hearted attempt at GEOM'ifying NTFS.phk2004-11-033-9/+21
| | | | | | I must have been sleepy when I did the first pass. Spotted by: tegge
OpenPOWER on IntegriCloud