aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r202903Marius Strobl2010-01-312-10/+17
| | | | | | | | | | | | On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 Approved by: re (kib) Notes: svn path=/stable/7/; revision=203326
* MFC r196921:Konstantin Belousov2010-01-271-3/+5
| | | | | | | | | | | Do not decrement pfs_vncache_entries for the vnode that was not in the list. Reminded by: des Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=203089
* MFC 189696,189697:John Baldwin2010-01-212-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/stable/7/; revision=202750
* MFC r199007:Attilio Rao2009-11-221-8/+9
| | | | | | | Fix a memory leak. Notes: svn path=/stable/7/; revision=199682
* MFC 195840, 195844, and 196637:John Baldwin2009-09-141-0/+1
| | | | | | | | | | | Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to a device pager (OBJT_DEVICE) object in that it uses fictitious pages to provide aliases to other memory addresses. The primary difference is that it uses an sglist(9) to determine the physical addresses for a given offset into the object instead of invoking the d_mmap() method in a device driver. Notes: svn path=/stable/7/; revision=197197
* MFC r196920:Konstantin Belousov2009-09-101-0/+1
| | | | | | | | | insmntque_stddtr() clears vp->v_data and resets vp->v_op to dead_vnodeops before calling vgone(). Revert r189706 and corresponding part of the r186560. Notes: svn path=/stable/7/; revision=197063
* MFC r196689:Konstantin Belousov2009-09-051-1/+0
| | | | | | | | | Remove spurious pfs_unlock(). Approved by: re (rwatson) Notes: svn path=/stable/7/; revision=196860
* MFC: Fix some LORs between vnode locks and filedescriptor table locks.John Baldwin2009-08-131-2/+0
| | | | | | | | | - Don't grab the filedesc lock just to read fd_cmask. - Drop vnode locks earlier when mounting the root filesystem and before sanitizing stdin/out/err file descriptors during execve(). Notes: svn path=/stable/7/; revision=196197
* MFC r193923:Konstantin Belousov2009-06-243-3/+3
| | | | | | | | | | | s/a_fdidx/a_fp/ for VOP_OPEN comments that inline struct vop_open_args definition. MFC r193924: Fix r193923 by noting that type of a_fp is struct file *, not int. Notes: svn path=/stable/7/; revision=194817
* MFC r193922:Konstantin Belousov2009-06-241-40/+2
| | | | | | | Remove unused VOP_IOCTL and VOP_KQFILTER implementations for fifofs. Notes: svn path=/stable/7/; revision=194816
* MFC r193919:Konstantin Belousov2009-06-243-14/+53
| | | | | | | | | | | Lock the vnode in cd9660, devfs and pseudofs implementation of VOP_IOCTL to prevent reclaim, since the vnode is passed unlocked to the VOP. MFC r193930: For cd9660_ioctl, check for recycled vnode after locking it. Notes: svn path=/stable/7/; revision=194815
* MFC: Update the inline version of vn_vget_ino() for ".." lookups to matchJohn Baldwin2009-06-191-6/+8
| | | | | | | the recentish changes to vn_vget_ino(). Notes: svn path=/stable/7/; revision=194502
* merge r193556: drop Giant from pseudofs.Dag-Erling Smørgrav2009-06-171-12/+14
| | | | Notes: svn path=/stable/7/; revision=194367
* MFC r193176:Konstantin Belousov2009-06-141-2/+8
| | | | | | | Unlock the pseudofs vnode before calling fill method for pfs_readlink(). Notes: svn path=/stable/7/; revision=194205
* MFC ZFS version 13. This includes the changes by pjd (see original messageKip Macy2009-05-204-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | below) as well as the following: - the recurring deadlock was fixed by deferring vinactive to a dedicated thread - zfs boot for all pool types now works Submitted by: dfr - kmem now goes up to 512GB so arc is now limited by physmem - the arc now experiences backpressure from the vm (which can be too much - but this allows ZFS to work without any tunables on amd64) - frequently recurring LOR in the ARC fixed - zfs send coredump fix - fixes for various PRs Supported by: Barrett Lyon, BitGravity Revision 185029 - (view) (annotate) - [select for diffs] Modified Mon Nov 17 20:49:29 2008 UTC (6 months ago) by pjd File length: 38244 byte(s) Diff to previous 177698 Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. This bring huge amount of changes, I'll enumerate only user-visible changes: - Delegated Administration Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc. - L2ARC Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content. - slog Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2). - vfs.zfs.super_owner Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one. - chflags(2) Not all the flags are supported. This still needs work. - ZFSBoot Support to boot off of ZFS pool. Not finished, AFAIK. Submitted by: dfr - Snapshot properties - New failure modes Before if write requested failed, system paniced. Now one can select from one of three failure modes: Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests - Refquota, refreservation properties Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots. - Sparse volumes ZVOLs that don't reserve space in the pool. - External attributes Compatible with extattr(2). - NFSv4-ACLs Not sure about the status, might not be complete yet. Submitted by: trasz - Creation-time properties - Regression tests for zpool(8) command. Obtained from: OpenSolaris Notes: svn path=/stable/7/; revision=192498
* MFC r192151:Konstantin Belousov2009-05-181-0/+1
| | | | | | | Initialize f_vnode before calling d_fdopen() cdevsw method. Notes: svn path=/stable/7/; revision=192301
* MFC r192012:Konstantin Belousov2009-05-151-2/+7
| | | | | | | | | Return controlled EINVAL when the fdescfs lookup routine is given string representing too large integer, instead of overflowing and possibly returning a random but valid vnode. Notes: svn path=/stable/7/; revision=192140
* MFC r188677: always call pfs_attr if definedDag-Erling Smørgrav2009-05-142-12/+31
| | | | | | | | MFC r190806: fix incorrect KASSERT, add more MFC r188677: remove incorrect locking Notes: svn path=/stable/7/; revision=192079
* MFC 179060: udf: fix and speedup timestamp calculationsAndriy Gapon2009-03-191-22/+34
| | | | | | | | | markus and emax are notified Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190074
* MFC 189364: udf: use truly unique directory cookieAndriy Gapon2009-03-191-1/+1
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190060
* MFC 189302: udf_readdir: do not advance offset if entry can not be uio-edAndriy Gapon2009-03-191-1/+1
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190059
* MFC 189111: udf_readatoffset: correctly hanlde data in fentryAndriy Gapon2009-03-191-0/+6
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190057
* MFC 189082: udf_readatoffset: read through directory vnode, do not read > ↵Andriy Gapon2009-03-193-25/+23
| | | | | | | | | MAXBSIZE Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190052
* MFC 189070: udf: add read-ahead support modeled after cd9660Andriy Gapon2009-03-192-3/+23
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190050
* MFC 189069: udf_map: return proper error code instead of leaking an internal oneAndriy Gapon2009-03-191-2/+13
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190049
* MFC 189068: udf_read: correctly read data from files with data embedded into ↵Andriy Gapon2009-03-191-0/+26
| | | | | | | | | fentry Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190048
* MFC 189067,189363: udf_strategy: tiny optimization of logic, calculations; ↵Andriy Gapon2009-03-191-18/+11
| | | | | | | | | extra diagnostics Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190047
* MFC 188815, 188815: fix incorrect error return when reading a large dirAndriy Gapon2009-03-191-4/+3
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/stable/7/; revision=190045
* MFC: Use shared vnode locks when invoking VOP_READDIR().John Baldwin2009-03-181-1/+1
| | | | Notes: svn path=/stable/7/; revision=189991
* MFC: Consolidate error handling in mount routines and make the mountpointJohn Baldwin2009-03-182-24/+26
| | | | | | | hold a reference on the cdev the fs is mounted on. Notes: svn path=/stable/7/; revision=189976
* MFC: Keep the vnode for the mountpoint locked on return from namei()John Baldwin2009-03-181-12/+8
| | | | | | | until after g_vfs_open() to match other filesystems. Notes: svn path=/stable/7/; revision=189975
* MFC: Mark udf(4) MPSAFE and add support for using shared vnode locks forJohn Baldwin2009-03-182-24/+56
| | | | | | | pathname lookups. Notes: svn path=/stable/7/; revision=189973
* MFC: Add rudimentary support for symbolic links on UDF.John Baldwin2009-03-182-3/+124
| | | | Notes: svn path=/stable/7/; revision=189972
* MFC: Add support for fifos to UDF.John Baldwin2009-03-183-0/+64
| | | | Notes: svn path=/stable/7/; revision=189971
* MFC r189693:Konstantin Belousov2009-03-181-9/+0
| | | | | | | Enable advisory file locking for devfs vnodes. Notes: svn path=/stable/7/; revision=189958
* MFC r189450:Konstantin Belousov2009-03-131-1/+1
| | | | | | | | | | Extract the no_poll() and vop_nopoll() code into the common routine poll_no_poll(). Return a poll_no_poll() result from devfs_poll_f() when filedescriptor does not reference the live cdev, instead of ENXIO. Notes: svn path=/stable/7/; revision=189766
* MFC: Make cd9660 MPSAFE and able to use shared vnode locks for pathnameJohn Baldwin2009-03-115-53/+121
| | | | | | | lookups. Also, disable operations on character device nodes. Notes: svn path=/stable/7/; revision=189709
* MFC: Add a flag to tag individual sysctl leaf nodes as MPSAFE. Tag theJohn Baldwin2009-03-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | following nodes as MPSAFE: - All standalone INT/LONG sysctls. - kern.proc.* - All name-cache related sysctls. - vm.loadavg - vm.vmtotal - vm.stats.(sys|vm).* - sysctl.name2oid - kern.ident, kern.osrelease, kern.version, etc. - kern.arandom - security.jail.jailed - kern.devname Other changes: - Remove GIANT_REQUIRED from vmtotal(). - Add conditional Giant locking around the vrele() in sysctl_kern_proc_pathname(). Notes: svn path=/stable/7/; revision=189644
* MFC r187199:Edward Tomasz Napierala2009-03-011-2/+5
| | | | | | | | | | | | | Turn a "panic: non-decreasing id" into an error printf. This seems to be caused by a metadata corruption that occurs quite often after unplugging a pendrive during write activity. Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Notes: svn path=/stable/7/; revision=189228
* MFC r186911:Edward Tomasz Napierala2009-03-011-2/+18
| | | | | | | | | | | | Don't panic with "vinvalbuf: dirty bufs" when the mounted device that was being written to goes away. Reviewed by: kib, scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Notes: svn path=/stable/7/; revision=189227
* MFC r186194:Edward Tomasz Napierala2009-03-015-5/+5
| | | | | | | | | | | | | | | | | According to phk@, VOP_STRATEGY should never, _ever_, return anything other than 0. Make it so. This fixes "panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648", encountered when writing to an orphaned filesystem. Reason for the panic was the following assert: KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp)); at vfs_bio:bufstrategy(). Reviewed by: scottl, phk Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Notes: svn path=/stable/7/; revision=189226
* MFC r188318:Konstantin Belousov2009-02-223-22/+10
| | | | | | | | | | | Lookup up the directory entry for the tmpfs node that are deleted by both node pointer and name component. This does the right thing for hardlinks to the same node in the same directory. PR: kern/131356 Notes: svn path=/stable/7/; revision=188911
* MFC: Remove unnecessary locking around vn_fullpath(). This also includesJohn Baldwin2009-02-172-11/+6
| | | | | | | | | closing some races between procfs' <pid>/file and execve(2) and using a shared vnode lock for the VOP_GETATTR() in the kern.proc.vmmap sysctl handler. Notes: svn path=/stable/7/; revision=188738
* MFC r187715:Konstantin Belousov2009-02-091-1/+4
| | | | | | | | | | | | | The kernel may do unbalanced calls to fifo_close() for fifo vnode, without corresponding number of fifo_open(). This causes assertion failure in fifo_close() due to vp->v_fifoinfo being NULL for kernel with INVARIANTS, or NULL pointer dereference otherwise. In fact, we may ignore excess calls to fifo_close() without bad consequences. Turn KASSERT() into the return, and print warning for now. Notes: svn path=/stable/7/; revision=188389
* MFC r186565:Konstantin Belousov2009-01-291-1/+2
| | | | | | | | | | | | | When the insmntque() in the pfs_vncache_alloc() fails, vop_reclaim calls pfs_vncache_free() that removes pvd from the list, while it is not yet put on the list. Prevent the invalid removal from the list by clearing pvd_next and pvd_prev for the newly allocated pvd, and only move pfs_vncache list head when the pvd was at the head. Notes: svn path=/stable/7/; revision=187890
* MFC r186563:Konstantin Belousov2009-01-291-1/+1
| | | | | | | | | | vm_map_lock_read() does not increment map->timestamp, so we should compare map->timestamp with saved timestamp after map read lock is reacquired, not with saved timestamp + 1. The only consequence of the +1 was unconditional lookup of the next map entry, though. Notes: svn path=/stable/7/; revision=187889
* MFC r186561:Konstantin Belousov2009-01-291-15/+18
| | | | | | | Drop the pseudofs vnode lock around call to pfs_read handler. Notes: svn path=/stable/7/; revision=187888
* MFC r186560:Konstantin Belousov2009-01-291-13/+27
| | | | | | | | | | | | | | | | | After the pfs_vncache_mutex is dropped, another thread may attempt to do pfs_vncache_alloc() for the same pfs_node and pid. In this case, we could end up with two vnodes for the pair. Recheck the cache under the locked pfs_vncache_mutex after all sleeping operations are done. Do not call free() on the struct pfs_vdata after insmntque() failure, because vp->v_data points to the structure, and pseudofs_reclaim() frees it by the call to pfs_vncache_free(). MFC r186981 (by marcus): vput the vnode. Notes: svn path=/stable/7/; revision=187887
* MFC r183211:Konstantin Belousov2009-01-2110-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize birthtime fields in vn_stat() to prevent stat(2) from returning uninitialized birthtime. Most file systems don't initialize birthtime properly in their VOP_GETTATTR(). MFC r183212: Initialize va_flags and va_filerev properly in VOP_GETATTR(). Don't initialize va_vaflags and va_spare because they are not part of the VOP_GETATTR() API. Also don't initialize birthtime to ctime or zero. MFC rr183213: Initialize va_rdev to NODEV and va_fsid to VNOVAL before the VOP_GETATTR() call in vn_stat(). Thus if a file system doesn't initialize those fields in VOP_GETATTR() they will have a sane default value. MFC r183214: Initialize va_rdev to NODEV instead of 0 or VNOVAL in VOP_GETATTR(). NODEV is more appropriate when va_rdev doesn't have a meaningful value. MFC r183215: fdescfs, devfs, mqueuefs, nfs, portalfs, pseudofs, tmpfs and xfs initialize the vattr structure in VOP_GETATTR() with VATTR_NULL(), vattr_null() or by zeroing it. Remove these to allow preinitialization of fields work in vn_stat(). This is needed to get birthtime initialized correctly. Notes: svn path=/stable/7/; revision=187534
* MFC r185984:Konstantin Belousov2008-12-191-1/+8
| | | | | | | | | | Reference the vmspace of the process being inspected by procfs, linprocfs and sysctl kern_proc_vmmap handlers. Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=186325