summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/xfs
Commit message (Collapse)AuthorAgeFilesLines
* - Introduce the function lockmgr_recursed() which returns true if theattilio2008-01-192-5/+4
| | | | | | | | | | | | | | | | | | | lockmgr lkp, when held in exclusive mode, is recursed - Introduce the function BUF_RECURSED() which does the same for bufobj locks based on the top of lockmgr_recursed() - Introduce the function BUF_ISLOCKED() which works like the counterpart VOP_ISLOCKED(9), showing the state of lockmgr linked with the bufobj BUF_RECURSED() and BUF_ISLOCKED() entirely replace the usage of bogus BUF_REFCNT() in a more explicative and SMP-compliant way. This allows us to axe out BUF_REFCNT() and leaving the function lockcount() totally unused in our stock kernel. Further commits will axe lockcount() as well as part of lockmgr() cleanup. KPI results, obviously, broken so further commits will update manpages and freebsd version. Tested by: kris (on UFS and NFS)
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-134-9/+9
| | | | | | | | | | | 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-104-8/+8
| | | | | | | | | | | | | | | | 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
* Some times ago, vfs_getopts() was changed, so that it would set error tocognet2007-08-201-5/+5
| | | | | | | | | | | | ENOENT if the option wasn't provided, instead of setting it to 0. xfs however didn't catch up on this, so it assumed something went bad if vfs_getopts() sets the error to non-zero, and just returns the error. Unbreak xfs mount by just ignoring the error if vfs_getopts() sets the error to ENOENT, as we should have sane defaults. Reviewed by: kan Approved by: re (rwatson) Tested by: rpaulo
* Bow to incomplete GCC 4. constant propagation optimizations andkan2007-05-3013-13/+17
| | | | | initialize some of the local variables GCC claims are being used uninitialized.
* Change #include <machine/pcpu.h> to #include <sys/pcpu.h>rodrigc2007-04-011-1/+1
| | | | to get definition of curthread, required by <sys/sx.h>.
* Optimize sx locks to use simple atomic operations for the common cases ofjhb2007-03-312-79/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | obtaining and releasing shared and exclusive locks. The algorithms for manipulating the lock cookie are very similar to that rwlocks. This patch also adds support for exclusive locks using the same algorithm as mutexes. A new sx_init_flags() function has been added so that optional flags can be specified to alter a given locks behavior. The flags include SX_DUPOK, SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature to the similar flags for mutexes. Adaptive spinning on select locks may be enabled by enabling the ADAPTIVE_SX kernel option. Only locks initialized with the SX_ADAPTIVESPIN flag via sx_init_flags() will adaptively spin. The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock() are now performed inline in non-debug kernels. As a result, <sys/sx.h> now requires <sys/lock.h> to be included prior to <sys/sx.h>. The new kernel option SX_NOINLINE can be used to disable the aforementioned inlining in non-debug kernels. The size of struct sx has changed, so the kernel ABI is probably greatly disturbed. MFC after: 1 month Submitted by: attilio Tested by: kris, pjd
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-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
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-152-11/+16
| | | | | | | | | | | | | | | | 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
* Cylinder group bitmaps and blocks containing inode for a snapshotkib2007-01-231-0/+7
| | | | | | | | | | | | | | | | | | | | | file are after snaplock, while other ffs device buffers are before snaplock in global lock order. By itself, this could cause deadlock when bdwrite() tries to flush dirty buffers on snapshotted ffs. If, during the flush, COW activity for snapshot needs to allocate block and ffs_alloccg() selects the cylinder group that is being written by bdwrite(), then kernel would panic due to recursive buffer lock acquision. Avoid dealing with buffers in bdwrite() that are from other side of snaplock divisor in the lock order then the buffer being written. Add new BOP, bop_bdwrite(), to do dirty buffer flushing for same vnode in the bdwrite(). Default implementation, bufbdflush(), refactors the code from bdwrite(). For ffs device buffers, specialized implementation is used. Reviewed by: tegge, jeff, Russell Cattelan (cattelan xfs org, xfs changes) Tested by: Peter Holm X-MFC after: 3 weeks (if ever: it changes ABI)
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-8/+11
| | | | | | | | | | | | | 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>
* Implement vnode operations for setting and removing extended attributes.rodrigc2006-06-111-1/+95
|
* Restore routines for getting and listing extended attributes whichrodrigc2006-06-111-0/+124
| | | | were lost in the last merge.
* Restore changes to spinlock macros before merge.rodrigc2006-06-111-10/+8
|
* Remove debugging printfrodrigc2006-06-111-1/+0
|
* Temporarily disable log recovery until we fix panics.rodrigc2006-06-101-0/+5
|
* Logical OR the following flags into the va_mode field:rodrigc2006-06-101-9/+3
| | | | | | | | | S_IFDIR when making a directory S_IFLNK when making a symbolic link S_IFIFO when making a pipe xfs_ialloc() checks this field for these flags when figuring out whether to make a directory, make a symbolic link or make a pipe.
* Call g_vfs_close() if:rodrigc2006-06-101-2/+35
| | | | | (1) _xfs_mount() fails (2) at the end of _xfs_unmount()
* Do not call vput() after we call VOP_UNLOCK().rodrigc2006-06-101-1/+1
|
* Change %llx to %jx in printf() to eliminate warnings on 64-bit platforms.rodrigc2006-06-091-1/+1
|
* Bring back changes in version 1.3 lost in previous commit.rodrigc2006-06-091-13/+1
|
* More changes due to latest XFS import.rodrigc2006-06-091-188/+267
| | | | Work done by: Russell Cattelan <cattelan at xfs dot org>
* Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree.rodrigc2006-06-09138-17918/+14817
| | | | | | Improve support for writing to XFS partitions. Work done by: Russell Cattelan <cattelan at xfs dot org>
* Include "xfs_macros.h" to fix tinderbox build breakage.rodrigc2006-06-011-0/+1
|
* Cope with -Wundef. This means including xfs_macros.h early in a few moreimp2006-06-0113-19/+24
| | | | | | files and changing #if XXXKAN -> #ifdef XXXKAN. # this is just compile tested, since I don't have xfs partitions.
* Add support for "export" option, to allow NFS exportingrodrigc2006-05-261-5/+11
| | | | of XFS filesystems.
* Check for VFS_STATFS() failure in _xfs_mount() and abort the mountkeramida2006-05-051-2/+1
| | | | | | | | on errors. Found by: Coverity Prevent Approved by: rodrigc, Russell Cattelan MFC after: 4 weeks
* Update a DB_SET to DB_FUNC I missed yesterday.jhb2006-03-081-1/+1
|
* Eradicate caddr_t from the VFS API.des2005-12-141-1/+1
|
* Hide DDB-specific functions inside check for #ifdef DDB.rodrigc2005-12-131-3/+2
| | | | Noticed by: des
* Inherit system-wide BLKDEV_IOSIZE definition.rodrigc2005-12-131-13/+1
| | | | Submitted by: kan
* #define __user to nothingrodrigc2005-12-121-0/+4
|
* Initial import of read-only support for SGI's XFS filesystem.rodrigc2005-12-12168-0/+110918
Contributed by: XFS for FreeBSD project
OpenPOWER on IntegriCloud