Age | Commit message (Collapse) | Author |
|
ok millert@ sthen@
|
|
ok deraadt@ krw@
|
|
ok millert@ krw@
|
|
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|
|
(forgot to commit fat.h)
Add new CLUST_END and use it as parameter to pcbmap() when searching
for end cluster, instead of explicitly passing 0xffff. This fixes potential
problem for FAT32, where cluster number may be legally bigger than 0xffff.
Also change clusteralloc() so that fillwith is not explicitly passed by caller
anymore (there is no need to use anything other than CLUST_EOFE).
From NetBSD commit by jdolecek@NetBSD.org
ok tb@ mpi@
|
|
Add new CLUST_END and use it as parameter to pcbmap() when searching
for end cluster, instead of explicitly passing 0xffff. This fixes potential
problem for FAT32, where cluster number may be legally bigger than 0xffff.
Also change clusteralloc() so that fillwith is not explicitly passed by caller
anymore (there is no need to use anything other than CLUST_EOFE).
From NetBSD commit by jdolecek@NetBSD.org
ok tb@ mpi@
|
|
* add to comments for pcbmap()
* remove useless ";"
ok tb@
|
|
This has again caused regressions, this time when reading from msdosfs.
This reverts
denode.h 1.31
msdosfs_vnops.c 1.114
Requested by deraadt@
|
|
ok deraadt@
|
|
This is the reverted commit by mpi@ from msdosfs_vnops.c 1.105 plus some
additional tweaks to fix some cluster/block number confusion that lead
to regressions when seeking past the end of a file.
The original commit message was:
The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
FreeBSD and is not really efficient but it is good enough since it is
only called when generating I/O.
With this diff I get a 100% improvement when reading big files from a
crappy USB stick.
With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
reading large contiguous files with chunk sizes of MAXPHYS is almost as
fast as physio(9) on the same device.
For a 'real world' example, when copying music files from a USB stick I
see a speed jump from 15MB/s on -current to 24Mb/s with this diff.
While here rename some 'lbn' variables into 'cn' to better reflect what
we're dealing with.
Tested by Mathieu, with support from deraadt@
ok mpi@
|
|
on amd64 and i386.
|
|
has been fixed in FreeBSD in 2002. No binary change.
From Alexander von Gernler; OK krw@
|
|
file system. In modern images the field is not set properly and
the value is not used anyway. FreeBSD has removed the check already
in 2008.
From Alexander von Gernler; OK krw@
|
|
|
|
|
|
This caused garbage to be written instead of blocks of 0-bytes if a
file is extended by seeking past the end. This happens for example
when extracting files containing lots of 0-bytes with tar.
ok mpi@
Details of original commit:
msdosfs_vnops.c revision 1.105
denode.h revision 1.28
date: 2016/01/13 10:00:55; author: mpi; commitid: ru9jHQwQX09BC5Bw;
Implement VFS read clustering for MSDOSFS.
The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
FreeBSD and is not really efficient but it is good enough since it is
only called when generating I/O.
With this diff I get a 100% improvement when reading big files from a
crappy USB stick.
With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
reading large contiguous files with chunk sizes of MAXPHYS is almost as
fast as physio(9) on the same device.
For a 'real world' example, when copying music files from a USB stick I
see a speed jump from 15MB/s on -current to 24Mb/s with this diff.
While here rename some 'lbn' variables into 'cn' to better reflect what
we're dealing with.
Tested by Mathieu, with support from deraadt@
|
|
ok kettenis@ krw@ natano@ dlg@ espie@
|
|
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.
tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu
|
|
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@
|
|
for readable directories, while making it subject to the mask option
(-m in mount_msdos), so it is still possible to mount with
non-executable directories, but with semantics that are easier to
comprehend.
This makes directory listings with default mount options work again.
ok deraadt@
|
|
noone should be executing a binary from a msdos filesystem, considering
the mountpoint tracking permission mode model
ok natano krw
|
|
msdosfs and nfsv2 don't set f_namemax. ntfs and ext2fs don't set
f_namemeax and f_favail. fusefs doesn't set f_mntfromspec, f_favail and
f_iosize. Also, make all filesystems use copy_statfs_info(), so that all
statfs information is filled in correctly for the (sb != &mp->mnt-stat)
case.
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
|
|
ok beck@ deraadt@
|
|
writing to a file on msdosfs stays within the max. file size.
ok kettenis@, krw@
|
|
From Martin Natano.
|
|
The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
FreeBSD and is not really efficient but it is good enough since it is
only called when generating I/O.
With this diff I get a 100% improvement when reading big files from a
crappy USB stick.
With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
reading large contiguous files with chunk sizes of MAXPHYS is almost as
fast as physio(9) on the same device.
For a 'real world' example, when copying music files from a USB stick I
see a speed jump from 15MB/s on -current to 24Mb/s with this diff.
While here rename some 'lbn' variables into 'cn' to better reflect what
we're dealing with.
Tested by Mathieu, with support from deraadt@
|
|
offset.
From Serguey Parkhomovsky via bugs@, in response to problem report
from matthieu@. Same fix is in NetBSD for one.
ok tedu@
|
|
e.g. print pointers with %p instead of %08x. No changes outside of
MSDOSFS_DEBUG.
|
|
read without generating spurious headaches.
|
|
|
|
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and
to correctly handle a timestamp of -1.
ok millert@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
define in sys/limits.h. OK guenther@
|
|
- 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@
|
|
|
|
ok dlg@ mpi@ bcook@ millert@ miod@
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
ok deraadt@ tedu@
|
|
ok deraadt@ tedu@
|
|
|
|
ok mpi@ kspillner@
|
|
ok tedu@
|
|
after discussions with beck deraadt kettenis.
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
Merged from FreeBSD's revision 206098.
ok beck@
|
|
FreeBSD did this years ago in revision 126086 as pointed out by
John-Mark Gurney on tech. Merge it and sync two occurrences.
ok krw@
|
|
* fix bug preventing sync after more than one rw -> ro cycle.
* sync data and not only metadata
ok guenther@
|