summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
...
* Force the quota update to be done when an inode is released inmckusick2002-06-251-1/+1
| | | | | ufs_inactive. This avoid a panic when checking a NULL credential in suser_cred().
* Prototype fixes (long newinum --> ino_t newinum).jlemon2002-06-241-2/+2
|
* Warning fixes for 64 bits platforms. This eliminates all themux2002-06-235-23/+23
| | | | | | warnings I have had in the FFS code on sparc64. Reviewed by: mckusick
* Rename the BALLOC flags from B_* to BA_* to avoid confusion with thedillon2002-06-237-48/+48
| | | | | | struct buf B_ flags. Approved by: mckusick
* This patch fixes a problem whereby filesystems that ranmckusick2002-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | out of inodes in a cylinder group would fail to check for free inodes in other cylinder groups. This bug was introduced in the UFS2 code merge two days ago. An inode is allocated by calling ffs_valloc which calls ffs_hashalloc to do the filesystem scan. Ffs_hashalloc walks around the cylinder groups calling its passed allocator (ffs_nodealloccg in this case) until the allocator returns a non-zero result. The bug is that ffs_hashalloc expects the passed allocator function to return a 64-bit ufs2_daddr_t. When allocating inodes, it calls ffs_nodealloccg which was returning a 32-bit ino_t. The ffs_hashalloc code checked a 64-bit return value and usually found random non-zero bits in the high 32-bits so decided that the allocation had succeeded (in this case in the only cylinder group that it checked). When the result was passed back to ffs_valloc it looked at only the bottom 32-bits, saw zero and declared the system out of inodes. But ffs_hashalloc had really only checked one cylinder group. The fix is to change ffs_nodealloccg to return 64-bit results. Sponsored by: DARPA & NAI Labs. Submitted by: Poul-Henning Kamp <phk@critter.freebsd.dk> Reviewed by: Maxime Henrion <mux@freebsd.org>
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-2126-1068/+2494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
* In rev 1.72 a situation related to write/mmap was fixed which could resultdillon2002-06-191-7/+11
| | | | | | | | | | | | | | | | | | | | | | in a user process gaining visibility into the 'old' contents of a filesystem block. There were two cases: (1) when uiomove() fails (user process issues illegal write), and (2) when uiomove() overlaps a mmap() of the same file at the same offset (fault -> recursive buffer I/O reads contents of old block). Unfortunately 1.72 also had the unintended effect of forcing the filesystem to do a read-before-write in the case of a full-block-write (non append case), e.g. 'dd if=/dev/zero of=test.dat bs=1m count=256 conv=notrunc'. This destroys performance.. not only is a read forced for every write, but clustering breaks as well. The solution is to clear the buffer manually in the full-block case rather then asking BALLOC to do it (BALLOC issues the read-before-write). In the partial-block case we want BALLOC to do it because the read-before-write is necessary. This patch should greatly improve database and news-feed server performance. Found by: MKI <mki@mozone.net> MFC after: 3 days
* Fix a typo in my recently added comment: s/beleived/believed/semenu2002-06-061-1/+1
| | | | Submitted by: keramida
* Backout/modify previous revision:alfred2002-06-011-0/+4
| | | | | | | "empty default cases shouldn't be removed, they should have a break; statement added to them." Requested by: billf
* Silence warnings, remove some empty 'default' switch cases.alfred2002-06-011-2/+0
|
* Remove lock from ffs_vget introduced by v1.24. Instead of locking thesemenu2002-05-303-76/+54
| | | | | | | | | | | | | | vnode creation globaly, we allow processes to create vnodes concurently. In case of concurent creation of vnode for the one ino, we allow processes to race and then check who wins. Assuming that concurent creation of vnode for same ino is really rare case, this is belived to be an improvement, as it just allows concurent creation of vnodes. Idea by: bp Reviewed by: dillon MFC after: 1 month
* Remove IFS from 5.0-CURRENT. This facilitates introducing UFS2 asrwatson2002-05-196-1347/+0
| | | | | | | IFS had its fingers deep in the belly of the UFS/FFS split. IFS will be reimplemented by the maintainer at a later date. Requested by: adrian (maintainer)
* Fix two casts to "daddr_t *" that should have been "ufs_daddr_t *".iedowse2002-05-181-2/+3
|
* Fix a typo where sizeof(daddr_t) was specified instead of sizeof(doff_t).iedowse2002-05-181-1/+1
| | | | | Now that daddr_t is 64-bit, this caused hash blocks to be allocated twice as large as they need to be.
* Remove um_i_effnlink_valid, i_spare[] and the ufsmount_u and inode_uiedowse2002-05-186-27/+7
| | | | | | unions, since these were only necessary when ext2fs used ufs code. Reviewed by: mckusick
* Fix ufs_daddr_t/daddr_t type problems.phk2002-05-173-4/+4
| | | | Sponsored by: DARPA & NAI labs.
* Call ufs_bmaparray() with right parameter type.phk2002-05-171-1/+1
| | | | Sponsored by: DARPA & NAI Labs.
* More s/file system/filesystem/gtrhodes2002-05-1615-79/+79
|
* Make daddr_t and u_daddr_t 64bits wide.phk2002-05-142-3/+3
| | | | | | Retire daddr64_t and use daddr_t instead. Sponsored by: DARPA & NAI Labs.
* Remove register keyword.phk2002-05-1311-125/+125
| | | | | Sponsored by: DARPA & NAI Labs. Submitted by: mckusick
* Remove two "register" and a blank line.phk2002-05-121-3/+2
| | | | | Submitted by: mckusick Sponsored by: DARPA & NAI Labs.
* ARGH! SBLOCK is not unused. Try to get this right.phk2002-05-122-3/+3
| | | | | | | | 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.
* o Condition the compilation and use of vm_freeze_copyopts()alc2002-05-061-1/+2
| | | | on ENABLE_VFS_IOOPT.
* Move some UFS related stuff home where it belongs.phk2002-05-051-1/+7
|
* Include systm.h so panic(9) is defined when doing DEBUG_ALL_VFS_LOCKS.jeff2002-05-041-0/+1
|
* Name ufs_vop_[gs]etextattr() consistently with the rest of our VOPs andphk2002-05-034-16/+16
| | | | | | | put then in the ufs_vnops where they belong, rather than in the ffs_vnops. Ok'ed by: rwatson Sponsored by: DARPA & NAI Labs.
* Use vop_panic() instead of our home-rolled version.phk2002-05-021-16/+6
|
* Remove support for using soon to be retired "special" poll(2) ops.alfred2002-04-181-7/+7
| | | | | | | | | Replace with kevent(2) ops. This is untested, but the code would rot even further if this wasn't applied. I've chosen to apply this to prompt some cleanup. Submitted by: bde
* Don't peak into the malloc_type structure for limits. The desired vnodesjeff2002-04-151-2/+1
| | | | | check should be sufficient. This is required for the pending removal of malloc_type limits.
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.phk2002-04-081-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-044-5/+5
| | | | | | | 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
* Move the FFS parameter MAXFRAG from <sys/param.h> to <ufs/ffs/fs.h>phk2002-04-032-0/+3
| | | | Sponsored by: DARPA & NAI Labs.
* Use DIOCGSECTORSIZE instead of the bogus DIOCGPART ioctl.phk2002-04-021-6/+8
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-018-16/+16
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | 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
* Two minor changes to dirhash, which result in some marginal benchmarkdwmalone2002-03-201-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | improvements. 1) If deleting an entry results in a chain of deleted slots ending in an empty slot, then we can be a bit more aggressive about marking slots as empty. 2) The last stage of the FNV hash is to xor the last byte of data into the hash. This means that filenames which differ only in the last byte will be placed close to one another in the hash table, which forms longer chains. To work around this common case, we also hash in the address of the dirhash structure. news/cancel = news/articles/control/cancel for a tradspool inn server squid2 = squid level 2 directory (dirs called 00->FF) squid3 = squid level 3 directory (files called 00001F00->00001FFF) mean #probes for home dir mh inbox news/cancel tmp squid2 squid3 old successful 1.02 3.19 4.07 1.10 7.85 2.06 new successful 1.04 1.32 1.27 1.04 1.93 1.17 old unsuccessful 1.08 4.50 5.37 1.17 10.76 2.69 new unsuccessful 1.08 1.73 1.64 1.17 2.89 1.37 Reviewed by: iedowse MFC after: 2 weeks
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-204-15/+15
|
* Remove __P.alfred2002-03-1914-280/+271
|
* Fixed some printf format errors (hopefully all of the remaining daddr64_tbde2002-03-191-5/+6
| | | | | | ones for GENERIC, and all others on the same line as those). Reformat the printfs if necessary to avoid new long lones or old format printf errors.
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-1713-81/+96
| | | | | | | | | | | | 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-154-11/+21
| | | | | | | | | | | | 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.
* Quiet a warning on the Alpha.obrien2002-03-151-1/+5
|
* This corrects the first of two known deadlock conditions thatmckusick2002-03-141-12/+1
| | | | come from the presence of a snapshot file.
* Fix a bug in ufsdirhash_adjfree() that caused it to incorrectlyiedowse2002-03-111-10/+7
| | | | | | | | | | | | | | | | | | | | update the free-space statistics in some cases. The problem affected directory blocks when the free space dropped below the size of the maximum allowed entry size. When this happened, the free-space summary information could claim that there are no further blocks that can fit a maximum-size entry, even if there are. The effect of this bug is that the directory may be enlarged even though there is space within the directory for the new entry. This wastes disk space and has a negative impact on performance. Fix it by correctly computing the dh_firstfree array index, adding a helper macro for clarity. Put an extra sanity check into ufsdirhash_checkblock() to detect the situation in future. Found by: dwmalone Reviewed by: dwmalone MFC after: 1 week
* I missed one VOP_CLOSE in the previous commit.phk2002-03-111-0/+5
| | | | Pointed out by: bde
* As a XXX bandaid open the mounted device READ/WRITE even if we only mountphk2002-03-111-0/+14
| | | | | | | | | | | read-only. The trouble here is that we don't reopen the device in read/write mode when we remount in read/write mode resulting in a filesystem sending write requests to a device which was only opened read/only. I'm not quite sure how such a reopen would best be done and defer the problem to more agile hackers.
* Update DBA for NAI. We have several. We used the wrong one. :-)rwatson2002-03-071-1/+1
|
* Add new errno ``ENOATTR''.green2002-03-072-29/+17
|
OpenPOWER on IntegriCloud