summaryrefslogtreecommitdiff
path: root/sys/gnu/ext2fs/ext2_inode.c
Commit message (Collapse)AuthorAgeFilesLines
* Move ext2fs from src/gnu to src/gnu/fs.Craig Rodrigues2005-06-151-536/+0
| | | | | | | | | | | Discussed on arch@. Reviewed by: kan Approved by: re (blanket), kan Discussed with: dumbbell Notes: svn path=/head/; revision=147401
* Don't hold a reference to the disk vnode for each inode.Poul-Henning Kamp2005-03-161-7/+0
| | | | | | | | Don't store the disk cdev in all inodes, it's only used for debugging printfs. Notes: svn path=/head/; revision=143677
* Use vfs_hash() instead of home-rolledPoul-Henning Kamp2005-03-141-4/+1
| | | | 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-131-1/+0
| | | | | | | | | Various changes to support new vgone() locking protocol. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=143509
* Make filesystems get rid of their own vnodes vnode_pager object inPoul-Henning Kamp2005-01-281-0/+1
| | | | | | | VOP_RECLAIM(). Notes: svn path=/head/; revision=140939
* Remove unused argument to vrecycle()Poul-Henning Kamp2005-01-281-1/+1
| | | | Notes: svn path=/head/; revision=140936
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-061-2/+2
| | | | Notes: svn path=/head/; revision=139778
* Loose the v_dirty* and v_clean* alias macros.Poul-Henning Kamp2004-10-251-2/+2
| | | | | | | | Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST(). Notes: svn path=/head/; revision=136943
* Move the buffer method vector (buf->b_op) to the bufobj.Poul-Henning Kamp2004-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | Extend it with a strategy method. Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY song and dance. Rename ibwrite to bufwrite(). Move the two NFS buf_ops to more sensible places, add bufstrategy to them. Add inlines for bwrite() and bstrategy() which calls through buf->b_bufobj->b_ops->b_{write,strategy}(). Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy(). Notes: svn path=/head/; revision=136927
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-071-4/+0
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=128019
* Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE();Tim J. Robbins2004-02-191-9/+1
| | | | | | | pointed out by bde. Notes: svn path=/head/; revision=125991
* Add partial support for large (>4GB) files on ext2 filesystems. ThisTim J. Robbins2004-02-181-0/+10
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=125962
* Fixed longstanding brokenness of inode updates. The waitfor flag wasBruce Evans2004-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). Notes: svn path=/head/; revision=125781
* DuH!Poul-Henning Kamp2003-10-181-1/+1
| | | | | | | | bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file) Notes: svn path=/head/; revision=121205
* Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()Poul-Henning Kamp2003-10-181-0/+1
| | | | Notes: svn path=/head/; revision=121197
* - Don't cache_purge() in ext2_reclaim. vclean() does it for us soJeff Roberson2003-10-051-1/+0
| | | | | | | this is redundant. Notes: svn path=/head/; revision=120776
* - Add a new 'flags' parameter to getblk().Jeff Roberson2003-03-041-1/+1
| | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=111856
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Regularize the vop_stdlock'ing protocol across all the filesystemsKirk McKusick2002-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=105077
* - Lock access to the buf lists.Jeff Roberson2002-09-251-2/+4
| | | | | | | - Use vrefcnt() where appropriate. Notes: svn path=/head/; revision=103938
* Use explicitly-sized types where necessary to make ext2fs work againIan Dowse2002-05-181-11/+11
| | | | | | | after the change to a 64-bit daddr_t. Notes: svn path=/head/; revision=96877
* Remove register keyword.Ian Dowse2002-05-161-14/+11
| | | | Notes: svn path=/head/; revision=96752
* Complete the separation of ext2fs from ufs by copying the remainingIan Dowse2002-05-161-30/+88
| | | | | | | | | | | | | shared code and converting all ufs references. Originally it may have made sense to share common features between the two filesystems, but recently it has only caused problems, the UFS2 work being the final straw. All UFS_* indirect calls are now direct calls to ext2_* functions, and ext2fs-specific mount and inode structures have been introduced. Notes: svn path=/head/; revision=96749
* Repaired CSRG id. This file was not in Lite1; it was just cloned from aBruce Evans2002-03-231-2/+1
| | | | | | | file with a in Lite1 before being cvs-added to FreeBSD. Notes: svn path=/head/; revision=93015
* Remove __P.Alfred Perlstein2002-03-191-2/+2
| | | | Notes: svn path=/head/; revision=92728
* KSE Milestone 2Julian Elischer2001-09-121-3/+3
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Fix typo (accessable --> accessible).Alexander Langer2000-06-141-1/+1
| | | | | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai Notes: svn path=/head/; revision=61686
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-05-051-0/+1
| | | | | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter Notes: svn path=/head/; revision=60041
* s/biowait/bufwait/gPoul-Henning Kamp2000-04-291-1/+1
| | | | | | | Prodded by: several. Notes: svn path=/head/; revision=59762
* ext2fs relies on UFS support code, and as a result also requiresRobert Watson2000-04-151-0/+1
| | | | | | | | | | | | | extattr.h to be included. This fixes the broken ext2fs build as of the import of extattr code. Also added $FreeBSD: $ to a couple of files that didn't have them, without which I couldn't commit this fix. Reported by: "George W. Dinolt" <gdinolt@pacbell.net> Notes: svn path=/head/; revision=59259
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-03-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful. Notes: svn path=/head/; revision=58345
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-271-11/+11
| | | | | | | kernel compile Notes: svn path=/head/; revision=43301
* Don't pass unused unused timestamp args to UFS_UPDATE() or wasteBruce Evans1999-01-071-9/+5
| | | | | | | | time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes(). Notes: svn path=/head/; revision=42374
* Fixed a misspelling of boolean true as MNT_WAIT.Bruce Evans1998-11-151-1/+1
| | | | Notes: svn path=/head/; revision=41174
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagsPeter Wemm1998-10-311-2/+2
| | | | | | | rather than abusing the list next pointer with a magic number. Notes: svn path=/head/; revision=40790
* error return assignment was less than ideal. Fix the part that causedPeter Wemm1998-10-291-2/+2
| | | | | | | | warnings to be the same as the ffs code. Previously, any error from the UFS_UPDATE() call was lost (I think). Notes: svn path=/head/; revision=40721
* Use vtruncbuf() to clean out cached blocks on a file shorten rather thanPeter Wemm1998-10-291-3/+4
| | | | | | | | the more expensive vinvalbuf(), based on the FFS version of the same routine. I don't have any ext2fs filesystems to test this on. Notes: svn path=/head/; revision=40718
* VOP_STRATEGY grows an (struct vnode *) argumentJulian Elischer1998-07-041-1/+1
| | | | | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org> Notes: svn path=/head/; revision=37384
* Sync timestamp changes for inodes of special files to disk as lateBruce Evans1998-07-031-7/+7
| | | | | | | | | | | | | | | | | as possible (when the inode is reclaimed). Temporarily only do this if option UFS_LAZYMOD configured and softupdates aren't enabled. UFS_LAZYMOD is intentionally left out of /sys/conf/options. This is mainly to avoid almost useless disk i/o on battery powered machines. It's silly to write to disk (on the next sync or when the inode becomes inactive) just because someone hit a key or something wrote to the screen or /dev/null. PR: 5577 Previous version reviewed by: phk Notes: svn path=/head/; revision=37363
* Centralized in-core inode update. Update the in-core inode directlyBruce Evans1998-07-031-16/+4
| | | | | | | | | | | in ufs_setattr() so that there is no need to pass timestamps to UFS_UPDATE() (everything else just needs the current time). Ignore the passed-in timestamps in UFS_UPDATE() and always call ufs_itimes() (was: itimes()) to do the update. The timestamps are still passed so that all the callers don't need to be changed yet. Notes: svn path=/head/; revision=37362
* Removed unused includes.Bruce Evans1998-06-211-2/+0
| | | | Notes: svn path=/head/; revision=37101
* Eradicate the variable "time" from the kernel, using various measures.Poul-Henning Kamp1998-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde Notes: svn path=/head/; revision=34961
* Back out DIAGNOSTIC changes.Eivind Eklund1998-02-061-1/+0
| | | | Notes: svn path=/head/; revision=33134
* Turn DIAGNOSTIC into a new-style option.Eivind Eklund1998-02-041-0/+1
| | | | Notes: svn path=/head/; revision=33108
* Removed __FreeBSD__ ifdefs.Bruce Evans1997-12-021-30/+0
| | | | Notes: svn path=/head/; revision=31483
* Another VFS cleanup "kilo commit"Poul-Henning Kamp1997-10-161-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS} intereface function, and now lives in the ufsmount structure. 2. Remove VOP_SEEK, it was unused. 3. Add mode default vops: VOP_ADVLOCK vop_einval VOP_CLOSE vop_null VOP_FSYNC vop_null VOP_IOCTL vop_enotty VOP_MMAP vop_einval VOP_OPEN vop_null VOP_PATHCONF vop_einval VOP_READLINK vop_einval VOP_REALLOCBLKS vop_eopnotsupp And remove identical functionality from filesystems 4. Add vop_stdpathconf, which returns the canonical stuff. Use it in the filesystems. (XXX: It's probably wrong that specfs and fifofs sets this vop, shouldn't it come from the "host" filesystem, for instance ufs or cd9660 ?) 5. Try to make system wide VOP functions have vop_* names. 6. Initialize the um_* vectors in LFS. (Recompile your LKMS!!!) Notes: svn path=/head/; revision=30492
* VFS mega cleanup commit (x/N)Poul-Henning Kamp1997-10-161-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!) Notes: svn path=/head/; revision=30474
* Removed unused #includes.Bruce Evans1997-06-141-4/+1
| | | | Notes: svn path=/head/; revision=26641
* Fixed some invalid (non-atomic) accesses to `time', mostly ones of theBruce Evans1997-03-221-6/+2
| | | | | | | | | form `tv = time'. Use a new function gettime(). The current version just forces atomicicity without fixing precision or efficiency bugs. Simplified some related valid accesses by using the central function. Notes: svn path=/head/; revision=24101