freebsd-skq/sys/sys
truckman d2af5326c9 Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
struct bufs that are persistently held by ext2fs.  Ignore any buffers
with this flag in the code in boot() that counts "busy" and dirty
buffers and attempts to sync the dirty buffers, which is done before
attempting to unmount all the file systems during shutdown.

This fixes the problem caused by any ext2fs file systems that are
mounted at system shutdown time, which caused boot() to give up on
a non-zero number of buffers and skip the call to vfs_unmountall().
This left all the mounted file systems in a dirty state and caused
them to all require cleanup by fsck on reboot.

Move the two separate copies of the "busy" buffer test in boot()
to a separate function.

Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.

Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
this and previous flag changes.

PR:		kern/56675, kern/85163
Tested by:	"Matthias Andree" matthias.andree at gmx.de
Reviewed by:	bde
MFC after:	3 days
2005-09-08 06:30:05 +00:00
..
_iovec.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
_label.h
_lock.h
_mutex.h
_null.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
_pthreadtypes.h According to: 2005-05-31 15:18:17 +00:00
_semaphore.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
_sigset.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
_task.h o eliminate modification of task structures after their run to avoid 2005-04-24 16:52:45 +00:00
_timespec.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
_timeval.h
_types.h - Declare mknod in stat.h (in addition to unistd.h), as per XSI. 2005-03-22 01:19:18 +00:00
aac_ioctl.h
acct.h
acl.h Convert the primary ACL allocator from malloc(9) to using a UMA zone instead. 2005-09-06 00:06:30 +00:00
agpio.h
aio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
alq.h Modify the alq(9) alq_open() API to accept a file creation mode, rather 2005-04-16 12:12:27 +00:00
assym.h
ata.h Add definition for SATAII 3Gb/s mode. 2005-08-12 16:51:39 +00:00
bio.h - switch_point is now unused. This doesn't break module binary compatability 2005-06-12 22:33:06 +00:00
bitstring.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
blist.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
buf.h Add a new struct buf flag bit, B_PERSISTENT, and use it to tag 2005-09-08 06:30:05 +00:00
bufobj.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
bus_dma.h fix arm wrt to busdma... 2005-03-15 14:57:30 +00:00
bus.h resource_list_purge: release the resources in this list, and purge the 2005-04-12 15:20:36 +00:00
callout.h Add a mechanism for associating a mutex with a callout when the 2005-02-07 02:47:33 +00:00
cdefs.h Remove superfluous semicolon at the end of the __strong_reference() macro 2005-07-14 19:30:49 +00:00
cdio.h Boot away another stackgap (one of the lest ones in linuxlator/i386) by 2005-01-30 08:12:37 +00:00
cdrio.h
chio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
clist.h
clock.h
condvar.h
conf.h Handle device drivers with D_NEEDGIANT in a way which does not 2005-08-17 08:19:52 +00:00
cons.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
consio.h Remove the ADJUST_CLOCK ioctl on pc98. It's not used at all. 2005-05-15 07:35:49 +00:00
copyright.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
cpu.h Add a new field to struct cf_setting for special values. These are driver- 2005-02-19 06:13:26 +00:00
ctype.h
dataacq.h
device_port.h Remove code for pre-4.0 versions of FreeBSD. It is there in prior 2005-01-19 01:31:33 +00:00
devicestat.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
digiio.h
dir.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
dirent.h
disk.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
disklabel.h Treat arm as i386. 2005-04-07 22:09:02 +00:00
diskmbr.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
diskpc98.h Change DOSPTYP_386BSD to 0xc494. 2005-05-08 11:30:26 +00:00
dkstat.h
domain.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
dvdio.h
elf32.h
elf64.h
elf_common.h
elf_generic.h
endian.h
errno.h Add some missing errnos from POSIX. Nothing in FreeBSD generates 2005-04-02 12:33:28 +00:00
eui64.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
event.h Fix the recent panics/LORs/hangs created by my kqueue commit by: 2005-07-01 16:28:32 +00:00
eventhandler.h Use 'const char *' for a few prototypes. 2004-12-06 10:53:40 +00:00
eventvar.h
exec.h Make ps_nargvstr and ps_nenvstr unsigned. This fixes an input 2005-03-23 08:27:59 +00:00
extattr.h
fbio.h Grab FBTYPE_NOTSUN3 and use it for FBTYPE_PCIMISC. The value matches 2005-05-21 20:40:51 +00:00
fcntl.h
fdcio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
file.h Make some file/filedesc related functions static 2005-02-10 12:27:58 +00:00
filedesc.h Make some file/filedesc related functions static 2005-02-10 12:27:58 +00:00
filio.h Add ioctl to ask DEVFS about the name of device. 2005-03-08 21:32:19 +00:00
fnv_hash.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
gmon.h
gpt.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
iconv.h Fix panic when loading libiconv.ko on sparc64. 2005-09-05 17:03:40 +00:00
imgact_aout.h Capitalize at the start of sentence. 2005-05-08 02:20:10 +00:00
imgact_elf.h
imgact.h Welcome to the 21st century: increase MAXSHELLCMDLEN from 128 bytes to 2005-02-25 11:49:42 +00:00
inflate.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
interrupt.h Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
ioccom.h
ioctl_compat.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
ioctl.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
ipc.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
jail.h Rename sysctl security.jail.getfsstatroot_only to security.jail.enforce_statfs 2005-06-09 18:49:19 +00:00
joystick.h Comment typo. 2005-01-07 19:31:43 +00:00
kbio.h kbdmux(4) keyboard multiplexer integration 2005-07-14 22:43:20 +00:00
kdb.h Don't enter the debugger if KDB_UNATTENDED is set or if 2005-04-20 20:52:46 +00:00
kenv.h
kernel.h Convert the primary ACL allocator from malloc(9) to using a UMA zone instead. 2005-09-06 00:06:30 +00:00
kerneldump.h Switch AMD64 and i386 platforms to using ELF as their kernel crash 2005-06-29 22:28:46 +00:00
kobj.h Export a routine, kobj_machdep_init(), that allows platforms 2005-08-07 02:20:35 +00:00
kse.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
ksem.h Introduce MAC Framework and MAC Policy entry points to label and control 2005-05-04 10:39:15 +00:00
kthread.h
ktr.h Change default KTR_COMPILE from KTR_GEN to KTR_ALL, to match with 2005-09-02 19:34:13 +00:00
ktrace.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
libkern.h Add strcasecmp() and strncasecmp() to libkern and connect to the build. 2005-08-08 18:31:13 +00:00
limits.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
linedisc.h
link_aout.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
link_elf.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
linker_set.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
linker.h Add a new module information type MODINFOMD_SHDR that will be used 2004-08-27 01:10:16 +00:00
lock.h - Define LOP_DUPOK in lock.h so that we may pass it to individual 2005-04-22 22:37:41 +00:00
lockf.h - Make lf_print static and move its prototype into kern_lockf.c 2005-01-25 10:15:26 +00:00
lockmgr.h - Fix a problem that slipped through review; the stack member of the lockmgr 2005-08-03 04:59:07 +00:00
mac_policy.h Insert a series of place-holder function pointers in mac_policy.h for 2005-08-08 16:09:33 +00:00
mac.h When devfs cloning takes place, provide access to the credential of the 2005-07-14 10:22:09 +00:00
malloc.h End the MALLOC_DEFINE macro without the semi-colon, the caller supplies 2005-08-23 20:31:21 +00:00
mbpool.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
mbuf.h Unbreak m_demote() and put back the 'all' flag. Without it we cannot 2005-08-30 21:14:30 +00:00
mchain.h Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
md4.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
md5.h MD5Pad() should never have been exposed. 2005-02-10 12:20:42 +00:00
mdioctl.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
memrange.h
mman.h Namespace issues. 2005-04-02 12:33:31 +00:00
module.h
mount.h Holding a vnode doesn't prevent v_mount from disappearing (when the 2005-08-06 01:42:04 +00:00
mouse.h Support for the GTCO Digipad. 2005-04-13 07:25:45 +00:00
msg.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
msgbuf.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
mtio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
mutex.h Include a SYSUNINIT() to destroy the mutex in MTX_SYSINIT. This makes 2005-08-02 20:50:45 +00:00
namei.h - Add an ISOPEN flag that filesystems can use to determine if a namei() 2005-04-27 09:00:47 +00:00
nlist_aout.h
param.h Bump __FreeBSD_version for memmem(3). 2005-08-25 19:49:53 +00:00
pciio.h
pcpu.h Drop the CURPROC, curkse, and curksegrp aliases as they aren't used 2005-04-26 17:07:40 +00:00
pioctl.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pipe.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pmc.h sys/dev/hwpmc/hwpmc_{amd,piv,ppro}.c: 2005-07-09 17:29:36 +00:00
pmckern.h Fail the module loading process if the currently executing kernel 2005-07-30 09:02:42 +00:00
pmclog.h MFP4: 2005-06-30 19:01:26 +00:00
poll.h
posix4.h
power.h
priority.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
proc.h Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
procfs.h
protosw.h Embellish comment. 2005-08-11 15:35:59 +00:00
ptio.h
ptrace.h Jumbo-commit to enhance 32 bit application support on 64 bit kernels. 2005-06-30 07:49:22 +00:00
queue.h Fix typo so QUEUE_MACRO_DEBUG works again. 2005-08-08 05:43:57 +00:00
random.h Add a note ahea of the esource enum that if new entropy source 2004-10-12 14:55:59 +00:00
reboot.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
regression.h
resource.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
resourcevar.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
rman.h rman_set_device() seems to have been omitted by mistake. Implement it. 2005-04-12 06:21:59 +00:00
rtprio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
runq.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
sbuf.h
sched.h Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities 2005-04-19 04:01:25 +00:00
select.h
selinfo.h
sem.h In the kernel-only portionss of System V IPC objects (messages, 2004-11-17 13:12:06 +00:00
sema.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
semaphore.h
serial.h
sf_buf.h Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc(). 2004-11-08 00:43:46 +00:00
shm.h Change the data type of the upper shared memory limits from a signed 2005-08-06 07:20:18 +00:00
sigio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
signalvar.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
sleepqueue.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
smp.h Implement an alternate method to stop CPUs when entering DDB. Normally we use 2005-04-30 20:01:00 +00:00
snoop.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
socket.h Implement unix(4) socket options LOCAL_CREDS and LOCAL_CONNWAIT. 2005-04-13 00:01:46 +00:00
socketvar.h Document that SOCK_LOCK is used to protect so_emuldata. 2005-07-09 12:24:40 +00:00
sockio.h Add hooks into the networking layer to support if_bridge. This changes struct 2005-06-05 03:13:13 +00:00
soundcard.h OSS defines AFMT_x32_xE as: 2005-07-31 16:08:03 +00:00
stack.h Add 'depth' argument to CTRSTACK() macro, which allows to reduce number 2005-08-29 11:34:08 +00:00
stat.h - Declare mknod in stat.h (in addition to unistd.h), as per XSI. 2005-03-22 01:19:18 +00:00
statvfs.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
stddef.h
stdint.h
sun_disklabel.h Support VTOC volume names. This can be useful to distinguish multiple 2005-03-30 09:33:10 +00:00
sx.h Add a SYSUNINIT() to SX_SYSINIT() to call sx_destroy() to destroy the sx 2005-09-02 20:41:03 +00:00
syscall.h Regen. 2005-07-08 15:06:58 +00:00
syscall.mk Regen. 2005-07-08 15:06:58 +00:00
syscallsubr.h - Add two new system calls: preadv() and pwritev() which are like readv() 2005-07-07 18:17:55 +00:00
sysctl.h Add a sysctl that returns the full path of a process' text file. 2005-04-18 02:10:37 +00:00
sysent.h Add a new field, sy_auevent, to the system call entry description 2005-05-29 20:08:39 +00:00
syslimits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
syslog.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
sysproto.h Regen. 2005-07-08 15:06:58 +00:00
systm.h Avoid code duplication and implement bitcount32() function in systm.h only. 2005-08-19 22:10:19 +00:00
taskqueue.h o enable shutdown of taskqueue threads; the thread servicing the queue checks 2005-05-01 00:38:11 +00:00
termios.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
thr.h Add new syscall thr_new to create thread in atomic, it will 2005-04-23 02:36:07 +00:00
tiio.h
time.h Define CLOCK_* and TIMER_* in time.h, where they are supposed to be. 2005-04-02 12:33:27 +00:00
timeb.h
timepps.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
timers.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
times.h
timespec.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
timetc.h
timex.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
tree.h Make the default RB_AUGMENT() produce a 'do {} while (0)' instead 2005-06-10 11:44:57 +00:00
tty.h Add new function ttyinitmode() which sets our systemwide default 2004-10-18 21:51:27 +00:00
ttychars.h
ttycom.h
ttydefaults.h Restore TTYDEF_LFLAG to set echo bits. 2004-11-03 19:16:55 +00:00
ttydev.h
turnstile.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
types.h According to: 2005-05-31 15:18:17 +00:00
ucontext.h
ucred.h Correct a comment in ucred.h. 2005-06-28 02:23:56 +00:00
uio.h - Add two new system calls: preadv() and pwritev() which are like readv() 2005-07-07 18:17:55 +00:00
umtx.h Allocate umtx_q from heap instead of stack, this avoids 2005-03-05 09:15:03 +00:00
un.h Implement unix(4) socket options LOCAL_CREDS and LOCAL_CONNWAIT. 2005-04-13 00:01:46 +00:00
unistd.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
unpcb.h Implement unix(4) socket options LOCAL_CREDS and LOCAL_CONNWAIT. 2005-04-13 00:01:46 +00:00
user.h Re-arrange some variables in kinfo_proc, and add more spare room. This 2005-06-09 19:09:02 +00:00
utsname.h
uuid.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vmmeter.h
vnode.h Holding a vnode doesn't prevent v_mount from disappearing (when the 2005-08-06 01:42:04 +00:00
wait.h - Move the function prototypes for kern_setrlimit() and kern_wait() to 2005-01-05 22:19:44 +00:00
watchdog.h
xrpuio.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00