summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs
Commit message (Collapse)AuthorAgeFilesLines
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-152-8/+7
| | | | | | | | | | | | | | | | This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
* Simplify code in union_hashins() and union_hashget() functions. Theserodrigc2007-01-051-24/+12
| | | | | | | functions now more closely resemble similar functions in nullfs. This also eliminates some errors. Submitted by: daichi, Masanori OZAWA <ozawa ongs co jp>
* Eliminate ASSERT_VOP_ELOCKED panics when doing mkdir or symlink whenrodrigc2007-01-051-8/+20
| | | | | | sysctl vfs.lookup_shared=1. Submitted by: daichi, Masanori OZAWA <ozawa ongs co jp>
* Remove unused variable in unionfs_root().rodrigc2006-12-091-2/+0
| | | | Submitted by: daichi, Masanori OZAWA
* Use vfs_mount_error() in a few places to give more descriptive mount errorrodrigc2006-12-091-2/+6
| | | | messages.
* Add locking around calls to unionfs_get_node_status()rodrigc2006-12-091-0/+4
| | | | | | | in unionfs_ioctl() and unionfs_poll(). Submitted by: daichi, Masanori OZAWA <ozawa@ongs.co.jp> Prompted by: kris
* In unionfs_readdir(), prevent a possible NULL dereference.rodrigc2006-12-091-0/+4
| | | | | CID: 1667 Found by: Coverity Prevent (tm)
* In unionfs_hashrem(), use LIST_FOREACH_SAFE when iterating overrodrigc2006-12-091-2/+3
| | | | | | | the list of nodes to free them. CID: 1668 Found by: Coverity Prevent (tm)
* Add missing includes for <sys/buf.h> and <sys/bio.h>.rodrigc2006-12-021-0/+2
|
* Many, many thanks to Masanori OZAWA <ozawa@ongs.co.jp>rodrigc2006-12-024-3040/+3216
| | | | | | | | | | | | | and Daichi GOTO <daichi@FreeBSD.org> for submitting this major rewrite of unionfs. This rewrite was done to try to solve many of the longstanding crashing and locking issues in the existing unionfs implementation. This implementation also adds a 'MASQUERADE mode', which allows the user to set different user, group, and file permission modes in the upper layer. Submitted by: daichi, Masanori OZAWA Reviewed by: rodrigc (modified for minor style issues)
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-261-1/+8
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Remove unneeded mac.h include.rwatson2006-07-061-1/+0
| | | | MFC after: 3 days
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* - Fix typo.flz2005-10-171-1/+1
| | | | | Approved by: ssouhlal MFC after: 1 week
* Remove public declarations of variables that were forgotten when they wereobrien2005-08-101-1/+0
| | | | made static.
* - Set the v_object pointer after a successful VOP_OPEN(). This isn't ajeff2005-05-031-1/+2
| | | | | | | perfect solution as the lower vm object can change at unpredictable times if our lower vp happens to be on another unionfs, etc. Submitted by: Oleg Sharoiko <os@rsu.ru>
* - Fix several locking problems in unionfs_mount so that it will comejeff2005-04-271-23/+7
| | | | closer to passing DEBUG_VFS_LOCKS.
* - Pass the ISOPEN flag down to our lower filesystems.jeff2005-04-271-2/+1
| | | | - Remove an erroneous VOP lock assert.
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-11/+0
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - Fix union's assumptions about when the dvp is unlocked. It is onlyjeff2005-04-041-3/+3
| | | | unlocked in the ISDOTDOT case now, not for all !ISLASTCN lookups.
* - Remove unnecessary LOCKPARENT manipulation.jeff2005-03-281-20/+0
| | | | Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-242-2/+3
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-131-3/+0
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* remove dead codesam2005-02-221-3/+0
| | | | Submitted by: Coverity Prevent analysis tool
* Deimplement vop_destroyvobject()phk2005-02-072-15/+1
|
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.phk2005-01-251-21/+0
|
* Kill VOP_CREATEVOBJECT(), it is now the responsibility of the filesystemphk2005-01-251-18/+0
| | | | for a given vnode to create a vnode_pager object if one is needed.
* Don't call VOP_CREATEVOBJECT(), it's the responsibility of thephk2005-01-242-16/+0
| | | | filesystem which owns the vnode.
* Kill the VV_OBJBUF and test the v_object for NULL instead.phk2005-01-241-3/+1
|
* Whitespace in vop_vector{} initializations.phk2005-01-131-5/+6
|
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-132-7/+6
| | | | directly.
* Change the generated VOP_ macro implementations to improve type checkingphk2005-01-131-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code.
* 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-064-4/+4
|
* Trust vfs_mount to call VFS_STATFS() on all mounts.phk2004-12-061-2/+0
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-7/+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.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-013-61/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* 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-011-43/+43
|
* VOP_REVOKE() is only ever for VCHR vnodes, so unionfs does notphk2004-11-131-20/+0
| | | | need a vop_revoke() method.
* Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.phk2004-11-132-4/+4
| | | | | | | | 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.
* Refuse attempts to mount root filesystemphk2004-11-091-0/+2
|
* Eliminate unnecessary KASSERTs.phk2004-10-271-4/+2
| | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
* Minor Bug fix. Some file was not translated.takawata2004-10-051-2/+2
|
* Fix unionfs problems when a directory is mounted on other directorytakawata2004-10-053-1/+11
| | | | | | | | with different file systems. This may cause ill things with my previous fix. Now it translate fsid of direct child of mount point directory only. Pointed out by: Uwe Doering
* Fix a problem when you try to mount a directory on another directorytakawata2004-10-021-0/+2
| | | | | | | | belongs to the same filesystem. In this problem, getcwd(3) will fail. I found the problem two years ago and I have forgotten to merge. http://docs.FreeBSD.org/cgi/mid.cgi?200202251435.XAA91094
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-4/+4
| | | | | | | | | | | | | | | | | | 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.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-122-3/+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.
* Remove advertising clause from University of California Regent'simp2004-04-074-16/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
OpenPOWER on IntegriCloud