| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
OK mpi@
|
|
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
|
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
|
|
|
|
|
|
|
|
| |
are pushed to disk. Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are identified -- and
such filesystems are marked dirty on-disk while we are suspended (in case
power is lost, a fsck will be required). Filesystems without dangling or
busy vnodes are marked clean, resulting in faster boots following
"battery died" circumstances.
Tested by numerous developers, thanks for the feedback.
|
|
|
|
| |
ok deraadt@ 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
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
| |
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@
|
| |
|
| |
|
|
|
|
| |
ok kettenis@ krw@ natano@ dlg@ espie@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
e.g. print pointers with %p instead of %08x. No changes outside of
MSDOSFS_DEBUG.
|
|
|
|
| |
read without generating spurious headaches.
|
|
|
|
| |
define in sys/limits.h. OK guenther@
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
after discussions with beck deraadt 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@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the special provided when the mount was requested. This may be the same as
the special that was actually used for the mount (e.g. in the case of a
device node) or it may be different (e.g. in the case of a DUID).
Whilst here, change f_ctime to a 64 bit type and remove the pointless
f_spare members.
Compatibility goo courtesy of guenther@
ok krw@ millert@
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid using copyinstr() without checking the return value.
- sys_mount() has already copied the path in, so pass this to the
filesystem mount code so that it does not have to copy it in again.
- Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy().
ok krw@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/* something */
if (error) {
VOP_UNLOCK();
return;
}
VOP_UNLOCK();
to the clearer and shorter:
VOP_UNLOCK();
if (error)
return;
ok thib@, jsing@ as part of a larger diff.
|
|
|
|
|
|
|
|
|
|
| |
at least until problem (starting somewhere between 4.1 and 4.2)
in buffer cache is found and a general fix is in place. Simply
B_INVAL small buf so it doesn't come back.
Addresses PR#6290, confirmed by submitter RD Thrush.
ok tedu@ "should be marked XXX" thib@
|
|
|
|
|
|
|
| |
locking fixes. Tweak cd9660 code to be the same as everywhere else,
no functional change.
ok beck@
|
|
|
|
| |
miod@ deraadt@ ok.
|
|
|
|
| |
ok krw@
|
|
|
|
| |
ok thibski@
|
|
|
|
| |
"fine" thib@
|
|
|
|
|
|
|
|
|
|
|
| |
it. So leave it untouched. Similiar to but more ruthless than the
fixes FreeBSD did, since they do use the value. Basically avoid
various off-by-one and off-by-many errors.
Fixes problems encountered by jsg@ and deraadt@ where filesystems
found on SDHC cards caused UVM faults.
Original fixes found by jsg@. ok jsg@.
|
|
|
|
|
|
| |
64 instead of 63. deraadt@, weingart@, millert@, thib@, miod@ ok with
eliminating test entirely but tom@'s voice of caution wins out for the
quick commit. Tested by jsg@ to confirm it fixes his device.
|
|
|
|
| |
from Alexey Vatchenko; ok tom
|
|
|
|
|
| |
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an
immediately adjacent bzero().
|
|
|
|
|
|
|
|
|
| |
Zap all calls to simple_lock/unlock() on it (those calls are
#defined away though). Remove the LK_INTERLOCK from the calls
to vn_lock() and cleanup the filesystems wich implement VOP_LOCK().
(by remvoing the v_interlock from there calls to lockmgr()).
ok pedro@, art@, tedu@
|
|
|
|
|
|
|
|
|
| |
Enables devices (e.g. newer iPods, various other mp3 players) that use
2048 byte sectors.
Inspired by original diffs from weingart@ and Alexey Vatchenk.
ok tom@ pedro@ deraadt@ weingart@ marco@
|
|
|
|
|
|
|
|
| |
MSDOSFS code. Eliminates -G option to mount_msdos.
Nit detection by gwk@, tom@, jmc@.
ok weingart@ tom@ thib@ dlg@ deraadt@
|
|
|
|
| |
ok weingart@ pedro@
|
|
|
|
|
|
|
|
|
|
|
| |
represented in the FAT, limit the number of clusters we work with
to the FAT value. This stops corrupt filesystems causing us to run
off the end of the FAT and panic()ing in fillinusemap().
Found by Jason Crawford (jasonrcrawford at gmail.com) with the MOKB
fs fuzzer. Initial debugging by thib@.
ok krw@
|
|
|
|
| |
the error path; ok pedro
|
|
|
|
| |
Found using fuzz generator written by lmh@info-pull.com
|