summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda
Commit message (Collapse)AuthorAgeFilesLines
* Use VOP_NULL rather than VOP_PANIC for Coda's vop_print routine, so asrwatson2008-01-191-1/+1
| | | | | | to avoid panicking in DDB show lockedvnods. MFC after: 3 days
* Lock the new directory vnode returned by coda_mkdir(), as this is requiredrwatson2008-01-191-1/+5
| | | | | | by FreeBSD's vnode locking protocol. MFC after: 3 days
* Borrow the VM object associated with an underlying cache vnode with therwatson2008-01-191-1/+5
| | | | | | | | | Coda vnode derived from it, in the style of nullfs. This allows files in the Coda file system to be memory-mapped, such as with execve(2) or mmap(2). MFC after: 3 days Reported by: Rune <u+openafsdev-sr55 at chalmers dot se>
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-131-4/+4
| | | | | | | | | | | 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>
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-102-5/+5
| | | | | | | | | | | | | | | | 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>
* Get rid of qaddr_t.alfred2007-10-161-1/+1
| | | | Requested by: bde
* Make sure we release the control vnode in Coda:rwatson2007-07-202-5/+1
| | | | | | | | | | | | | | | | We allocate coda_ctlvp when /coda is mounted, but never release it. During the unmount this vnode was marked as UNMOUNTING and when venus is started a second time the system would hang, possibly waiting for the old vnode to disappear. So now we call vrele on the control vnode when file system is unmounted to drop the reference we got during the mount. I'm pretty sure it is also necessary to not skip the handling in coda_inactive for the control vnode, it seems like that is the place we actually get rid of the vnode once the refcount has dropped to 0. Submitted by: Jan Harkes <jaharkes at cs dot cmu dot edu> Approved by: re (kensmith)
* Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/codarwatson2007-07-128-36/+36
| | | | | | | | | | by removing files from src/sys/coda, and updating include paths in the new location, kernel configuration, and Makefiles. In one case add $FreeBSD$. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* Forced commit to recognize repo-copy of Coda files from src/sys/coda torwatson2007-07-121-0/+2
| | | | | | | | src/sys/fs/coda. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* Fix ioctls on the control vnode: ioctls on a character device fail withrwatson2007-07-111-1/+1
| | | | | | | | ENOTTY. Make the control vnode a regular file so that ioctls are passed through to our kernel module. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Avoid a panic in insmntque when we pass a NULL mount: this reenablesrwatson2007-07-111-7/+1
| | | | | | | | | some previously disabled code which according to the comment caused a problem during shutdown. But even that is still better than triggering a kernel panic whenever venus is started. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Replace CODA_OPEN with CODA_OPEN_BY_FD: coda_open was disabled becauserwatson2007-07-116-131/+54
| | | | | | | | | | | we can't open container files by device/inode number pair anymore. Replace the CODA_OPEN upcall with CODA_OPEN_BY_FD, where venus returns an open file descriptor for the container file. We can then grab a reference on the vnode coda_psdev.c:vc_nb_write and use this vnode for further accesses to the container file. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Resolve Coda mount failing because Coda failed to match the devicerwatson2007-07-111-8/+4
| | | | | | | | operations. But we don't have to, if we find the coda_mntinfo structure for this device in our linked list, we know the device is good. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Avoid crash when opening Coda device: when allocating coda_mntinfo, werwatson2007-07-112-7/+10
| | | | | | | | need to initialize dev so that we can actually find the allocated coda_mntinfo structure later on. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Revert UF_OPENING workaround for CURRENT.kib2007-05-311-3/+3
| | | | | | | | | 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)
* Since renaming of vop_lock to _vop_lock, pre- and post-conditionkib2007-05-182-3/+3
| | | | | | 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.
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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
* coda_vptofh is never defined nor used.pjd2007-02-021-1/+0
|
* change vop_lock handling to allowing tracking of callers' file and line forkmacy2006-11-132-3/+3
| | | | | | acquisition of lockmgr locks Approved by: scottl (standing in for mentor rwatson)
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* CODA_COMPAT_5 may not be defined unconditionally in the coda5 module.yar2006-02-271-1/+6
| | | | | | | | | | | | Otherwise a kernel build would break in the coda5 module if the main kernel conf file enabled CODA_COMPAT_5, too. Redefined symbols are strictly disallowed by -Werror. To overcome this issue, introduce a different symbol indicating coda5 build, CODA5_MODULE, and translate it to CODA_COMPAT_5 appropriately in /sys/coda/coda.h. MFC after: 3 days
* - Reorder calls to vrele() after calls to vput() when the vrele is ajeff2006-02-011-12/+9
| | | | | | | | | | | | directory. vrele() may lock the passed vnode, which in these cases would give an invalid lock order of child -> parent. These situations are deadlock prone although do not typically deadlock because the vrele is typically not releasing the last reference to the vnode. Users of vrele must consider it as a call to vn_lock() and order it appropriately. MFC After: 1 week Sponsored by: Isilon Systems, Inc. Tested by: kkenn
* Convert last four functions in coda_vnops.c to ANSI C functionrwatson2006-01-211-14/+6
| | | | | | | declarations. I knew I would get to fix something in Coda eventually. MFC after: 1 week
* o Fix typo in the define: s/MRAK_INT_GEN/MARK_INT_GEN/. The typomaxim2006-01-091-1/+1
| | | | | | was harmless because the define is not used in coda_vfsops.c. Submitted by: Hugo Meiland
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-1/+1
|
* 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.
* Merge the dev_clone and dev_clone_cred event handlers into a singlerwatson2005-08-081-3/+4
| | | | | | | | | | | | | event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-0/+1
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* Explicitly hold a reference to the cdev we have just cloned. Thisphk2005-03-311-0/+1
| | | | | closes the race where the cdev was reclaimed before it ever made it back to devfs lookup.
* - Don't panic if we can't lock a child in lookup, return an error instead.jeff2005-03-281-5/+4
| | | | | | | | - Only unlock the directory if this is a DOTDOT lookup. Previously this code could have deadlocked if there was a DOTDOT lookup with LOCKPARENT set and another thread was locking the other way up the tree. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-1/+2
| | | | | | | | 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.
* Disable two users of findcdev. They do the wrong thing now and willphk2005-03-151-0/+4
| | | | | need to be fixed. In both cases the API should be reengineered to do something (more) sensible.
* Print devtoname() instead of minor().phk2005-03-151-2/+2
|
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-131-1/+1
| | | | | | the filesystem. Check that rather than VI_XLOCK. Sponsored by: Isilon Systems, Inc.
* - The c_lock in the coda node does not offer any features over the standardjeff2005-03-132-16/+8
| | | | | | | | | vnode lock. Remove the c_lock and use the vn lock in its place. - Keep the coda lock functions so that the debugging information is preserved, but call directly to the vop_std*lock routines for the real functionality. Sponsored by: Isilon Systems, Inc.
* Replace the workaround for a deadlock bug in Coda with a differentdas2005-02-202-16/+4
| | | | workaround that does not rely on vfs_start().
* Remove vop_destroyvobject() initialization.phk2005-02-071-1/+0
|
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.phk2005-01-251-1/+0
|
* Kill VOP_CREATEVOBJECT(), it is now the responsibility of the filesystemphk2005-01-251-1/+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-241-26/+0
| | | | filesystem which owns the vnode.
* Remove unused coda_fbsd_getpages()phk2005-01-192-68/+0
|
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-132-8/+8
| | | | directly.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-114-10/+6
| | | | | | | | | | | | | | | | | | 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
* Start each of the license/copyright comments with /*-imp2005-01-0519-27/+27
|
* Convert coda to nmount.phk2004-12-061-19/+13
|
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-012-185/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-4/+4
| | | | | | | | | 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.)
* Do not use devsw() but si_devsw direction. This is still bogus but aphk2004-09-231-1/+1
| | | | fair bit less so.
* General modernization of coda:brooks2004-09-014-93/+54
| | | | | | | | - Ditch NVCODA - Don't use a static major - Don't declare functions extern Reviewed by: peter
OpenPOWER on IntegriCloud