summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Be consistent about flag values passed to device drivers read/writephk2004-12-221-11/+4
| | | | | | | | | | | methods: Read can see O_NONBLOCK and O_DIRECT. Write can see O_NONBLOCK, O_DIRECT and O_FSYNC. In addition O_DIRECT is shadowed as IO_DIRECT for now for backwards compatibility.
* Shuffle numeric values of the IO_* flags to match the O_* flags fromphk2004-12-221-0/+13
| | | | | | | | | | fcntl.h. This is in preparation for making the flags passed to device drivers be consistently from fcntl.h for all entrypoints. Today open, close and ioctl uses fcntl.h flags, while read and write uses vnode.h flags.
* We can only ever get to vgonechrl() from a devfs vnode, so we do notphk2004-12-201-1/+2
| | | | | | | need to reassign the vp->v_op to devfs_specops, we know that is the value already. Make devfs_specops private to devfs.
* Add a couple of KASSERTS to try to diagnose a problem reported.phk2004-12-201-1/+5
|
* Be a bit more assertive about vnode bypass.phk2004-12-141-16/+17
|
* Exporting of NTFS filesystem broke in rev 1.70. Fix it.ssouhlal2004-12-131-7/+4
| | | | Approved by: phk, grehan (mentor)
* Don't forget to bypass vnodes in corner cases.phk2004-12-131-8/+6
| | | | | Found by: kkenn and ports/shell/zsh Thanks to: jeffr
* Another FNONBLOCK -> O_NONBLOCK.phk2004-12-131-2/+2
| | | | | Don't unconditionally set IO_UNIT to device drivers in write: nobody checks it, and since it was always set it did not carry information anyway.
* Use O_NONBLOCK instead of FNONBLOCK alias.phk2004-12-131-1/+1
|
* Explicit panic in vop_read/vop_write for devicesphk2004-12-131-0/+2
|
* Explicitly panic vop_read/vop_write on fifos.phk2004-12-131-0/+2
|
* Don't deref NULL if no charset-conversion is specified.phk2004-12-122-2/+10
| | | | Return correct vnode in vop_bmap()
* 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.
OpenPOWER on IntegriCloud