summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove VFS_START(). Its original purpose involved the mfs filesystem,das2005-02-201-4/+1
| | | | | | | which is long gone. Discussed with: mckusick Reviewed by: phk
* Make various mountpoint related functions static.phk2005-02-101-3/+5
|
* - Move gets() function to libkern (I want to use it outside vfs_mount.c).pjd2005-02-031-44/+2
| | | | | | | | | | - Add buffer size limitations (overflow will not be possible anymore). - Add 'visible' option, which will allow for passphrase reading in the future. - Remove special treatment of '@' and '#', those two are only confusing. Discussed with: rwatson MFC after: 2 weeks
* - Protect mnt_kern_flag with the mountpoint's mutex. This is requiredjeff2005-01-241-7/+11
| | | | | | to make the suspend related functions mpsafe. Sponsored By: Isilon Systems, Inc.
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-2/+2
|
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-1/+1
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* Do not vput(9) unlocked vnode and do not VREF it with the sole purposekan2004-12-271-2/+0
| | | | | | of vputting it back immediately. Complained by: DEBUG_VFS_LOCKS
* Hide/remove various printfs, now that root mounting doesn't seem to explodephk2004-12-201-9/+2
| | | | on people.
* Move the checkdirs() function from vfs_mount.c to kern_descrip.c andphk2004-12-141-52/+3
| | | | call it mountcheckdirs().
* Copy the entire stats structure. Let compiler decide how.phk2004-12-111-1/+1
|
* Fix whitespace.phk2004-12-111-1/+1
| | | | Spotted by: njl
* Remove the /dev/dev -> / symlink after we are done with it.phk2004-12-111-0/+2
|
* The remaining part of nmount/omount/rootfs mount changes. I cannot sensiblyphk2004-12-071-208/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(/).
* Instead of complaining about it, just silently filter out MNT_ROOTFS.phk2004-12-071-2/+1
| | | | This fixes the "fsck /" problem various people have reported overnight.
* Always call VFS_STATFS() on mp->mnt_stat when we have mounted a filesystem,phk2004-12-061-0/+1
| | | | this way individual filesystems don't have to do it.
* Add more functions for handling mount arguments in VFS_MOUNT():phk2004-12-061-0/+112
| | | | | | | | | vfs_flagopt() for binary/boolean options. vfs_getopts() for string options vfs_filteropt() to check for unknown options. vfs_scanopt() for scanf() like processing of options. Also add function for setting the stat.f_mntfromname field.
* Change the first argument of vfs_cmount() to a handy struct mntarg* andphk2004-12-061-14/+21
| | | | | | call it accordingly. (No filesystems implement vfs_cmount() yet, so this is a no-op commit)
* Add a few convenient functions in the mount_arg() family and collect thephk2004-12-061-70/+204
| | | | entire family at the end of the source file.
* Collapse two almost identical license copies, preserving the rights ofphk2004-12-061-24/+1
| | | | all listed authors, rightholders and contributors.
* Remove the kern.rootdev sysctl.phk2004-12-061-24/+0
| | | | | | Root filessytems (like NFS) don't have an associated disk device, and even if they had, the exact semantics would be filesystem dependent and should be implemented there.
* Make struct vfsopt{list} private to vfs_mount.cphk2004-12-061-0/+8
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-0/+11
| | | | | | | | 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.
* Implement a function, mount_arg() for accumulating a list of mount parametersphk2004-12-031-42/+45
| | | | | | | | | to nmount. Make kernel_mount() accept the output from mount_arg() and know how to free the malloc'ed space. Make kernel_vmount() use the new function.
* When omount() is called, check if the filesystem have a cmount methodphk2004-12-031-2/+11
| | | | | | | | and if so call it. The cmount method will gather and interpret omount() style arguments, and issue a kern_[v]mount() call to execute the corresponding nmount operation.
* Add early checks for MNT_ROOTFS since we need to allow it later on inphk2004-12-031-0/+9
| | | | the code path.
* Retire unused vfs_mount() function in the name of nmount migration.phk2004-12-031-24/+0
|
* Introduce vfs_byname_kld() which will try to load the filesystemphk2004-12-031-29/+3
| | | | | | | as a module if possible. Use it so we don't have linker magic in the middle of the already complex mount code.
* Use FILEDESC_LOCK_FAST in checkdirs()phk2004-11-281-5/+5
|
* Eliminate MNT_NODEV usage, it doesn't have any meaning any more.phk2004-11-261-2/+2
| | | | | Keep a #define MNT_NODEV 0 around to avoid dealing with contrib userland like mount_smbfs.
* Allow a filesystem to have both old and new mount methods at the samephk2004-11-251-1/+2
| | | | time. This will be necessary for transitioning.
* Assert Giant held in vfs_domount() and vfs_dounmount()phk2004-11-251-3/+20
| | | | Explicitly grab Giant before calling these.
* Integrate the relevant bits of vfs_rootmountalloc() where it matters.phk2004-11-251-38/+18
|
* Pass path to filesystem when mounting rootphk2004-11-181-1/+1
|
* remove unused variablephk2004-11-101-1/+0
|
* Remove hack which mounts the root filesystem R/W if the device isphk2004-11-101-7/+0
| | | | | named 'md<something>'. While convenient, it does not belong here, if anywhere at all.
* Make getdiskbyname() static to vfs_mount.c.phk2004-11-091-2/+6
| | | | Eliminate use of vn_todev() while here.
* Drop Giant around the call to g_waitidle().phk2004-10-231-0/+2
| | | | This is necessary to allow any geom events which need it to pick up Giant.
* Back out changes which were introduced to delay mounting root file system.pjd2004-10-051-80/+66
| | | | | Those changes were made on gmirror needs, but now gmirror handles this by itself.
* Rename 'mount_root_delay' tunable to 'vfs.root.mountdelay', which fitspjd2004-09-241-1/+1
| | | | | | a bit better to our current naming scheme. Discussed with: ru
* Eliminate devsw() call, we are not dereferencing the pointer.phk2004-09-241-1/+1
|
* Introduce new /boot/loader.conf variable: root_mount_delay.pjd2004-09-231-66/+80
| | | | | | | | | | It can be used to delay mounting root partition to give a chance to GEOM providers to show up. Now, when there is no needed provider, vfs_rootmount() function will look for it every second and if it can't be find in defined time, it'll ask for root device name (before this change it was done immediately). This will allow to boot from gmirror device in degraded mode.
* It's too easy to panic the machine when INVARIANTS are turned onalfred2004-09-051-1/+2
| | | | | | | | | | | | | and you botch a call to nmount(2). This is because there is an INVARIANTS check that asserts that opt->len must be zero if opt->val is not NULL. The problem is that the code does not actually follow this invariant if there is an error while processing mount options. Fix the code to honor the INVARIANT. Silence on: fs@
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-52/+53
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Convert the vfsconf list to a TAILQ.phk2004-07-271-83/+73
| | | | | | | | Introduce vfs_byname() function to find things on it. Staticize vfs_nmount() function under the name vfs_donmount(). Various cleanups.
* Give kldunload a -f(orce) argument.phk2004-07-131-1/+1
| | | | | | | | | | | | | | | | | Add a MOD_QUIESCE event for modules. This should return error (EBUSY) of the module is in use. MOD_UNLOAD should now only fail if it is impossible (as opposed to inconvenient) to unload the module. Valid reasons are memory references into the module which cannot be tracked down and eliminated. When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is not given, MOD_QUIESCE failing will also prevent the unload. For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as success. Document that modules should return EOPNOTSUPP for unknown events.
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-4/+4
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* Clean up and wash struct iovec and struct uio handling.phk2004-07-101-26/+12
| | | | | | | | | | | | Add copyiniov() which copies a struct iovec array in from userland into a malloc'ed struct iovec. Caller frees. Change uiofromiov() to malloc the uio (caller frees) and name it copyinuio() which is more appropriate. Add cloneuio() which returns a malloc'ed copy. Caller frees. Use them throughout.
* Use vfs_suser() where appropriate.alfred2004-07-061-11/+7
|
* NFS mobility PHASE I, II & III (phase VI, and V pending):alfred2004-07-061-2/+2
| | | | | | | | | | | | | | | Rebind the client socket when we experience a timeout. This fixes the case where our IP changes for some reason. Signal a VFS event when NFS transitions from up to down and vice versa. Add a placeholder vfs_sysctl where we will put status reporting shortly. Also: Make down NFS mounts return EIO instead of EINTR when there is a soft timeout or force unmount in progress.
OpenPOWER on IntegriCloud