aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Use mount interlock to protect all changes to mnt_flag andTor Egge2006-10-092-0/+10
| | | | | | | | | | mnt_kern_flag. This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl(). Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=163172
* MFC: msdosfs_vfsops.c:1.150, ntfs_vfsops.c:1.83, udf_vfsops.c:1.41Craig Rodrigues2006-06-172-12/+5
| | | | | | | | | | | | ext2_vfsops.c:1.157, cd9660_vfsops.c:1.145, ffs_vfsops.c:1.314, reiserfs_vfsops.c:1.5 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. Notes: svn path=/stable/6/; revision=159704
* MFC rev. 1.3: repair ext2fs writes.Maxim Konovalov2006-05-031-1/+1
| | | | | | | Approved by: re (scottl) Notes: svn path=/stable/6/; revision=158275
* Work around the shortness of the size argument toYaroslav Tykhiy2006-02-203-3/+3
| | | | | | | | | | | | | | | | | | | vnode_create_vobject() while preserving the binary ABI to filesystem modules in RELENG_6: introduce a new function vnode_create_vobject_off() that takes the size argument as off_t; move all stock file systems to it; re-implement the old vnode_create_vobject() using vnode_create_vobject_off() so that old or binary-only FS modules can work w/o hitting the bug. The trick is to pass a size of 0 to vnode_create_vobject_off() so that it will call VOP_GETATTR() and thus get the actual, untruncated file size even if the calling module still uses the old vnode_create_vobject(). PR: kern/92243 Approved by: re (scottl) Notes: svn path=/stable/6/; revision=155853
* MFC: Add marker vnodes to ensure that all vnodes associated with the mountTor Egge2006-01-141-5/+9
| | | | | | | point are iterated over when using MNT_VNODE_FOREACH. Notes: svn path=/stable/6/; revision=154332
* MFC:Jean-Sébastien Pédron2006-01-051-9/+0
| | | | | | | | | | revision 1.2 Don't hold a reference to the disk vnode for each inode. Reviewed by: mux (mentor) Notes: svn path=/stable/6/; revision=154061
* MFC ext2_lookup.c 1.51Don Lewis2006-01-041-1/+3
| | | | | | | | | | | | | | | Original commit message: Log: Apply the same fix to a potential race in the ISDOTDOT code in ext2_lookup() that was used to fix an actual race in ufs_lookup.c:1.78. This is not currently a hazard, but the bug would be activated by marking ext2fs as MPSAFE. Requested by: bde MFC after: 2 weeks Notes: svn path=/stable/6/; revision=154037
* I didn't remember to commit the style-fixes for my previousMartin Cracauer2005-12-291-7/+1
| | | | | | | commit. Notes: svn path=/stable/6/; revision=153857
* MFC:Jean-Sébastien Pédron2005-12-091-1/+3
| | | | | | | | | | | | | | revision 1.2 date: 2005/10/21 09:15:26; author: dumbbell; state: Exp; lines: +3 -1 Apply the same fix to a potential race in the ISDOTDOT code in reiserfs_lookup() that was used to fix an actual race in ufs_lookup.c:1.78. This is not currently a hazard, but the bug would be activated by marking reiserfs as MPSAFE. Reviewed by: mux (mentor) Notes: svn path=/stable/6/; revision=153271
* Fix this:Martin Cracauer2005-10-281-2/+6
| | | | | | | | | | | | | | | | kern/87959 cracauer ext2fs: no cp(1) possible, mmap returns EINVAL ext2fs was missing vnode_create_vobject. (Reisefs probably has the same problem but I want to get this in quick for 6-release) releng-6 branches commits approved by Scott Long. Approved by: re Notes: svn path=/stable/6/; revision=151812
* MFC 1.154 (by rodrigc)Xin LI2005-10-061-0/+12
| | | | | | | | | | | | | | | | | | | In ext2_mountfs(), check that the superblock size, SBSIZE, | is aligned with the sectorsize value returned by GEOM, before | doing a bread() of the superblock. | This eliminates a panic when trying the following on an empty CD-ROM drive: | mount_ext2fs /dev/acd0 /mnt | | Reviewed by: phk | | Revision Changes Path | 1.154 +12 -0 src/sys/gnu/fs/ext2fs/ext2_vfsops.c Approved by: re (scottl) Notes: svn path=/stable/6/; revision=151013
* MFC sys/fs/hpfs/hpfs_vfsops.c:1.54-1.56,Xin LI2005-09-302-14/+11
| | | | | | | | | | | | | | | | sys/fs/msdosfs/msdosfs_vfsops.c:1.145, sys/fs/ntfs/ntfs_vfsops.c:1.79-1.80, sys/fs/udf/udf_vfsops.c:1.34-1.35, sys/gnu/fs/ext2fs/ext2_vfsops.c:1.152-1.153, sys/gnu/fs/reiserfs/reiserfs_vfsops.c:1.2-1.3 (by ssouhlal): *_mountfs() (if the filesystem mounts from a device) needs devvp to be locked, so lock it. Approved by: re (scottl) Notes: svn path=/stable/6/; revision=150746
* MFC src/sys/gnu/fs/ext2fs/fs.h 1.18Don Lewis2005-09-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/sys/kern/kern_shutdown.c 1.175 src/sys/sys/buf.h 1.189 Modified files: sys/gnu/fs/ext2fs fs.h sys/kern kern_shutdown.c sys/sys buf.h Log: Add a new struct buf flag bit, B_PERSISTENT, and use it to tag struct bufs that are persistently held by ext2fs. Ignore any buffers with this flag in the code in boot() that counts "busy" and dirty buffers and attempts to sync the dirty buffers, which is done before attempting to unmount all the file systems during shutdown. This fixes the problem caused by any ext2fs file systems that are mounted at system shutdown time, which caused boot() to give up on a non-zero number of buffers and skip the call to vfs_unmountall(). This left all the mounted file systems in a dirty state and caused them to all require cleanup by fsck on reboot. Move the two separate copies of the "busy" buffer test in boot() to a separate function. Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro. Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with this and previous flag changes. PR: kern/56675, kern/85163 Tested by: "Matthias Andree" matthias.andree at gmx.de Reviewed by: bde MFC after: 3 days PR: kern/56675, kern/85163 Tested by: "Hanspeter Roth" hampi at rootshell.be Tested by: "Matthias Andree" matthias.andree at gmx.de Reviewed by: bde Approved by: re (scottl) Notes: svn path=/stable/6/; revision=150005
* Repair this:Martin Cracauer2005-07-091-0/+1
| | | | | | | | | | | | ext2fs fails to set the device in the stat(2) system call. Subsequently, that makes fts(3) fail, which goes as far as make ls(1) fail (which uses fts) on ext2fs. Approved by: re (Robert Watson <rwatson@FreeBSD.org>) Notes: svn path=/head/; revision=147868
* Replace the use if ext2fs' bitops by bitstring.h macros. This fixesJean-Sébastien Pédron2005-06-212-29/+16
| | | | | | | | | | | portability issues. Also note that for amd64, a hack is used to work around gcc optimization (thanks to cognet@). Reviewed by: mux (mentor) Approved by: re (dougb) Notes: svn path=/head/; revision=147512
* Moving reiserfs from sys/gnu to sys/gnu/fs. This was discussed on arch@.Jean-Sébastien Pédron2005-06-1813-6347/+0
| | | | | | | | Reviewed by: mux (mentor) Approved by: re (scottl) Notes: svn path=/head/; revision=147477
* Moving reiserfs from sys/gnu to sys/gnu/fs. This was discussed on arch@.Jean-Sébastien Pédron2005-06-1813-0/+6347
| | | | | | | | Reviewed by: mux (mentor) Approved by: re (scottl) Notes: svn path=/head/; revision=147476
* Add standard GPL boilerplate to these files. They are the only onesWarner Losh2005-06-167-3/+104
| | | | | | | | | | | contaminated with the GPL code. While this information was present in the COPYRIGHT.INFO file, it is FreeBSD's standard practice to, where possible, include explicit license information in files. Approved by: release engineer (scottl) Notes: svn path=/head/; revision=147408
* Move ext2fs from src/gnu to src/gnu/fs.Craig Rodrigues2005-06-1522-9058/+0
| | | | | | | | | | | Discussed on arch@. Reviewed by: kan Approved by: re (blanket), kan Discussed with: dumbbell Notes: svn path=/head/; revision=147401
* Move ext2fs from src/gnu to src/gnu/fs.Craig Rodrigues2005-06-1512-66/+66
| | | | | | | | | | Discussed on arch@. Reviewed by: kan Approved by: re (blanket), kan Notes: svn path=/head/; revision=147393
* Allow EVFILT_VNODE events to work on every filesystem type, not justSuleiman Souhlal2005-06-092-2/+0
| | | | | | | | | | | | | | | | | | UFS by: - Making the pre and post hooks for the VOP functions work even when DEBUG_VFS_LOCKS is not defined. - Moving the KNOTE activations into the corresponding VOP hooks. - Creating a MNTK_NOKNOTE flag for the mnt_kern_flag field of struct mount that permits filesystems to disable the new behavior. - Creating a default VOP_KQFILTER function: vfs_kqfilter() My benchmarks have not revealed any performance degradation. Reviewed by: jeff, bde Approved by: rwatson, jmg (kqueue changes), grehan (mentor) Notes: svn path=/head/; revision=147198
* Import of ReiserFS filesystem support (currently limited to read-only onJean-Sébastien Pédron2005-05-2413-0/+6347
| | | | | | | | | i386). Source code is under the GNU GPL license. Approved by: mux (mentor) Notes: svn path=/head/; revision=146564
* - Change all filesystems and vfs_cache to relock the dvp once the child isJeff Roberson2005-04-132-8/+6
| | | | | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=145006
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cJeff Roberson2005-03-292-16/+2
| | | | | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT. Notes: svn path=/head/; revision=144299
* - ext2fs_lookup() is no longer responsible for unlocking the dvp, this isJeff Roberson2005-03-282-32/+2
| | | | | | | | | | handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=144211
* - Update vfs_root implementations to match the new prototype. None ofJeff Roberson2005-03-242-2/+4
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=144059
* Add two arguments to the vfs_hash() KPI so that filesystems which doPoul-Henning Kamp2005-03-162-4/+4
| | | | | | | not have unique hashes (NFS) can also use it. Notes: svn path=/head/; revision=143692
* Remove inode fields previously used for private inode hash tables.Poul-Henning Kamp2005-03-162-2/+0
| | | | Notes: svn path=/head/; revision=143686
* Don't hold a reference to the disk vnode for each inode.Poul-Henning Kamp2005-03-1610-38/+14
| | | | | | | | Don't store the disk cdev in all inodes, it's only used for debugging printfs. Notes: svn path=/head/; revision=143677
* Improve the vfs_hash() API: vput() the unneeded vnode centrally toPoul-Henning Kamp2005-03-152-6/+2
| | | | | | | avoid replicating the vput in all the filesystems. Notes: svn path=/head/; revision=143663
* Simplify the vfs_hash calling convention.Poul-Henning Kamp2005-03-152-46/+6
| | | | Notes: svn path=/head/; revision=143619
* Forgot cvs rm in last file.Poul-Henning Kamp2005-03-141-169/+0
| | | | Notes: svn path=/head/; revision=143579
* Use vfs_hash() instead of home-rolledPoul-Henning Kamp2005-03-147-132/+60
| | | | Notes: svn path=/head/; revision=143578
* - Catch up with ufs_inode 1.59, ffs_vfsops.c 1.280, and ufs_vnops.c 1.267.Jeff Roberson2005-03-136-72/+16
| | | | | | | | | Various changes to support new vgone() locking protocol. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=143509
* Remove debug printout of major/minor numbers, print name instead.Poul-Henning Kamp2005-02-274-8/+8
| | | | Notes: svn path=/head/; revision=142692
* move ptr deref's to after null ptr checksSam Leffler2005-02-242-4/+8
| | | | | | | Noticed by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=142353
* Make a SYSCTL_NODE staticPoul-Henning Kamp2005-02-102-2/+2
| | | | Notes: svn path=/head/; revision=141633
* Make filesystems get rid of their own vnodes vnode_pager object inPoul-Henning Kamp2005-01-282-0/+2
| | | | | | | VOP_RECLAIM(). Notes: svn path=/head/; revision=140939
* Remove unused argument to vrecycle()Poul-Henning Kamp2005-01-282-2/+2
| | | | Notes: svn path=/head/; revision=140936
* Introduce and use g_vfs_close().Poul-Henning Kamp2005-01-252-4/+4
| | | | Notes: svn path=/head/; revision=140822
* Create a vp->v_object in VFS_FHTOVP() if we want to be exportablePoul-Henning Kamp2005-01-242-0/+2
| | | | | | | | | | | | | | | | with NFS. We are moving responsibility for creating the vnode_pager object into the filesystems which own the vnode, and this is one of the places we have to cover. We call vnode_create_vobject() directly because we own the vnode. If we can get the size easily, pass it as an argument to save the call to VOP_GETATTR() in vnode_create_vobject() Notes: svn path=/head/; revision=140768
* Remove unused cred argument to ext2_reload()Poul-Henning Kamp2005-01-242-12/+6
| | | | Notes: svn path=/head/; revision=140736
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()Poul-Henning Kamp2005-01-142-4/+4
| | | | Notes: svn path=/head/; revision=140220
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()Poul-Henning Kamp2005-01-112-2/+2
| | | | Notes: svn path=/head/; revision=140051
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().Poul-Henning Kamp2005-01-112-10/+8
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=140048
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-0645-71/+72
| | | | Notes: svn path=/head/; revision=139778
* Add dol FreeBSD dol and /*+ize licenseWarner Losh2005-01-063-3/+9
| | | | Notes: svn path=/head/; revision=139777
* Implement simpler panics for VOP_{read,write} on fifos.Poul-Henning Kamp2004-12-142-110/+4
| | | | Notes: svn path=/head/; revision=138868
* Revert previous commit. The null-pointer function call (a dereferenceMarcel Moolenaar2004-12-112-8/+8
| | | | | | | | | | | | on ia64) was not the result of a change in the vector operations. It was caused by the NFS locking code using a FIFO and those bypassing the vnode. This indirectly caused the panic. The NFS locking code has been changed. Requested by: phk Notes: svn path=/head/; revision=138693
* Convert to nmount. Add omount compat code.Poul-Henning Kamp2004-12-062-20/+26
| | | | Notes: svn path=/head/; revision=138493