Age | Commit message (Collapse) | Author |
|
ok tedu@ visa@
|
|
This eliminates the idiom 'arc4random() % X' (where X + 1 is not a
power of two) from base.
Part of a patch from Matthew Martin from end of last year.
ok tedu@ (a long time ago), natano@
|
|
cluster_write().
ok beck zhuk
|
|
usb stack was busy, the kernel could trigger an uvm fault. There
is a race between vop_generic_revoke() and sys_mount() where vgonel()
could reset v_specinfo. Then v_specmountpoint is no longer valid.
So after sleeping, msdosfs_mountfs() could crash in the error path.
The code in the different *_mountfs() functions was inconsistent,
implement the same check everywhere.
OK krw@ natano@
|
|
random data on the disk as an inode. Thus avoiding crashes when
translating a bogus filehandle to a vnode. Yes, I'm looking at you,
NFS!
Adapted from a diff by Christos Zoulas via NetBSD, pointed out by
kurt@.
ok beck@
|
|
logical block is contiguous to the previous one.
This logic is a left-over of the pre-bread_cluster() area. When the
read-ahead version of bread(9) was used to prefetch blocks. Nowadays
bread_cluster() do the right thing (tm).
ok stefan@
|
|
could end up in an inconsistent state. The fstype dependent
mp->mnt_data was NULL, but the general mp was still listed as a
valid mount point. Next access to the file system would crash with
a NULL pointer dereference.
If closing the device fails, the mount point must go away anyway.
There is nothing we can do about it. Remove the workaround for the
EIO error in the general unmount code, but do not generate any error
in the file system specific unmount functions.
OK natano@ beck@
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
OK krw@ natano@ as part of a larger diff
|
|
|
|
The concept of differentiating between "short" and "long" symlinks is
specific to ufs/, so it shouldn't creep into the generic fs layer.
Inspired by a similar commit to NetBSD.
While there replace all references to mnt_maxsymlinklen in ufs/ext2fs
with EXT2_MAXSYMLINKLEN, which is the constant max short symlink len for
ext2fs. This allows to get rid of some (mnt_maxsymlinklen == 0) checks
there, which is always false for ext2fs.
input and ok stefan@
ok millert@
|
|
This allows to remove some truncating casts in symlink handling code.
Also, validate fs_maxsymlinklen in the superblock at mount time and on
fsck to make sure we don't use bogus data.
discussion & ok millert@, stefan@
|
|
|
|
Cluster read is unconditionnally enabled for FFS since some years and
toggling "doclusterread" has no effect.
OpenBSD no longer support write clustering since the Dynamic Buffer
Cache went in, so there is reason to delay the call to bawrite(9).
Tested by Mathieu, ok dlg@
|
|
ok mpi@
|
|
(others require more care)
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
|
used in disklabel type tools, newfs, fsck, when related to ufs or
ufs-derived filesystems, but also in a struct. Those things always include
<ufs/ffs/fs.h>. Move it there
ok guenther, tested in ports by sthen
|
|
|
|
architectures.
|
|
that these don't need to support interrupts
|
|
|
|
|
|
ok deraadt@ tedu@
|
|
to include that than rdnvar.h. ok deraadt dlg
|
|
ok mpi@ kspillner@
|
|
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@
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
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.
|
|
boolean, not a MNT_* flag.
ok beck@
|
|
|
|
that probably crashed espie.
ok tedu@
|
|
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@
|
|
--
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@
|
|
|
|
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@
|
|
|
|
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@
|
|
(a.k.a. 512-bytes) as far as ffs is concerned.
|
|
for defines fragnum, fsbtodb, cgsblock, and cgdmin.
|
|
(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.
|
|
variables. Some random whitespace/knf repairs encountered on the way.
ok miod@ on inspection, feedback & more suggestions from millert@
|
|
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in
uiomove(), vn_fsizechk(), and ktrgenio(). Eliminate the always-zero
'error' argument to ktrgenio() at the same time.
|
|
ok miod@.
|
|
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
|