summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs
Commit message (Collapse)AuthorAgeFilesLines
* Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE();tjr2004-02-194-16/+11
| | | | pointed out by bde.
* Add partial support for large (>4GB) files on ext2 filesystems. Thistjr2004-02-183-1/+16
| | | | | | | | support is partial in that it will refuse to create large files on filesystems that haven't been upgraded to EXT2_DYN_REV or that don't have the EXT2_FEATURE_RO_COMPAT_LARGE_FILE flag set in the superblock. MFC after: 2 weeks
* Fixed misspellings of "ext2_*" as "ufs_*" and " "ext2fs_*", and ofbde2004-02-151-7/+6
| | | | | "independent" as "dependent" Fixed some other relatively minor wording and formatting errors.
* Removed support for the unsupported option READONLY. It just forcedbde2004-02-151-4/+0
| | | | dishonoring of requests for read-write mounts.
* MFffs (ffs_vfsops.c 1.76 (part of the big soft updates commit): lockbde2004-02-131-4/+10
| | | | | | | | | | the vnode around calls to vinvalbuf()). Apparently no one has tested ext2fs with DEBUG_VOP_LOCKS. Vnode locking for vinvalbuf() might not be required in non-soft-updates cases, but it is now asserted. MFffs (uncommitted related and nearby cleanups: don't unlock the vnode after vinvalbuf() only to have to relock it almost immediately; don't refer to devices classified by vn_isdisk() as block devices).
* Fixed longstanding brokenness of inode updates. The waitfor flag wasbde2004-02-131-4/+0
| | | | | | | | | | | | dishonored in rev.1.1 by commenting out the code that honored it. This gave the worst disadvantages of async mounts in an uncontrollable way. Honoring the flag costs about 50% in real time in worst cases on a new but not very fast ATA drive with write caching (probably more on drives without write caching). The old misbehavior can be recovered using async mounts after implementing them in mount_ext2fs(8) (just put the MNT_ASYNC flag in mount_ext2fs's table of supported options like it is in mount's table).
* MFffs (ffs_vfsops.c 1.227: clean up open mode bandaid). This reducesbde2004-02-121-12/+13
| | | | gratuitous differences with ffs a little.
* Locking for the per-process resource limits structure.jhb2004-02-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Copy workaround from FFS: open device for write access even iftjr2004-01-241-0/+19
| | | | | | | | the user requests a read-only mount. This is necessary because we don't do the VOP_OPEN again if they upgrade a read-only mount to read-write. Noticed by: bde
* Spell magic '16' number as IO_SEQSHIFT.kan2004-01-191-3/+3
|
* Fixed a reference to a nonexistent variable in previous commit. Renamingbde2003-11-051-9/+8
| | | | | | | | of ffs_reload()'s mountp parameter to mp in rev.1.28 of ffs_vnops.c had not been merged here. ext2fs_reload() is still missing locking from not merging other changes to ffs_reload(), but none of these is related to recent locking changes.
* Remove mntvnode_mtx and replace it with per-mountpoint mutex.kan2003-11-051-11/+11
| | | | | | | | | | Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to operate on this mutex transparently. Eventually new mutex will be protecting more fields in struct mount, not only vnode list. Discussed with: jeff
* Remove alpha-bitops.h now that it's unused. It's in the attic ifmarcel2003-11-031-255/+0
| | | | we want it again.
* Use VOP_UNLOCK/vrele instead of vput. td was erecived as a parameterkan2003-11-031-2/+4
| | | | and one cannot be sure it is equal to curthread.
* Take care not to call vput if thread used in corresponding vgetkan2003-11-021-1/+2
| | | | | | | | | | wasn't curthread, i.e. when we receive a thread pointer to use as a function argument. Use VOP_UNLOCK/vrele in these cases. The only case there td != curthread known at the moment is boot() calling sync with thread0 pointer. This fixes the panic on shutdown people have reported.
* Temporarily undo parts of the stuct mount locking commit by jeff.kan2003-11-011-2/+1
| | | | | | | | It is unsafe to hold a mutex across vput/vrele calls. This will be redone when a better locking strategy is agreed upon. Discussed with: jeff
* Fix the alpha tinderbox. The alpha specific bitops used by the bitmapmarcel2003-10-292-6/+2
| | | | | | | | | | code has the typical branch prediction detour, which creates cross- section branches. A LINT kernel is apparently large enough nowadays that the .text and .text2 sections cannot always be layed-out so that branches between them reach. The fix is to stop using the alpha-specific bitops and instead use the portable implementation used by all platforms other than alpha and i386.
* DuH!phk2003-10-183-3/+3
| | | | | bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file)
* Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()phk2003-10-183-0/+3
|
* - File systems that wish to inspect the vnode contents or their privatejeff2003-10-051-0/+8
| | | | | | v_data field before calling vget/vn_lock must check VI_XLOCK manually to be sure that v_data is still valid. Implement this check in two places here.
* - Don't cache_purge() in ext2_reclaim. vclean() does it for us sojeff2003-10-051-1/+0
| | | | this is redundant.
* - Don't use vrecycle() call vgonel() directly after grabing the vnodejeff2003-10-041-4/+6
| | | | | interlock. We do this so that we still hold the interlock when we lock the vnode later. This prevents races with the mnt vnode list.
* - Clean-up comments that refer to the use of B_LOCKED.jeff2003-08-282-3/+4
|
* - In LCK_BUF() simply change the owner of the buf to the kernel.jeff2003-08-281-10/+2
| | | | | | | | | | | | - In ULCK_BUF we no longer need to acquire the lock, just write the buf out. - The combination of these changes eliminates one more use of B_LOCKED which is in the way of making the buffer cache SMP safe. In the long term ext2fs should probably not try to optimize the use of their metadata bufs with a private cache. This will starve the rest of the system for buffers in the extreme case. Discussed with: bde (A long time ago..) Tested on: md disk/x86
* Change of plans: Add ext2_bitops.h with generic and portablemarcel2003-08-254-49/+116
| | | | | | | | implementations. Use those on platforms that don't have MD headers. Remove the ia64 MD header. We're going to use the C implementation there. Suggested by: bde
* Add compilation support for extfs on ia64, primarily to support LINT.marcel2003-08-233-6/+53
| | | | | The functions in ia64-bitops.h merely call panic() for now. They need to be implemented some day, just not today.
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-1/+1
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-151-0/+2
| | | | to check that the buffer points to the correct vnode.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-25/+21
| | | | | Submitted by: hmp Reviewed by: phk
* - Lock the buf before clearing flags.jeff2003-03-131-1/+1
|
* - Add a new 'flags' parameter to getblk().jeff2003-03-044-8/+8
| | | | | | | | | | - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter. Reviwed by: arch Not objected to by: mckusick
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-1/+1
| | | | | | Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-34/+33
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-2/+1
|
* - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.jeff2003-02-251-1/+1
| | | | | | | | | | - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick
* This commit was generated by cvs2svn to compensate for changes in r111368,obrien2003-02-231-0/+248
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import Linux's linux/include/asm-sparc64/bitopts.h.obrien2003-02-231-0/+248
| | | | | | | | This is taken from the 2.4.3 Linux sources as shipped on Red Hat 7.1 Alpha.
| * Update the vendor branch of ext2fs to Linux 2.3.35. This is neededbde2000-01-018-686/+1123
| | | | | | | | | | | | | | | | | | | | mainly to get control over new features. E.g., ext2fs filesystems may now have a type field in directory entries (like ufs has had for 20 years or so). Current versions of FreeBSD ext2fs panic on this. ext2fs filesystem code is supposed to check the feature flags in the superblock and take appropriate actions for unsupported features. The other new features are sparse superblocks, large file support, and btree'd directories.
| * Finish (?) importing the Linux ext2fs files that our GPL'ed ext2fsbde2000-01-011-34/+10
| | | | | | | | | | | | | | | | | | files seem to be based on. Don't bother importing <asm-i386/string.h> just to get the Linux implementation of memscan() which is appended to our i386-bitops.h. The BSD skpc() should have been used instead of memscan(). Obtained from: Linux 1.2.2 distribution
* | Back out M_* changes, per decision of the TRB.imp2003-02-193-9/+9
| | | | | | | | Approved by: trb
* | - Use the new vop_stdfsync instead of recreating our own.jeff2003-02-091-49/+3
| |
* | Use VOP_SPECSTRATEGY() instead of VOP_STRATEGY().phk2003-01-281-1/+1
| |
* | Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-9/+9
| | | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* | Since Jeffr made the std* functions the default in rev 1.63 ofphk2003-01-041-9/+0
| | | | | | | | | | | | | | kern/vfs_defaults.c it is wrong for the individual filesystems to use the std* functions as that prevents override of the default. Found by: src/tools/tools/vop_table
* | Convert calls to BUF_STRATEGY to VOP_STRATEGY calls. This is a no-op sincephk2003-01-031-1/+1
| | | | | | | | all BUF_STRATEGY did in the first place was call VOP_STRATEGY.
* | Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-2/+2
| | | | | | | | especially in troff files.
* | Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | | | | | Add FreeBSD Id tag where missing.
* | MFufs 1.33:bde2002-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In the 'found' case for ext2_lookup() the underlying bp's data was being accessed after the bp had been releaed. A simple move of the brelse() solves the problem. The PR reports that this caused panics running the GDB testsuite unless NO_GEOM is configured. PR: 44060 Reported by: Mark Kettenis <kettenis@chello.nl> MFC after: 3 days
* | Be consistent about functions being static.phk2002-10-161-16/+16
| | | | | | | | | | | | Fix misindentation. Spotted by: DARPA & NAI Labs.
* | Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-143-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
OpenPOWER on IntegriCloud