summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs
Commit message (Collapse)AuthorAgeFilesLines
* Convert ext2fs to nmount(2).mux2002-05-242-27/+28
|
* Add an ext2_uninit() routine that undoes the actions performed byiedowse2002-05-183-5/+27
| | | | | ext2_init(). This permits the ext2fs module to be unloaded without causing panics and leaking memory.
* Fix two off-by-one errors when sanity-checking inode numbers. Iniedowse2002-05-182-2/+2
| | | | | | | | | ext2fs, inode numbers start at 1, so the maximum valid inode number is (s_inodes_per_group * s_groups_count), not one less. This is just a minimal change to avoid unnecessary panics and errors; some other related bugs that Bruce Evans mentioned to me are not addressed. Reviewed by: bde (ages ago)
* Use explicitly-sized types where necessary to make ext2fs work againiedowse2002-05-188-59/+59
| | | | after the change to a 64-bit daddr_t.
* Give ext2fs its own static "dirchk" variable instead of using ufs'siedowse2002-05-161-4/+12
| | | | variable. Make this accessible as the sysctl vfs.e2fs.dirchk.
* Remove register keyword.iedowse2002-05-168-86/+83
|
* Complete the separation of ext2fs from ufs by copying the remainingiedowse2002-05-1614-449/+1342
| | | | | | | | | | 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.
* Following a repo-copy from src/sys/ufs/ufs, rename functions andiedowse2002-05-144-163/+118
| | | | | | | | | | structures etc. to ext2fs-specific names, and remove ufs-specific code that is no longer required. As a first stage, the code will still convert back and forth between the on-disk format and struct inode, so the struct dinode fields have been added to struct inode for now. Note that these files are not yet connected to the build.
* Make daddr_t and u_daddr_t 64bits wide.phk2002-05-141-2/+2
| | | | | | Retire daddr64_t and use daddr_t instead. Sponsored by: DARPA & NAI Labs.
* Fixed syntax errors (garbage after #endif; just editing errors in thisbde2002-05-131-4/+4
| | | | | | case). These errors and related style bugs swere cloned from ufs shortly after they were committed to ufs. They were mostly fixed in ufs long ago.
* Remove register keyword.phk2002-05-131-1/+1
| | | | | Sponsored by: DARPA & NAI Labs. Submitted by: mckusick
* ARGH! SBLOCK is not unused. Try to get this right.phk2002-05-121-2/+1
| | | | | | | | BBSIZE belongs in <sys/disklabel.h> (but shouldn't be a constant). Define SBLOCK again, using the right math. Sponsored by: DARPA & NAI Labs.
* Remove #define for BBOFF, it is assumed == 0 so many places that we mightphk2002-05-121-2/+1
| | | | | | | as well forget about it. In fact the only thing which used it was the SBOFF macro. Sponsored by: DARPA & NAI Labs.
* Remove unused BBLOCK and SBLOCK #defines.phk2002-05-121-2/+0
| | | | Sponsored by: DARPA & NAI Labs.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-012-3/+3
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* In ffs_mountffs(), set mnt_iosize_max to si_iosize_max unconditionallybde2002-03-301-0/+5
| | | | | | | | | | | | | | | | provided the latter is nonzero. At this point, the former is a fairly arbitrary default value (DFTPHYS), so changing it to any reasonable value specified by the device driver is safe. Using the maximum of these limits broke ffs clustered i/o for devices whose si_iosize_max is < DFLTPHYS. Using the minimum would break device drivers' ability to increase the active limit from DFTLPHYS up to MAXPHYS. Copied the code for this and the associated (unnecessary?) fixup of mp_iosize_max to all other filesystems that use clustering (ext2fs and msdosfs). It was completely missing. PR: 36309 MFC-after: 1 week
* Moved $FreeBSD$ to the correct place.bde2002-03-232-3/+2
|
* Repaired CSRG id. This file was not in Lite1; it was just cloned from abde2002-03-234-5/+4
| | | | file with a in Lite1 before being cvs-added to FreeBSD.
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-233-11/+8
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
* Remove __P.alfred2002-03-198-84/+84
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-175-15/+31
| | | | | | | | | | | | locking flags when acquiring a vnode. The immediate purpose is to allow polling lock requests (LK_NOWAIT) needed by soft updates to avoid deadlock when enlisting other processes to help with the background cleanup. For the future it will allow the use of shared locks for read access to vnodes. This change touches a lot of files as it affects most filesystems within the system. It has been well tested on FFS, loopback, and CD-ROM filesystems. only lightly on the others, so if you find a problem there, please let me (mckusick@mckusick.com) know.
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-03-152-5/+10
| | | | | | | | | | | | the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
* Remove use of the bogus ioctl DIOCGPART.phk2002-03-111-11/+1
| | | | | | | It was used to initialize an unused variable, because ext2fs was copy&pasted from UFS rather than copy,paste&cleaned from UFS. Suggested by: bde
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-3/+3
| | | | reference.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+1
| | | | also don't use ANSI string concatenation.
* Add mnt_reservedvnlist so we can MFC to 4.x, in order to make all mountdillon2001-11-041-0/+1
| | | | | | | | structure changes now rather then piecemeal later on. mnt_nvnodelist currently holds all the vnodes under the mount point. This will eventually be split into a 'dirty' and 'clean' list. This way we only break kld's once rather then twice. nvnodelist will eventually turn into the dirty list and should remain compatible with the klds.
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-4/+5
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* The addition of i_dirhash to struct inode pushed RELENG_4'siedowse2001-09-242-3/+3
| | | | | | | | | | | | | sizeof(struct inode) into a new malloc bucket on the i386. This didn't happen in -current due to the removal of i_lock, but it does no harm to apply the workaround to -current first. Reduce the size of the i_spare[] array in struct inode from 4 to 3 entries, and change ext2fs to use i_din.di_spare[1] so that it does not need i_spare[3]. Reviewed by: bde MFC after: 3 days
* KSE Milestone 2julian2001-09-129-116/+117
| | | | | | | | | | | | | | 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
* Bring in dirhash, a simple hash-based lookup optimisation for largeiedowse2001-07-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | directories. When enabled via "options UFS_DIRHASH", in-core hash arrays are maintained for large directories. These allow all directory operations to take place quickly instead of requiring long linear searches. For now anyway, dirhash is not enabled by default. The in-core hash arrays have a memory requirement that is approximately half the size of the size of the on-disk directory file. A number of new sysctl variables allow control over which directories get hashed and over the maximum amount of memory that dirhash will use: vfs.ufs.dirhash_minsize The minimum on-disk directory size for which hashing should be used. The default is 2560 (2.5k). vfs.ufs.dirhash_maxmem The system-wide maximum total memory to be used by dirhash data structures. The default is 2097152 (2MB). The current amount of memory being used by dirhash is visible through the read-only sysctl variable vfs.ufs.dirhash_maxmem. Finally, some extra sanity checks that are enabled by default, but which may have an impact on performance, can be disabled by setting vfs.ufs.dirhash_docheck to 0. Discussed on: -fs, -hackers
* Fix more mntvnode and vnode interlock order reversals.jhb2001-06-281-2/+2
|
* Fix a mntvnode and vnode interlock reversal.jhb2001-06-281-3/+4
|
* Remove last vestiges of MFS.phk2001-05-291-10/+0
|
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* When running with soft updates, track the number of blocks and filesmckusick2001-05-081-4/+3
| | | | | | | | | | | | | that are committed to being freed and reflect these blocks in the counts returned by statfs (and thus also by the `df' command). This change allows programs such as those that do news expiration to know when to stop if they are trying to create a certain percentage of free space. Note that this change does not solve the much harder problem of making this to-be-freed space available to applications that want it (thus on a nearly full filesystem, you may still encounter out-of-space conditions even though the free space will show up eventually). Hopefully this harder problem will be the subject of a future enhancement.
* Remove blatantly pointless call to VOP_BMAP().phk2001-05-011-4/+1
|
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-011-32/+0
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-6/+9
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* VOP_BALLOC was never really a VOP in the first place, so convert itphk2001-04-291-0/+2
| | | | to UFS_BALLOC like the other "between UFS and FFS function interfaces".
* Make a panic less misleading.phk2001-04-291-1/+1
|
* Remove two unused arguments from ufs_bmaparray().phk2001-04-291-20/+15
|
* Revert consequences of changes to mount.h, part 2.grog2001-04-291-2/+0
| | | | Requested by: bde
* MFffs ffs_balloc.c 1.5.bde2001-04-251-0/+2
| | | | | | | | | | | | | | | | | Long ago, bread() set b_blkno to the disk block number as a side effect of doing physical i/o (or it just retained the setting from when the i/o was done). The setting is lost when buffers go away and then are reconsituted from VM. bread() originally compensated by doing a VOP_BMAP() to recover b_blkno, but this was no good since it sometimes caused extra i/o or even deadlock for bread()ing metadata to do the bmap. This was fixed in vfs_bio.c 1.33 (1995/03/03) and ffs_balloc.c 1.5, etc., by removing the VOP_BMAP() from bread() and breadn(), and changing all (?) places that used b_blkno to set it if necessary. ext2fs was not imported until later in 1995 and was still depending on the old behaviour of bread() in at least ext2_balloc(). This caused filesystem and file corruption by clobbering direct block numbers in inodes.
* Move the netexport structure from the fs-specific mountstructurephk2001-04-252-4/+2
| | | | | | | | | | | | | | to struct mount. This makes the "struct netexport *" paramter to the vfs_export and vfs_checkexport interface unneeded. Consequently that all non-stacking filesystems can use vfs_stdcheckexp(). At the same time, make it a pointer to a struct netexport in struct mount, so that we can remove the bogus AF_MAX and #include <net/radix.h> from <sys/mount.h>
* Correct #includes to work with fixed sys/mount.h.grog2001-04-231-0/+2
|
* Fixes to track snapshot copy-on-write checking in the specinfomckusick2001-03-071-1/+1
| | | | | | structure rather than assuming that the device vnode would reside in the FFS filesystem (which is obviously a broken assumption with the device filesystem).
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-071-0/+2
|
* Reviewed by: jlemonadrian2001-03-011-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
* Preceed/preceeding are not english words. Use precede or preceding.asmodai2001-02-181-1/+1
|
OpenPOWER on IntegriCloud