summaryrefslogtreecommitdiff
path: root/sys/ufs
AgeCommit message (Collapse)Author
2014-10-13Add dumping of struct dqblk done by quotactl(2)Philip Guenther
ok millert@
2014-10-13Calling quotactl(QCMD(Q_QUOTAON)) twice with the same filesystem,Philip Guenther
type, and path shouldn't leak vnode or ucred references. ok millert@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-31always use the little-endian copy of a superblock.Martin Pelikan
Damn those memcpy-wrapping macros! "do it" deraadt
2014-07-31use proper on-disk inode size: no more, no less.Martin Pelikan
Reported by Roman Yakovlev, thanks! "do it now" deraadt
2014-07-14better type safety and KNF.Martin Pelikan
Because ext2fs has only 32-bit inode numbers, use ufsino_t as in FFS. Disk blocks are u_int32_t as well, because we don't support the 64BIT flag. When we do, there's going to be a lot more going on than just daddr_t. While there, add some journaling-related bits into the superblock to play with. ok guenther
2014-07-14revert free checks in here. this seems to be a bit too agressive at theBob Beck
moment and now is not the time. hitting these in here causes chaos. We need to do these, but at a better time than right after a hackathon and before release. ok guenther@
2014-07-13pass correct sizes to free()Ted Unangst
2014-07-13use mallocarrayTed Unangst
2014-07-13kill fs2hXX/h2fsXX macros with letohXX/htoleXXMartin Pelikan
The reason being that ext2 structures are little-endian but JBD2 journal is big-endian. Don't confuse readers by talking about "file system endian". Some KNF while there. ok guenther
2014-07-13fill in proper sizes in free(9)Martin Pelikan
2014-07-13ext4 (extents) read supportMartin Pelikan
Tested on amd64 with > 4GB files and 50,000 subdirectories. From FreeBSD, thanks! ok deraadt guenther
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12fix a type error on BE architecturesMartin Pelikan
2014-07-12in-memory superblock was being filled in two places -> merge themMartin Pelikan
ok tedu
2014-07-12pull dirblock search code from ext2fs_lookup() like FreeBSD has doneMartin Pelikan
ok tedu
2014-07-12print more useful information on wrong superblocks.Martin Pelikan
Function renames for consistency and readability. No functional change.
2014-07-12revert previous unwanted commit. sorry!Martin Pelikan
2014-07-12*** empty log message ***Martin Pelikan
2014-07-11new dinode format for big-endian conversion routinesMartin Pelikan
2014-07-11Prevent division by zero on erroneous file systems.Tobias Stoeckmann
ok pelikan@
2014-07-11split ext2fs_read for the upcoming ext4 extent bits, like FreeBSD has doneMartin Pelikan
ok guenther
2014-07-11determine and use maximum file size instead of magical constantsMartin Pelikan
ok guenther
2014-07-11sizeof good old inode is 128, the structure has expandedMartin Pelikan
2014-07-11updated inode format, whitespace, re-formattingMartin Pelikan
2014-07-11separate searchslot variables into a structure like FreeBSDMartin Pelikan
ok guenther
2014-07-10prepare for upcoming ext4 read supportMartin Pelikan
Parts of the on-disk inode changed their meaning in order to support bigger sizes. More flags & prettification. No functional change. ok guenther
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-05-29fsck should use the same values in checking as newfs does in creatingKenneth R Westerback
a filesystem. fs_nspf and its derivitives like fs_spc are DEV_BSIZE values, not actual hardware disk sector values. Adjust initializations accordingly. Tweak header and man page comments to make the DEV_BSIZE'ness more obvious for future spelunkers. No-op for DEV_BSIZE (a.k.a. 512-byte) sector devices but should help checking filesystems on, e.g., 4k-byte sector devices. ok jmc@ on the man page tweaks.
2014-05-27Zap a bunch of trailing whitespace.Kenneth R Westerback
2014-05-22From FreeBSD: the second argument to UFS_UPDATE/ffs_update is just aPhilip Guenther
boolean, not a MNT_* flag. ok beck@
2014-05-09disable IO_NOCACHE B_NOCACHE conversion until it works.Ted Unangst
2014-05-07Fix ext2fs atime and mtime handling that I broke from an airportPhilip Guenther
lounge after n2k14. Prototype patch from zhuk@ ok zhuk@ krw@ tedu@
2014-04-22Fix issue where we could jump into getdirtybuf without splbio() on a retryBob Beck
that probably crashed espie. ok tedu@
2014-04-14fix potential race where an allocated inode could fail to get added,Bob Beck
noticed by pedro@ in bitrig. ok philip@ millert@
2014-04-08add IO_NOCACHE flag to vop_write arguments, which in turn sets B_NOCACHEBob Beck
on the written buffers. Use the flag for writes from the page daemon to ensure that we free buffers written out by the page daemon rather than caching them. ok kettenis@
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
2014-03-19Pull in FreeBSD r37363 and r37887:Philip Guenther
-- Sync timestamp changes for inodes of special files to disk as late 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. -- Made lazy syncing of timestamps for special files non-optional. -- Also, include support in 'pstat -v' to display the IN_LAZYMOD flag. ok tedu@ millert@
2014-02-04reduce the length of some pool names. ok deraadt guenther mpiTed Unangst
2014-01-26an EXT2FS_ITIMES macro so the tree builds. it may even work.Ted Unangst
2014-01-25ufs_setattr() was assuming that the flag bits that indicatePhilip Guenther
atime/mtime/ctime need to be updated weren't already set. When they are, the code will end up treating the VNOVAL value from the VFS layer as a time_t. Port the fix from FreeBSD: the critical bit is to process the existing flag values before possibly setting them again in ufs_setattr(). This diff pulls in a larger change from FreeBSD to replace the macro ITIMES() with a function ufs_itimes() and to remove the atime and mtime arguments from ffs_update(): only ufs_setattr() used them so it makes more sense to just do the those bits directly there. tweaks and ok tedu@ matthew@
2013-12-12bcmp -> memcmpTed Unangst
2013-12-12replace old bcopy/bzero with standard functions. ok kettenisTed Unangst
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2013-11-23Verify that the directory entry being looked at is entirely present inPhilip Guenther
the read buffer before trying to process it, so that invalidated or bogus offsets can't trigger access past the end of the read buffer. Also, zero out the dirent buffer to avoid leaking stack garbage to userspace. Problem pointed out by Pedro Martelletto (pedro (at) ambientworks.net) ok deraadt@
2013-11-12Tweak comment to explicitly mention that disk blocks are DEV_BSIZEKenneth R Westerback
(a.k.a. 512-bytes) as far as ffs is concerned.
2013-11-03Add missing (long long) cast of variable, (long long) castsKenneth R Westerback
for defines fragnum, fsbtodb, cgsblock, and cgdmin.
2013-11-02No need to cast constants or simple variables to (daddr_t). UseKenneth R Westerback
(u_int64_t) instead of (daddr_t) when casting a variable in an expression passed to DL_SETDSIZE(). Change a variable counting open files from daddr_t to int64_t. ok deraadt@ with the tweak to fix that pesky expression.
2013-11-01Sprinkle (long long) casts where %lld is being used to print daddr_tKenneth R Westerback
variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
2013-09-22Delete a T32 chunk that I missed before and update the comment onPhilip Guenther
ufs_readdir() to match