summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda/coda_vfsops.c
Commit message (Collapse)AuthorAgeFilesLines
* Synchronize Coda kernel module definitions in our coda.h to Coda 6'srwatson2010-04-051-6/+6
| | | | | | | | | | | | | | | | | | | coda.h: - CodaFid typdef -> struct CodaFid throughout. - Use unsigned int instead of unsigned long for venus_dirent and other cosmetic fixes. - Introduce cuid_t and cgid_t and use instead of uid_t and gid_t in RPCs. - Synchronize comments and macros. - Use u_int32_t instead of unsigned long for coda_out_hdr. With these changes, a 64-bit Coda kernel module now works with coda6_client, whereas previous userspace and kernel versions of RPCs differed sufficiently to prevent using the file system. This has been verified only with casual testing, but /coda is now usable for at least basic operations on amd64. MFC after: 1 week
* Remove the thread argument from the FSD (File-System Dependent) parts ofattilio2009-05-111-9/+11
| | | | | | | | | | | | | | | | | the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
* Remove unused local variables.bz2009-01-311-2/+0
| | | | | | Submitted by: Christoph Mallon christoph.mallon@gmx.de Reviewed by: kib MFC after: 2 weeks
* Add the support for the AT_FDCWD and fd-relative name lookups to thekib2008-03-311-0/+1
| | | | | | | | | namei(9). Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho
* Since we're now actively maintaining the Coda module in the FreeBSD sourcerwatson2008-02-101-321/+311
| | | | | | | | | | | tree, restyle everything but coda.h (which is more explicitly shared across systems) into a closer approximation to style(9). Remove a few more unused function prototypes. Add or clarify some comments. MFC after: 1 month
* Various further non-functional cleanups to coda:rwatson2008-02-091-38/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename print_vattr to coda_print_vattr and make static, rename print_cred to coda_print_cred. - Remove unused coda_vop_nop. - Add XXX comment because coda_readdir forwards to the cache vnode's readdir rather than venus_readdir, and annotate venus_readdir as unused. - Rename vc_nb_* to vc_*. - Use d_open_t, d_close_t, d_read_t, d_write_t, d_ioctl_t and d_poll_t for prototyping vc_* as that is the intent, don't use our own definitions. - Rename coda_nb_statfs to coda_statfs, rename NB_SFS_SIZ to CODA_SFS_SIZ. - Replace one more OBE reference to NetBSD with a reference to FreeBSD. - Tidy up a little vertical whitespace here and there. - Annotate coda_nc_zapvnode as unused. - Remove unused vcodattach. - Annotate VM_INTR as unused. - Annotate that coda_fhtovp is unused and doesn't match the FreeBSD prototype, so isn't hooked up to vfs_fhtovp. If we want NFS export of Coda to work someday, this needs to be fixed. - Remove unused getNewVnode. - Remove unused coda_vget, coda_init, coda_quotactl prototypes. MFC after: 1 month
* No reason not to maintain stats on statfs in Coda, as it's done forrwatson2008-02-091-3/+3
| | | | | | other VFS operations, so uncomment the existing statistics gathering. MFC after: 1 month
* Remove unused devtomp(), which exploited UFS-specific knowledge to findrwatson2008-02-091-21/+0
| | | | | | | | the mountpoint for a specific device. This was implemented incorrectly, a bad idea in a fundamental sense, and also never used, so presumably a long-idle debugging function. MFC after: 1 month
* Make all calls to vn_lock() in Coda, including recently added ones,rwatson2008-02-091-3/+3
| | | | | | | use LK_RETRY, since failure is undesirable (and not handled). MFC after: 1 month Pointed out by: kib
* The Coda module was originally ported to NetBSD from Mach by rvb, andrwatson2008-02-081-1/+1
| | | | | | | | | | then later to FreeBSD. Update various NetBSD-related comments: in some cases delete them because they don't appply, in others update to say FreeBSD as they still apply but in FreeBSD (and might for that matter no longer apply on NetBSD), and flag one case where I'm not sure whether it applies. MFC after: 1 month
* Remove undefined coda excluded by #if 1 #else, which previously protectedrwatson2008-02-081-12/+0
| | | | | | | vget() calls using inode numbers to query the root of /coda, which is not needed since we now cache the root vnode with the mountpoint. MFC after: 1 month
* Rework coda_statfs(): no longer need to zero the statfs structure orrwatson2008-01-191-6/+1
| | | | | | | | | fill out all fields, just fill out the ones the file system knows about. Among other things, this causes the outpuf of "mount" and "df" to make quite a bit more sense as /dev/cfs0 is specified as the mountfrom name. MFC after: 3 days
* Zero mi_rotovp and coda_ctlvp immediately after calling vrele() on therwatson2008-01-191-3/+2
| | | | | | | | | | | vnodes during coda_unmount() in order to detect errant use of them after the vnode references may no longer be valid. No need to clear the VV_ROOT flag on mi_rootvp flag (especially after the vnode reference is no longer valid) as this isn't done on other file systems. MFC after: 3 days
* Don't declare functions as extern.rwatson2008-01-191-3/+0
| | | | | | | | Move all extern variable definitions to associated .h files, move some extern variable definitions between include files to place them more appropriately. MFC after: 3 days
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-101-3/+3
| | | | | | | | | | | | | | | | 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-201-0/+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-121-6/+6
| | | | | | | | | | 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
* 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)
* 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)
* 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
* 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.
* - 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.
* Replace the workaround for a deadlock bug in Coda with a differentdas2005-02-201-15/+4
| | | | workaround that does not rely on vfs_start().
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-2/+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
* Start each of the license/copyright comments with /*-imp2005-01-051-2/+2
|
* Convert coda to nmount.phk2004-12-061-19/+13
|
* 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-011-9/+1
| | | | | | | | - Ditch NVCODA - Don't use a static major - Don't declare functions extern Reviewed by: peter
* Kill count device support from config. I've changed the last fewpeter2004-08-301-1/+1
| | | | | | | | | | | | | | | | | remaining consumers to have the count passed as an option. This is i4b, pc98/wdc, and coda. Bump configvers.h from 500013 to 600000. Remove heuristics that tried to parse "device ed5" as 5 units of the ed device. This broke things like the snd_emu10k1 device, which required quotes to make it parse right. The no-longer-needed quotes have been removed from NOTES, GENERIC etc. eg, I've removed the quotes from: device snd_maestro device "snd_maestro3" device snd_mss I believe everything will still compile and work after this.
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-13/+14
| | | | | | | | | | | | | | | | | | 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.
* Remove 'td = curthread' that shadows the arguments to coda_root().rwatson2004-07-121-1/+0
| | | | Missed by: alfred
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-2/+3
| | | | | | 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.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-3/+3
| | | | Bump __FreeBSD_version accordingly.
* Move an overly verbose message under #ifdef CODA_VERBOSE.tjr2003-09-131-0/+2
|
* Add support for the Coda 6.x venus<->kernel interface. This extendstjr2003-09-071-19/+10
| | | | | | | | | | | | | | FIDs to be 128-bits wide and adds support for realms. Add a new CODA_COMPAT_5 option, which requests support for the old Coda 5.x interface instead of the new one. Create a new coda5.ko module that supports the 5.x interface, and make the existing coda.ko module use the new 6.x interface. These modules cannot both be loaded at the same time. Obtained from: Jan Harkes & the coda-6.0.2 distribution, NetBSD (drochner) (CODA_COMPAT_5 option).
* Initialize struct vfsops C99-sparsely.phk2003-06-121-14/+6
| | | | | Submitted by: hmp Reviewed by: phk
* Use __FBSDID().obrien2003-06-101-4/+3
|
* Set f_fstypename in coda_nb_statfs().tjr2003-03-071-0/+1
|
* Add a temporary workaround for a deadlock in Coda venus 5.3.19 thattjr2003-03-061-2/+27
| | | | | | occurs when mounting the filesystem. The problem is that venus issues the mount() syscall, which calls vfs_mount(), which calls coda_root() which attempts to communicate with venus.
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-2/+3
| | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
* More s/file system/filesystem/gtrhodes2002-05-161-2/+2
|
* Remove __P.alfred2002-03-201-1/+1
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-2/+2
| | | | reference.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+1
| | | | also don't use ANSI string concatenation.
* Fixed bitrot in a banal comment by removing the comment.bde2001-10-131-1/+1
|
* Backed out vestiges of the quick fixes for the transient breakage ofbde2001-10-131-1/+0
| | | | | <sys/mount.h> in rev.1.106 of the latter (don't include <sys/socket.h> just to work around bugs in <sys/mount.h>).
* fix typojulian2001-09-131-3/+0
| | | | pointed out by: jhb
* KSE Milestone 2julian2001-09-121-18/+23
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
OpenPOWER on IntegriCloud