#
dfd233ed |
| 11-May-2009 |
Attilio Rao <attilio@FreeBSD.org> |
Remove the thread argument from the FSD (File-System Dependent) parts of the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread.
In
Remove the thread argument from the FSD (File-System Dependent) parts of 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.
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
1829d5da |
| 12-Mar-2009 |
Warner Losh <imp@FreeBSD.org> |
Update the projects tree to a newer FreeBSD current.
|
#
33fc3625 |
| 11-Mar-2009 |
John Baldwin <jhb@FreeBSD.org> |
Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() an
Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF.
Submitted by: ups Reviewed by: pjd (ZFS bits) MFC after: 1 month
show more ...
|
#
0b2ab5ec |
| 11-Feb-2009 |
John Baldwin <jhb@FreeBSD.org> |
- Consolidate error handling in the cd9660 and udf mount routines. - Always read the character device pointer while the associated devfs vnode is locked. Also, use dev_ref() to obtain a new refere
- Consolidate error handling in the cd9660 and udf mount routines. - Always read the character device pointer while the associated devfs vnode is locked. Also, use dev_ref() to obtain a new reference on the vnode for the mountpoint. This reference is released on unmount. This mirrors the earlier fix to FFS.
Reviewed by: kib
show more ...
|
#
bb5d3b71 |
| 28-Jan-2009 |
Warner Losh <imp@FreeBSD.org> |
Use the correct field name for the size of the sierra_id. While this is the same size as id, and is unlikely to change, it seems better to use the correct field here. There's no difference in the g
Use the correct field name for the size of the sierra_id. While this is the same size as id, and is unlikely to change, it seems better to use the correct field here. There's no difference in the generated code.
show more ...
|
#
c222ece0 |
| 28-Jan-2009 |
John Baldwin <jhb@FreeBSD.org> |
Mark cd9660 MPSAFE and add support for using shared vnode locks during pathname lookups. - Remove 'i_offset' and 'i_ino' from the ISO node structure and replace them with local variables in the loo
Mark cd9660 MPSAFE and add support for using shared vnode locks during pathname lookups. - Remove 'i_offset' and 'i_ino' from the ISO node structure and replace them with local variables in the lookup routine instead. - Cache a copy of 'i_diroff' for use during a lookup in a local variable. - Save a copy of the found directory entry in a malloc'd buffer after a successfull lookup before getting the vnode. This allows us to release the buffer holding the directory block before calling vget() which otherwise resulted in a LOR between "bufwait" and the vnode lock. - Use an inlined version of vn_vget_ino() to handle races with .. lookups. I had to inline the code here since cd9660 uses an internal vget routine to save a disk I/O that would otherwise re-read the directory block. - Honor the requested locking flags during lookups to allow for shared locking. - Honor the requested locking flags passed to VFS_ROOT() and VFS_VGET() similar to UFS. - Don't make every ISO 9660 vnode hold a reference on the vnode of the underlying device vnode of the mountpoint. The mountpoint already holds a suitable reference.
show more ...
|
Revision tags: release/6.4.0_cvs, release/6.4.0 |
|
#
66a6ea1d |
| 19-Nov-2008 |
John Baldwin <jhb@FreeBSD.org> |
- Fix a typo in a comment. - Whitespace fix. - Remove #if 0'd BSD 4.x code for flushing busy buffers from a mountpoint during an unmount. FreeBSD uses vflush() for this.
|
#
77ddca67 |
| 19-Nov-2008 |
John Baldwin <jhb@FreeBSD.org> |
When looking up the vnode for the device to mount the filesystem on, ask NDINIT to return a locked vnode instead of letting it drop the lock and return a referenced vnode and then relock the vnode a
When looking up the vnode for the device to mount the filesystem on, ask NDINIT to return a locked vnode instead of letting it drop the lock and return a referenced vnode and then relock the vnode a few lines down. This matches the behavior of other filesystem mount routines.
show more ...
|
#
15bc6b2b |
| 28-Oct-2008 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
show more ...
|
#
1ede983c |
| 23-Oct-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
|
#
0d7935fd |
| 10-Oct-2008 |
Attilio Rao <attilio@FreeBSD.org> |
Remove the struct thread unuseful argument from bufobj interface. In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync()
and BO_SYNC() "virtual method" of the buffer
Remove the struct thread unuseful argument from bufobj interface. In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync()
and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close()
Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit.
As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP
Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
show more ...
|
Revision tags: release/7.0.0_cvs, release/7.0.0 |
|
#
0e9eb108 |
| 24-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
Cleanup lockmgr interface and exported KPI: - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR
Cleanup lockmgr interface and exported KPI: - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR_ASSERT() as it is bogus really and no currently used. Hopefully this will be soonly replaced by something suitable for it. - Remove the prototype for dumplockinfo() as the function is no longer present
Addictionally: - Introduce a KASSERT() in lockstatus() in order to let it accept only curthread or NULL as they should only be passed - Do a little bit of style(9) cleanup on lockmgr.h
KPI results heavilly broken by this change, so manpages and FreeBSD_version will be modified accordingly by further commits.
Tested by: matteo
show more ...
|
Revision tags: release/6.3.0_cvs, release/6.3.0 |
|
#
22db15c0 |
| 13-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 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>
show more ...
|
#
cb05b60a |
| 10-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and
vn_lock() is currently only used with the 'curthread' passed as argument. 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>
show more ...
|
#
77465d93 |
| 16-Oct-2007 |
Alfred Perlstein <alfred@FreeBSD.org> |
Get rid of qaddr_t.
Requested by: bde
|
#
61b9d89f |
| 13-Mar-2007 |
Tor Egge <tegge@FreeBSD.org> |
Make insmntque() externally visibile and allow it to fail (e.g. during late stages of unmount). On failure, the vnode is recycled.
Add insmntque1(), to allow for file system specific cleanup when r
Make insmntque() externally visibile and allow it to fail (e.g. during 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
show more ...
|
#
10bcafe9 |
| 15-Feb-2007 |
Pawel Jakub Dawidek <pjd@FreeBSD.org> |
Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method. This way we may support multiple structures in v_data vnode field within one file system without using black magic.
Vnode-
Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method. 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
show more ...
|
#
a8d36d0d |
| 11-Feb-2007 |
Craig Rodrigues <rodrigc@FreeBSD.org> |
Forced commit and #include changes for repo copy from sys/isofs/cd9660 to sys/fs/cd9660.
Discussed on freebsd-current.
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
acd3428b |
| 06-Nov-2006 |
Robert Watson <rwatson@FreeBSD.org> |
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
show more ...
|
#
5da56ddb |
| 26-Sep-2006 |
Tor Egge <tegge@FreeBSD.org> |
Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag. This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
|
#
5eb304a9 |
| 26-May-2006 |
Craig Rodrigues <rodrigc@FreeBSD.org> |
Remove calls to vfs_export() for exporting a filesystem for NFS mounting from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
5bb84bc8 |
| 31-Oct-2005 |
Robert Watson <rwatson@FreeBSD.org> |
Normalize a significant number of kernel malloc type names:
- Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat.
- Remove punctuation that i
Normalize a significant number of kernel malloc type names:
- 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.
show more ...
|
#
c583f369 |
| 17-Oct-2005 |
Craig Rodrigues <rodrigc@FreeBSD.org> |
Unconditionally mount a CD9660 filesystem as read-only, instead of returning EROFS if we forget to mount it as read-only.
|
#
b137e1c8 |
| 17-Oct-2005 |
Craig Rodrigues <rodrigc@FreeBSD.org> |
Use the actual sector size of the media instead of hard-coding it to 2048. This eliminates KASSERTs in GEOM if we accidentally mount an audio CD as a cd9660 filesystem.
|
#
14dcd40f |
| 14-Aug-2005 |
Peter Grehan <grehan@FreeBSD.org> |
- restore the ability to mount cd9660 filesystems as root by inverting some of the options test, specifically the joliet and rockridge tests. Since the root mount callchain doesn't go through cd9
- restore the ability to mount cd9660 filesystems as root by inverting some of the options test, specifically the joliet and rockridge tests. Since the root mount callchain doesn't go through cd9660_cmount, the default mount options aren't set. Rather than having the main codepath assume the options are there, test for the absence of the inverted optioin
e.g. instead of vfs_flagopt(.. "joliet" ..), test for !vfs_flagopt(.. "nojoliet" ..)
This works for root mount, non-root mount and future nmount cases.
- in cd9660_cmount, remove inadvertent setting of "gens" when "extatt" was set.
Reported by: grehan, Dario Freni <saturnero at freesbie org> Tested by: Dario Freni Not objected to by: phk
MFC after: 3 days
show more ...
|