aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/unionfs
Commit message (Collapse)AuthorAgeFilesLines
...
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inAttilio Rao2008-01-133-48/+42
| | | | | | | | | | | | | | conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary. KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed. Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com> Notes: svn path=/head/; revision=175294
* vn_lock() is currently only used with the 'curthread' passed as argument.Attilio Rao2008-01-103-28/+29
| | | | | | | | | | | | | | | | | | | Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com> Notes: svn path=/head/; revision=175202
* Trimm out now unused option LK_EXCLUPGRADE from the lockmgr namespace.Attilio Rao2007-12-281-1/+0
| | | | | | | | | | | | | | | | This option just adds complexity and the new implementation no longer will support it, so axing it now that it is unused is probabilly the better idea. FreeBSD version is bumped in order to reflect the KPI breakage introduced by this patch. In the ports tree, kris found that only old OSKit code uses it, but as it is thought to work only on 2.x kernels serie, version bumping will solve any problem. Notes: svn path=/head/; revision=174951
* Add a new 'why' argument to kdb_enter(), and a set of constants to useRobert Watson2007-12-251-2/+4
| | | | | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface. Notes: svn path=/head/; revision=174898
* Merge first in a series of TrustedBSD MAC Framework KPI changesRobert Watson2007-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | from Mac OS X Leopard--rationalize naming for entry points to the following general forms: mac_<object>_<method/action> mac_<object>_check_<method/action> The previous naming scheme was inconsistent and mostly reversed from the new scheme. Also, make object types more consistent and remove spaces from object types that contain multiple parts ("posix_sem" -> "posixsem") to make mechanical parsing easier. Introduce a new "netinet" object type for certain IPv4/IPv6-related methods. Also simplify, slightly, some entry point names. All MAC policy modules will need to be recompiled, and modules not updates as part of this commit will need to be modified to conform to the new KPI. Sponsored by: SPARTA (original patches against Mac OS X) Obtained from: TrustedBSD Project, Apple Computer Notes: svn path=/head/; revision=172930
* Get rid of qaddr_t.Alfred Perlstein2007-10-161-1/+1
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=172697
* Added whiteout behavior option. ``-o whiteout=always'' is default modeDaichi GOTO2007-10-143-2/+32
| | | | | | | | | | | | | | (it is established practice) and ``-o whiteout=whenneeded'' is less disk-space using mode especially for resource restricted environments like embedded environments. (Contributed by Ed Schouten. Thanks) Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172643
* Default copy mode has been changed from traditional-mode to transparent-mode.Daichi GOTO2007-10-141-1/+1
| | | | | | | | | | | | | | Some folks who have reported some issues have solved with transparent mode. We guess it is time to change the default copy mode. The transparent-mode is the best in most situations. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172642
* Fixed un-vrele issue of upper layer root vnode of unionfs.Daichi GOTO2007-10-141-1/+1
| | | | | | | | | | Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172641
* Added NULL check code pointed out by Coverity. (via StanislavDaichi GOTO2007-10-141-0/+2
| | | | | | | | | | | | Sedov. Thanks) Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172640
* - It has been become MPSAFE.Daichi GOTO2007-10-142-22/+51
| | | | | | | | | | | | | | - Fixed lock panic issue under MPSAFE. - Fixed panic issue whenever it locks vnode with reclaim. - Fixed lock implementations not conforming to vnode_if.src style. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172639
* Fixed vnode unlock/vrele untreated issues whenever errors haveDaichi GOTO2007-10-141-4/+4
| | | | | | | | | | | | occurred during some treatments. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172638
* - Added support for vfs_cache on unionfs. As a result, you can useDaichi GOTO2007-10-143-171/+43
| | | | | | | | | | | | | | | | applications that use procfs on unionfs. - Removed unionfs internal cache mechanism because it has vfs_cache support instead. As a result, it just simplified code of unionfs. - Fixed kern/111262 issue. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172637
* Added treatments to prevent readdir infinity loop using with Linux binaryDaichi GOTO2007-10-141-29/+23
| | | | | | | | | | | | compatibility feature. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172636
* Changed it frees unneeded memory ASAP.Daichi GOTO2007-10-141-1/+5
| | | | | | | | | | Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172635
* Log:Daichi GOTO2007-10-141-0/+6
| | | | | | | | | | | | Improved access permission check treatments. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172634
* Revert UF_OPENING workaround for CURRENT.Konstantin Belousov2007-05-313-8/+7
| | | | | | | | | | | | Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation argument from being file descriptor index into the pointer to struct file. Proposed and reviewed by: jhb Reviewed by: daichi (unionfs) Approved by: re (kensmith) Notes: svn path=/head/; revision=170152
* Since renaming of vop_lock to _vop_lock, pre- and post-conditionKonstantin Belousov2007-05-181-2/+2
| | | | | | | | | function calls are no more generated for vop_lock. Rename _vop_lock to vop_lock1 to satisfy tools/vnode_if.awk assumption about vop naming conventions. This restores pre/post-condition calls. Notes: svn path=/head/; revision=169671
* Replace custom file descriptor array sleep lock constructed using a mutexRobert Watson2007-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and flags with an sxlock. This leads to a significant and measurable performance improvement as a result of access to shared locking for frequent lookup operations, reduced general overhead, and reduced overhead in the event of contention. All of these are imported for threaded applications where simultaneous access to a shared file descriptor array occurs frequently. Kris has reported 2x-4x transaction rate improvements on 8-core MySQL benchmarks; smaller improvements can be expected for many workloads as a result of reduced overhead. - Generally eliminate the distinction between "fast" and regular acquisisition of the filedesc lock; the plan is that they will now all be fast. Change all locking instances to either shared or exclusive locks. - Correct a bug (pointed out by kib) in fdfree() where previously msleep() was called without the mutex held; sx_sleep() is now always called with the sxlock held exclusively. - Universally hold the struct file lock over changes to struct file, rather than the filedesc lock or no lock. Always update the f_ops field last. A further memory barrier is required here in the future (discussed with jhb). - Improve locking and reference management in linux_at(), which fails to properly acquire vnode references before using vnode pointers. Annotate improper use of vn_fullpath(), which will be replaced at a future date. In fcntl(), we conservatively acquire an exclusive lock, even though in some cases a shared lock may be sufficient, which should be revisited. The dropping of the filedesc lock in fdgrowtable() is no longer required as the sxlock can be held over the sleep operation; we should consider removing that (pointed out by attilio). Tested by: kris Discussed with: jhb, kris, attilio, jeff Notes: svn path=/head/; revision=168355
* Make insmntque() externally visibile and allow it to fail (e.g. duringTor Egge2007-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | late stages of unmount). On failure, the vnode is recycled. Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure. Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE. Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility. Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup. Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib Notes: svn path=/head/; revision=167497
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.Pawel Jakub Dawidek2007-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 Notes: svn path=/head/; revision=166774
* Simplify code in union_hashins() and union_hashget() functions. TheseCraig Rodrigues2007-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> Notes: svn path=/head/; revision=165804
* Eliminate ASSERT_VOP_ELOCKED panics when doing mkdir or symlink whenCraig Rodrigues2007-01-051-8/+20
| | | | | | | | | sysctl vfs.lookup_shared=1. Submitted by: daichi, Masanori OZAWA <ozawa ongs co jp> Notes: svn path=/head/; revision=165785
* Remove unused variable in unionfs_root().Craig Rodrigues2006-12-091-2/+0
| | | | | | | Submitted by: daichi, Masanori OZAWA Notes: svn path=/head/; revision=165037
* Use vfs_mount_error() in a few places to give more descriptive mount errorCraig Rodrigues2006-12-091-2/+6
| | | | | | | messages. Notes: svn path=/head/; revision=165036
* Add locking around calls to unionfs_get_node_status()Craig Rodrigues2006-12-091-0/+4
| | | | | | | | | | in unionfs_ioctl() and unionfs_poll(). Submitted by: daichi, Masanori OZAWA <ozawa@ongs.co.jp> Prompted by: kris Notes: svn path=/head/; revision=165035
* In unionfs_readdir(), prevent a possible NULL dereference.Craig Rodrigues2006-12-091-0/+4
| | | | | | | | CID: 1667 Found by: Coverity Prevent (tm) Notes: svn path=/head/; revision=165034
* In unionfs_hashrem(), use LIST_FOREACH_SAFE when iterating overCraig Rodrigues2006-12-091-2/+3
| | | | | | | | | | the list of nodes to free them. CID: 1668 Found by: Coverity Prevent (tm) Notes: svn path=/head/; revision=165033
* Add missing includes for <sys/buf.h> and <sys/bio.h>.Craig Rodrigues2006-12-021-0/+2
| | | | Notes: svn path=/head/; revision=164836
* Many, many thanks to Masanori OZAWA <ozawa@ongs.co.jp>Craig Rodrigues2006-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) Notes: svn path=/head/; revision=164829
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.Tor Egge2006-09-261-1/+8
| | | | | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl(). Notes: svn path=/head/; revision=162647
* Remove unneeded mac.h include.Robert Watson2006-07-061-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=160134
* Normalize a significant number of kernel malloc type names:Robert Watson2005-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. Notes: svn path=/head/; revision=151897
* - Fix typo.Florent Thoumie2005-10-171-1/+1
| | | | | | | | Approved by: ssouhlal MFC after: 1 week Notes: svn path=/head/; revision=151396
* Remove public declarations of variables that were forgotten when they wereDavid E. O'Brien2005-08-101-1/+0
| | | | | | | made static. Notes: svn path=/head/; revision=148920
* - Set the v_object pointer after a successful VOP_OPEN(). This isn't aJeff Roberson2005-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> Notes: svn path=/head/; revision=145825
* - Fix several locking problems in unionfs_mount so that it will comeJeff Roberson2005-04-271-23/+7
| | | | | | | closer to passing DEBUG_VFS_LOCKS. Notes: svn path=/head/; revision=145586
* - Pass the ISOPEN flag down to our lower filesystems.Jeff Roberson2005-04-271-2/+1
| | | | | | | - Remove an erroneous VOP lock assert. Notes: svn path=/head/; revision=145585
* - Change all filesystems and vfs_cache to relock the dvp once the child isJeff Roberson2005-04-131-11/+0
| | | | | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=145006
* - Fix union's assumptions about when the dvp is unlocked. It is onlyJeff Roberson2005-04-041-3/+3
| | | | | | | unlocked in the ISDOTDOT case now, not for all !ISLASTCN lookups. Notes: svn path=/head/; revision=144620
* - Remove unnecessary LOCKPARENT manipulation.Jeff Roberson2005-03-281-20/+0
| | | | | | | Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=144225
* - Update vfs_root implementations to match the new prototype. None ofJeff Roberson2005-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. Notes: svn path=/head/; revision=144058
* - The VI_DOOMED flag now signals the end of a vnode's relationship withJeff Roberson2005-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. Notes: svn path=/head/; revision=143513
* remove dead codeSam Leffler2005-02-221-3/+0
| | | | | | | Submitted by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=142255
* Deimplement vop_destroyvobject()Poul-Henning Kamp2005-02-072-15/+1
| | | | Notes: svn path=/head/; revision=141442
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.Poul-Henning Kamp2005-01-251-21/+0
| | | | Notes: svn path=/head/; revision=140783
* Kill VOP_CREATEVOBJECT(), it is now the responsibility of the filesystemPoul-Henning Kamp2005-01-251-18/+0
| | | | | | | for a given vnode to create a vnode_pager object if one is needed. Notes: svn path=/head/; revision=140781
* Don't call VOP_CREATEVOBJECT(), it's the responsibility of thePoul-Henning Kamp2005-01-242-16/+0
| | | | | | | filesystem which owns the vnode. Notes: svn path=/head/; revision=140779
* Kill the VV_OBJBUF and test the v_object for NULL instead.Poul-Henning Kamp2005-01-241-3/+1
| | | | Notes: svn path=/head/; revision=140734
* Whitespace in vop_vector{} initializations.Poul-Henning Kamp2005-01-131-5/+6
| | | | Notes: svn path=/head/; revision=140196