GENERIC HEAD from 2009-12-18 22:14:28 UTC, r200709M, vmcore.19 KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-CURRENT #0 r200709M: Sun Dec 20 08:04:39 CET 2009 pho@crashbox.osted.lan:/usr/src/sys/i386/compile/PHO i386 WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) XEON(TM) CPU 1.80GHz (1799.80-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf24 Stepping = 4 Features=0x3febfbff real memory = 1073741824 (1024 MB) avail memory = 1031364608 (983 MB) : Trying to mount root from ufs:/dev/ad0s1a Entropy harvesting: interrupts ethernet point_to_point kickstart. /dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1a: clean, 269182 free (646 frags, 33567 blocks, 0.1% fragmentation) /dev/ad0s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1f: clean, 449613 free (501 frags, 56139 blocks, 0.1% fragmentation) /dev/ad0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1d: clean, 2844610 free (51370 frags, 349155 blocks, 1.0% fragmentation) /dev/ad0s1g: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1g: clean, 21099621 free (23437 frags, 2634523 blocks, 0.1% fragmentation) lock order reversal: 1st 0xd85049e0 bufwait (bufwait) @ kern/vfs_bio.c:2559 2nd 0xc4a71400 dirhash (dirhash) @ ufs/ufs/ufs_dirhash.c:283 KDB: stack backtrace: db_trace_self_wrapper(c0ca318a,e6d1d880,c08d1d85,c08c286b,c0ca612e,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c286b,c0ca612e,c4539030,c453c290,e6d1d8dc,...) at kdb_backtrace+0x29 _witness_debugger(c0ca612e,c4a71400,c0cc92aa,c453c290,c0cc8f50,...) at _witness_debugger+0x25 witness_checkorder(c4a71400,9,c0cc8f47,11b,0,...) at witness_checkorder+0x839 _sx_xlock(c4a71400,0,c0cc8f47,11b,c4b00cb0,...) at _sx_xlock+0x85 ufsdirhash_acquire(d8504980,e6d1da1c,164,d8bbd4ac,e6d1d9a8,...) at ufsdirhash_acquire+0x48 ufsdirhash_add(c4b00cb0,e6d1da1c,4ac,e6d1d994,e6d1d998,...) at ufsdirhash_add+0x13 ufs_direnter(c4b08c3c,c4bfad98,e6d1da1c,e6d1dc00,d85073c0,...) at ufs_direnter+0x669 ufs_mkdir(e6d1dc28,c0cde90a,0,0,e6d1db6c,...) at ufs_mkdir+0x981 VOP_MKDIR_APV(c0daee60,e6d1dc28,e6d1dc00,e6d1db6c,0,...) at VOP_MKDIR_APV+0xc5 kern_mkdirat(c481c900,ffffff9c,bfbfef5a,0,1ff,...) at kern_mkdirat+0x21b kern_mkdir(c481c900,bfbfef5a,0,1ff,e6d1dd2c,...) at kern_mkdir+0x2e mkdir(c481c900,e6d1dcf8,8,c0ca69f4,c0d8d040,...) at mkdir+0x29 syscall(e6d1dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2816a5c3, esp = 0xbfbfed6c, ebp = 0xbfbfee38 --- fxp0: link state changed to UP Starting Network: lo0 fxp0. add net default: gateway 192.168.1.1 Additional ABI support: linux. Starting mountd. Configuring syscons: keymap blanktime. Local package initialization:lock order reversal: 1st 0xc4bfa46c ufs (ufs) @ kern/vfs_subr.c:2083 2nd 0xd8511b80 bufwait (bufwait) @ ufs/ffs/ffs_softdep.c:9638 3rd 0xc4d9e1b4 ufs (ufs) @ kern/vfs_subr.c:2083 KDB: stack backtrace: db_trace_self_wrapper(c0ca318a,e6e0985c,c08d1d85,c08c286b,c0ca6147,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c286b,c0ca6147,c4539030,c453c228,e6e098b8,...) at kdb_backtrace+0x29 _witness_debugger(c0ca6147,c4d9e1b4,c0c988fb,c453c228,c0cad317,...) at _witness_debugger+0x25 witness_checkorder(c4d9e1b4,9,c0cad30e,823,0,...) at witness_checkorder+0x839 __lockmgr_args(c4d9e1b4,80100,c4d9e220,0,0,...) at __lockmgr_args+0x824 ffs_lock(e6e099d8,c08d1b2b,c0cac7f5,80100,c4d9e15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e099d8,109,c0dc9820,c4d9e15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c4d9e15c,80100,c0cad30e,823,4,...) at _vn_lock+0x78 vget(c4d9e15c,80100,c4dd7240,50,0,...) at vget+0xbb vfs_hash_get(c4c072d4,50800,80000,c4dd7240,e6e09b38,...) at vfs_hash_get+0xed ffs_vgetf(c4c072d4,50800,80000,e6e09b38,1,...) at ffs_vgetf+0x49 softdep_sync_metadata(c4bfa414,0,c0cc8b93,146,0,...) at softdep_sync_metadata+0x583 ffs_syncvnode(c4bfa414,1,c4dd7240,51f,c4bfa2b8,...) at ffs_syncvnode+0x3e2 ffs_sync(c4c072d4,1,c0cacb0c,4f9,80,...) at ffs_sync+0x26f dounmount(c4c072d4,8000000,c4dd7240,47e,7fdd8c82,...) at dounmount+0x44e unmount(c4dd7240,e6e09cf8,8,c4dd7240,c0d8c3c8,...) at unmount+0x2ff syscall(e6e09d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (22, FreeBSD ELF32, unmount), eip = 0x280da13f, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- lock order reversal: 1st 0xc4bfc310 ufs (ufs) @ kern/vfs_mount.c:1204 2nd 0xc4ad3724 devfs (devfs) @ ufs/ffs/ffs_softdep.c:1273 KDB: stack backtrace: db_trace_self_wrapper(c0ca318a,e6e099dc,c08d1d85,c08c286b,c0ca612e,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c286b,c0ca612e,c453c228,c453c0f0,e6e09a38,...) at kdb_backtrace+0x29 _witness_debugger(c0ca612e,c4ad3724,c0c947fd,c453c0f0,c0cc6350,...) at _witness_debugger+0x25 witness_checkorder(c4ad3724,9,c0cc6347,4f9,c4ad3790,...) at witness_checkorder+0x839 __lockmgr_args(c4ad3724,80400,c4ad3790,0,0,...) at __lockmgr_args+0x824 vop_stdlock(e6e09b54,c0c9e4d3,df,80400,c4ad36cc,...) at vop_stdlock+0x65 VOP_LOCK1_APV(c0d88600,e6e09b54,0,c0dc9820,c4ad36cc,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c4ad36cc,80400,c0cc6347,4f9,c4c072d4,...) at _vn_lock+0x78 softdep_flushworklist(c4c072d4,e6e09c00,c4dd7240,52d,c4bfa2b8,...) at softdep_flushworklist+0x47 ffs_sync(c4c072d4,1,c0cacb0c,4f9,80,...) at ffs_sync+0x2fd dounmount(c4c072d4,8000000,c4dd7240,47e,7fdd8c82,...) at dounmount+0x44e unmount(c4dd7240,e6e09cf8,8,c4dd7240,c0d8c3c8,...) at unmount+0x2ff syscall(e6e09d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (22, FreeBSD ELF32, unmount), eip = 0x280da13f, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- ** /dev/ad0s1e ** Last Mounted on /tmp ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 4797 files, 33105 used, 1995926 free (686 frags, 249405 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN ***** usage: kill [-s signal_name] pid ... kill -l [exit_status] kill -signal_name pid ... kill -signal_number pid ... fsck -y /tmp watchdogd. Sun Dec 20 11:33:08 CET 2009 Dec 20 11:34:40 crashbox su: pho to root on /dev/pts/0 Expensive timeout(9) function: 0xc08eccb0(0) 0.079614554 s Expensive timeout(9) function: 0xc0aeb100(0) 0.592524135 s Expensive timeout(9) function: 0xc0aeb100(0) 3.713817237 s Expensive timeout(9) function: 0xc0aeb100(0) 1.878836194 s handle_workitem_freeblocks: block count handle_workitem_freeblocks: block count panic: flush_pagedep_deps: MKDIR_BODY cpuid = 2 KDB: enter: panic [thread pid 38582 tid 100340 ] Stopped at kdb_enter+0x3a: movl $0,kdb_why db> run pho db:0:pho> bt Tracing pid 38582 tid 100340 td 0xc8cfc6c0 kdb_enter(c0c9fd4b,c0c9fd4b,c0cc83f4,e712b638,2,...) at kdb_enter+0x3a panic(c0cc83f4,0,c0cc6347,2384,0,...) at panic+0x136 softdep_sync_metadata(c500f15c,0,c0cc8b93,146,0,...) at softdep_sync_metadata+0x8eb ffs_syncvnode(c500f15c,1,c4539030,c0f3b6d8,e712b740,...) at ffs_syncvnode+0x3e2 ffs_truncate(c500f15c,e00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c500f15c,cb71c6cc,e712b9f8,e712bc00,0,...) at ufs_direnter+0x846 ufs_makeinode(e712bc00,c09212ff,c0daee60,e712bb28,c0daf360,...) at ufs_makeinode+0x595 ufs_mknod(e712bc28,c0cdea8e,0,0,e712bb6c,...) at ufs_mknod+0x35 VOP_MKNOD_APV(c0daee60,e712bc28,e712bc00,e712bb6c,0,...) at VOP_MKNOD_APV+0xc5 kern_mkfifoat(c8cfc6c0,ffffff9c,804d240,0,1b6,...) at kern_mkfifoat+0x217 kern_mkfifo(c8cfc6c0,804d240,0,1b6,e712bd2c,...) at kern_mkfifo+0x2e mkfifo(c8cfc6c0,e712bcf8,8,c0ca693c,c0d8cfd0,...) at mkfifo+0x29 syscall(e712bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (132, FreeBSD ELF32, mkfifo), eip = 0x280eabdb, esp = 0xbfbfe72c, ebp = 0xbfbfe758 --- db:0:bt> show allpcpu Current CPU: 2 cpuid = 0 dynamic pcpu = 0x65b100 curthread = 0xc52ca480: pid 38601 "link" curpcb = 0xe7296d90 fpcurthread = none idlethread = 0xc457d480: pid 11 "idle: cpu0" APIC ID = 0 currentldt = 0x50 spin locks held: cpuid = 1 dynamic pcpu = 0x34f1100 curthread = 0xc457d6c0: pid 11 "idle: cpu1" curpcb = 0xc42e1d90 fpcurthread = none idlethread = 0xc457d6c0: pid 11 "idle: cpu1" APIC ID = 1 currentldt = 0x50 spin locks held: cpuid = 2 dynamic pcpu = 0x34f4100 curthread = 0xc8cfc6c0: pid 38582 "mkfifo" curpcb = 0xe712bd90 fpcurthread = none idlethread = 0xc457d900: pid 11 "idle: cpu2" APIC ID = 6 currentldt = 0x50 spin locks held: cpuid = 3 dynamic pcpu = 0x34f7100 curthread = 0xc519e000: pid 38658 "rename" curpcb = 0xe6ed5d90 fpcurthread = none idlethread = 0xc457db40: pid 11 "idle: cpu3" APIC ID = 7 currentldt = 0x50 spin locks held: db:0:allpcpu> show alllocks Process 38673 (rw) thread 0xc519d240 (100175) exclusive lockmgr bufwait (bufwait) r = 0 (0xd85de2a0) locked @ kern/vfs_bio.c:2559 exclusive lockmgr ufs (ufs) r = 0 (0xc5209310) locked @ kern/vfs_vnops.c:607 Process 38672 (rw) thread 0xc519b6c0 (100181) exclusive lockmgr ufs (ufs) r = 0 (0xc62c6c94) locked @ kern/vfs_vnops.c:607 Process 38671 (rw) thread 0xc79ec000 (100192) exclusive lockmgr ufs (ufs) r = 0 (0xc52099dc) locked @ kern/vfs_vnops.c:607 Process 38670 (rw) thread 0xc4b0c900 (100064) exclusive lockmgr ufs (ufs) r = 0 (0xc662b310) locked @ kern/vfs_vnops.c:607 Process 38669 (rw) thread 0xc5360240 (100375) exclusive lockmgr ufs (ufs) r = 0 (0xc662bb38) locked @ kern/vfs_vnops.c:607 Process 38668 (rw) thread 0xc517c6c0 (100155) exclusive lockmgr ufs (ufs) r = 0 (0xc69b2724) locked @ kern/vfs_vnops.c:607 Process 38667 (rw) thread 0xc8d54480 (100327) exclusive lockmgr ufs (ufs) r = 0 (0xc69b2c94) locked @ kern/vfs_vnops.c:607 Process 38666 (rw) thread 0xc52c5900 (100408) exclusive lockmgr ufs (ufs) r = 0 (0xc62c646c) locked @ kern/vfs_vnops.c:607 Process 38665 (rw) thread 0xc804ab40 (100242) exclusive lockmgr ufs (ufs) r = 0 (0xc5209880) locked @ kern/vfs_vnops.c:607 Process 38664 (rw) thread 0xc5007480 (100131) exclusive lockmgr ufs (ufs) r = 0 (0xc69b2310) locked @ kern/vfs_vnops.c:607 Process 38663 (rw) thread 0xc6e32000 (100354) exclusive lockmgr ufs (ufs) r = 0 (0xc771646c) locked @ kern/vfs_vnops.c:607 Process 38662 (rw) thread 0xc5008480 (100152) exclusive lockmgr ufs (ufs) r = 0 (0xc5209df0) locked @ kern/vfs_vnops.c:607 Process 38661 (rw) thread 0xc4ae9480 (100063) exclusive lockmgr ufs (ufs) r = 0 (0xc62c6880) locked @ kern/vfs_vnops.c:607 Process 38660 (rw) thread 0xc6e34240 (100346) exclusive lockmgr ufs (ufs) r = 0 (0xcb4555c8) locked @ kern/vfs_vnops.c:607 Process 38659 (rename) thread 0xc8d54d80 (100355) exclusive lockmgr ufs (ufs) r = 0 (0xcb664724) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc5650724) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38658 (rename) thread 0xc519e000 (100169) exclusive lockmgr bufwait (bufwait) r = 0 (0xd8754ba0) locked @ kern/vfs_bio.c:2559 exclusive lockmgr ufs (ufs) r = 0 (0xcaf9046c) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc637346c) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38657 (rename) thread 0xc804c480 (100308) exclusive lockmgr ufs (ufs) r = 0 (0xc4f92724) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc5f05b38) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38656 (rename) thread 0xc804a6c0 (100300) exclusive lockmgr ufs (ufs) r = 0 (0xcb3f1724) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc6349b38) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38655 (rename) thread 0xc52c5240 (100411) exclusive lockmgr ufs (ufs) r = 0 (0xcb4b9c94) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xcb67c310) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38654 (rename) thread 0xc6e4f000 (100365) exclusive lockmgr ufs (ufs) r = 0 (0xc6fb646c) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc65bc46c) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38653 (rename) thread 0xc4b2cb40 (100075) exclusive lockmgr bufwait (bufwait) r = 0 (0xd863bb40) locked @ kern/vfs_bio.c:2559 exclusive lockmgr ufs (ufs) r = 0 (0xc5670310) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xcb6aa724) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38652 (rename) thread 0xc4c39900 (100082) exclusive lockmgr ufs (ufs) r = 0 (0xc6351058) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc655bc94) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38650 (rename) thread 0xc6e346c0 (100344) exclusive lockmgr ufs (ufs) r = 0 (0xc52fa880) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc57b9058) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38648 (rename) thread 0xc8a7a900 (100282) exclusive lockmgr ufs (ufs) r = 0 (0xc61e0058) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc67e8724) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38647 (rename) thread 0xc47f7000 (100430) exclusive lockmgr bufwait (bufwait) r = 0 (0xd8799e40) locked @ kern/vfs_bio.c:2559 exclusive lockmgr ufs (ufs) r = 0 (0xcb4b69dc) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xc60fc724) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38641 (creat) thread 0xc4b2c000 (100136) exclusive lockmgr ufs (ufs) r = 0 (0xc5a33c94) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb67c9dc) locked @ kern/vfs_lookup.c:497 Process 38639 (creat) thread 0xc861dd80 (100257) exclusive lockmgr ufs (ufs) r = 0 (0xc5193c94) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xc67fa9dc) locked @ kern/vfs_lookup.c:497 Process 38635 (rename) thread 0xc5006900 (100248) exclusive lockmgr ufs (ufs) r = 0 (0xc4de25c8) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xcb3eddf0) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38634 (rename) thread 0xc8a7b900 (100275) exclusive lockmgr ufs (ufs) r = 0 (0xc563bdf0) locked @ ufs/ufs/ufs_vnops.c:1099 exclusive lockmgr ufs (ufs) r = 1 (0xcb614724) locked @ ufs/ufs/ufs_vnops.c:1104 Process 38622 (creat) thread 0xc5008d80 (100148) exclusive lockmgr ufs (ufs) r = 0 (0xc5a33310) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xc5e095c8) locked @ kern/vfs_lookup.c:497 Process 38616 (lockf2) thread 0xc6e4fb40 (100360) exclusive sx ls_lock (ls_lock) r = 0 (0xc78d7988) locked @ kern/kern_lockf.c:641 Process 38604 (lockf2) thread 0xc4c03d80 (100107) exclusive sx ls_lock (ls_lock) r = 0 (0xc826dd88) locked @ kern/kern_lockf.c:641 Process 38603 (creat) thread 0xc52c1240 (100418) exclusive lockmgr ufs (ufs) r = 0 (0xc66a7058) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb3c6b38) locked @ kern/vfs_lookup.c:497 Process 38602 (creat) thread 0xc8a7a240 (100285) exclusive lockmgr ufs (ufs) r = 0 (0xc5a331b4) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb6dc880) locked @ kern/vfs_lookup.c:497 Process 38601 (link) thread 0xc52ca480 (100435) exclusive lockmgr ufs (ufs) r = 0 (0xc62c6df0) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb689b38) locked @ kern/vfs_lookup.c:497 Process 38600 (creat) thread 0xc4c03000 (100092) exclusive lockmgr bufwait (bufwait) r = 0 (0xd85f1aa0) locked @ kern/vfs_bio.c:1835 exclusive lockmgr ufs (ufs) r = 0 (0xc63a25c8) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb3e0880) locked @ kern/vfs_lookup.c:497 Process 38599 (link) thread 0xc517cd80 (100201) exclusive lockmgr ufs (ufs) r = 0 (0xc5214df0) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb65d724) locked @ kern/vfs_lookup.c:497 Process 38598 (creat) thread 0xc4b306c0 (100215) exclusive lockmgr ufs (ufs) r = 0 (0xc5a33df0) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb386df0) locked @ kern/vfs_lookup.c:497 Process 38597 (link) thread 0xc535f000 (100383) exclusive lockmgr ufs (ufs) r = 0 (0xc662b5c8) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb57f724) locked @ kern/vfs_lookup.c:497 Process 38596 (creat) thread 0xc519d480 (100174) exclusive lockmgr ufs (ufs) r = 0 (0xc5a335c8) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xcb7145c8) locked @ kern/vfs_lookup.c:497 Process 38595 (link) thread 0xc8cfb240 (100317) exclusive lockmgr ufs (ufs) r = 0 (0xc5214c94) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb612c94) locked @ kern/vfs_lookup.c:497 Process 38594 (link) thread 0xc5158240 (100146) exclusive lockmgr ufs (ufs) r = 0 (0xc69085c8) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb4f7310) locked @ kern/vfs_lookup.c:497 Process 38585 (symlink) thread 0xc79ec240 (100191) exclusive lockmgr ufs (ufs) r = 0 (0xc66a7724) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xc6f55c94) locked @ kern/vfs_lookup.c:497 Process 38582 (mkfifo) thread 0xc8cfc6c0 (100340) exclusive sleep mutex Softdep Lock (Softdep Lock) r = 0 (0xc0f76cb0) locked @ ufs/ffs/ffs_softdep.c:9092 exclusive lockmgr bufwait (bufwait) r = 0 (0xd85f7a80) locked @ ufs/ffs/ffs_softdep.c:9638 exclusive lockmgr ufs (ufs) r = 0 (0xc500f1b4) locked @ kern/vfs_lookup.c:497 Process 38579 (symlink) thread 0xc79ec900 (100229) exclusive lockmgr ufs (ufs) r = 0 (0xc63a2df0) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xc6f55058) locked @ kern/vfs_lookup.c:497 Process 38577 (lockf2) thread 0xc8a7b480 (100277) exclusive sx ls_lock (ls_lock) r = 0 (0xca385d08) locked @ kern/kern_lockf.c:641 Process 38574 (symlink) thread 0xc481cd80 (100069) exclusive lockmgr ufs (ufs) r = 0 (0xc63a2b38) locked @ ufs/ffs/ffs_vfsops.c:1467 exclusive lockmgr ufs (ufs) r = 0 (0xc58a1df0) locked @ kern/vfs_lookup.c:497 Process 38568 (lockf2) thread 0xc8d52240 (100335) exclusive sx ls_lock (ls_lock) r = 0 (0xc7c0f888) locked @ kern/kern_lockf.c:641 Process 38567 (link) thread 0xc5159900 (100168) exclusive lockmgr ufs (ufs) r = 0 (0xc6908724) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb6899dc) locked @ kern/vfs_lookup.c:497 Process 38566 (link) thread 0xc47f7b40 (100425) exclusive lockmgr ufs (ufs) r = 0 (0xc69b2058) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xc51e0058) locked @ kern/vfs_lookup.c:497 Process 38565 (link) thread 0xc8a7ab40 (100281) exclusive lockmgr ufs (ufs) r = 0 (0xc69b29dc) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb718c94) locked @ kern/vfs_lookup.c:497 Process 38564 (link) thread 0xc4dd6240 (100186) exclusive lockmgr ufs (ufs) r = 0 (0xc6908058) locked @ kern/vfs_syscalls.c:1593 exclusive lockmgr ufs (ufs) r = 0 (0xcb68e058) locked @ kern/vfs_lookup.c:497 Process 1135 (sshd) thread 0xc5007000 (100176) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc5e5d08c) locked @ kern/uipc_sockbuf.c:148 Process 1134 (sshd) thread 0xc4b0a900 (100120) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc4c4608c) locked @ kern/uipc_sockbuf.c:148 Process 1133 (sshd) thread 0xc50076c0 (100130) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc4daa08c) locked @ kern/uipc_sockbuf.c:148 Process 1058 (sshd) thread 0xc4dd7240 (100116) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc4c4d898) locked @ kern/uipc_sockbuf.c:148 Process 18 (softdepflush) thread 0xc4768900 (100049) exclusive lockmgr bufwait (bufwait) r = 0 (0xd85e1ec0) locked @ kern/vfs_bio.c:1835 db:0:alllocks> show lockedvnods Locked vnodes 0xc500f15c: tag ufs, type VDIR usecount 120, writecount 0, refcount 132 mountedhere 0 flags () v_object 0xc519a990 ref 0 pages 2 lock type ufs: EXCL by thread 0xc8cfc6c0 (pid 38582) with shared waiters pending #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc0927ef8 at kern_mkfifoat+0x68 #7 0xc092814e at kern_mkfifo+0x2e #8 0xc0928179 at mkfifo+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 423936, on dev ad0s1e 0xcb68e000: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696e000 ref 0 pages 3 lock type ufs: EXCL by thread 0xc4dd6240 (pid 38564) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424003, on dev ad0s1e 0xcb612c3c: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696eee0 ref 0 pages 3 lock type ufs: EXCL by thread 0xc8cfb240 (pid 38595) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424004, on dev ad0s1e 0xcb57f6cc: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696ecc0 ref 0 pages 1 lock type ufs: EXCL by thread 0xc535f000 (pid 38597) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424005, on dev ad0s1e 0xcb4f72b8: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696e088 ref 0 pages 3 lock type ufs: EXCL by thread 0xc5158240 (pid 38594) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424006, on dev ad0s1e 0xcb689ae0: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696e770 ref 0 pages 3 lock type ufs: EXCL by thread 0xc52ca480 (pid 38601) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424007, on dev ad0s1e 0xcb689984: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696e330 ref 0 pages 4 lock type ufs: EXCL by thread 0xc5159900 (pid 38567) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424010, on dev ad0s1e 0xcb65d6cc: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc696e6e8 ref 0 pages 4 lock type ufs: EXCL by thread 0xc517cd80 (pid 38599) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424012, on dev ad0s1e 0xc5e09570: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc696e110 ref 0 pages 0 lock type ufs: EXCL by thread 0xc5008d80 (pid 38622) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424015, on dev ad0s1e 0xcb67c984: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc696e440 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4b2c000 (pid 38641) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424018, on dev ad0s1e 0xcb6146cc: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc696eb28 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7b900 (pid 38634) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424019, on dev ad0s1e 0xc57b9000: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc696e198 ref 0 pages 0 lock type ufs: EXCL by thread 0xc6e346c0 (pid 38650) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424022, on dev ad0s1e 0xc60fc6cc: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc6c48ee0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc47f7000 (pid 38647) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424023, on dev ad0s1e 0xc6349ae0: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc616fbb0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc804a6c0 (pid 38656) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424024, on dev ad0s1e 0xc67fa984: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc616fdd0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc861dd80 (pid 38639) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424029, on dev ad0s1e 0xc67e86cc: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc616fc38 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7a900 (pid 38648) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424032, on dev ad0s1e 0xc5f05ae0: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc531e110 ref 0 pages 0 lock type ufs: EXCL by thread 0xc804c480 (pid 38657) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424033, on dev ad0s1e 0xc56506cc: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc531e908 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8d54d80 (pid 38659) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424035, on dev ad0s1e 0xc655bc3c: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc531e440 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4c39900 (pid 38652) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424041, on dev ad0s1e 0xc65bc414: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc531edd0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc6e4f000 (pid 38654) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424044, on dev ad0s1e 0xc6373414: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc77c0aa0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc519e000 (pid 38658) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424063, on dev ad0s1e 0xcb6aa6cc: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc6e8ae58 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4b2cb40 (pid 38653) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424064, on dev ad0s1e 0xcb67c2b8: tag ufs, type VDIR usecount 5, writecount 0, refcount 7 mountedhere 0 flags () v_object 0xc4b277f8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc52c5240 (pid 38655) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424066, on dev ad0s1e 0xcb718c3c: tag ufs, type VDIR usecount 2, writecount 0, refcount 6 mountedhere 0 flags () v_object 0xc4b27198 ref 0 pages 1 lock type ufs: EXCL by thread 0xc8a7ab40 (pid 38565) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424002, on dev ad0s1e 0xc51e0000: tag ufs, type VDIR usecount 2, writecount 0, refcount 8 mountedhere 0 flags () v_object 0xc4b27e58 ref 0 pages 10 lock type ufs: EXCL by thread 0xc47f7b40 (pid 38566) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092971c at kern_linkat+0x16c #7 0xc09299be at kern_link+0x3e #8 0xc09299e9 at link+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424065, on dev ad0s1e 0xc58a1d98: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc4b27660 ref 0 pages 0 lock type ufs: EXCL by thread 0xc481cd80 (pid 38574) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc0926714 at kern_symlinkat+0xc4 #7 0xc092699e at kern_symlink+0x2e #8 0xc09269c9 at symlink+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424075, on dev ad0s1e 0xc6f55000: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc4b27110 ref 0 pages 0 lock type ufs: EXCL by thread 0xc79ec900 (pid 38579) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc0926714 at kern_symlinkat+0xc4 #7 0xc092699e at kern_symlink+0x2e #8 0xc09269c9 at symlink+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424076, on dev ad0s1e 0xc6f55c3c: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc531e7f8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc79ec240 (pid 38585) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc0926714 at kern_symlinkat+0xc4 #7 0xc092699e at kern_symlink+0x2e #8 0xc09269c9 at symlink+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424077, on dev ad0s1e 0xcb714570: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc4b27ee0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc519d480 (pid 38596) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424078, on dev ad0s1e 0xcb386d98: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc5f99ee0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4b306c0 (pid 38598) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424079, on dev ad0s1e 0xcb6dc828: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc70fddd0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7a240 (pid 38602) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424080, on dev ad0s1e 0xcb3c6ae0: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc5225d48 ref 0 pages 0 lock type ufs: EXCL by thread 0xc52c1240 (pid 38603) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424081, on dev ad0s1e 0xcb3e0828: tag ufs, type VDIR usecount 2, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc5225088 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4c03000 (pid 38600) #0 0xc08771f2 at __lockmgr_args+0x592 #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0915096 at lookup+0x106 #5 0xc091644f at namei+0x57f #6 0xc092dbc0 at vn_open_cred+0x90 #7 0xc092e12b at vn_open+0x3b #8 0xc092bf2f at kern_openat+0x11f #9 0xc092c495 at kern_open+0x35 #10 0xc092c4d0 at open+0x30 #11 0xc0bcc5a4 at syscall+0x2b4 #12 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424082, on dev ad0s1e 0xcb3edd98: tag ufs, type VDIR usecount 7, writecount 0, refcount 9 mountedhere 0 flags () v_object 0xc5f995d8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc5006900 (pid 38635) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3b9e at ufs_rename+0x1ae #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424083, on dev ad0s1e 0xcb455570: tag ufs, type VREG usecount 1, writecount 1, refcount 1519 mountedhere 0 flags () v_object 0xc696e3b8 ref 0 pages 6068 lock type ufs: EXCL by thread 0xc6e34240 (pid 38660) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424085, on dev ad0s1e 0xc61e0000: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc6617dd0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7a900 (pid 38648) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424613, on dev ad0s1e 0xc6fb6414: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc6e5b000 ref 0 pages 0 lock type ufs: EXCL by thread 0xc6e4f000 (pid 38654) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424714, on dev ad0s1e 0xc52fa828: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc774a330 ref 0 pages 0 lock type ufs: EXCL by thread 0xc6e346c0 (pid 38650) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 424856, on dev ad0s1e 0xc56702b8: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc68da198 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4b2cb40 (pid 38653) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425104, on dev ad0s1e 0xcb6646cc: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc50e2220 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8d54d80 (pid 38659) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425173, on dev ad0s1e 0xcaf90414: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc76c7c38 ref 0 pages 0 lock type ufs: EXCL by thread 0xc519e000 (pid 38658) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425390, on dev ad0s1e 0xcb4b6984: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc76c7b28 ref 0 pages 0 lock type ufs: EXCL by thread 0xc47f7000 (pid 38647) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425432, on dev ad0s1e 0xcb4b9c3c: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc5dc3770 ref 0 pages 0 lock type ufs: EXCL by thread 0xc52c5240 (pid 38655) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425729, on dev ad0s1e 0xcb3f16cc: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc61ffa18 ref 0 pages 0 lock type ufs: EXCL by thread 0xc804a6c0 (pid 38656) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 425953, on dev ad0s1e 0xc4de2570: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc6e0c880 ref 0 pages 0 lock type ufs: EXCL by thread 0xc5006900 (pid 38635) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426030, on dev ad0s1e 0xc4f926cc: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc5eb2550 ref 0 pages 0 lock type ufs: EXCL by thread 0xc804c480 (pid 38657) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426093, on dev ad0s1e 0xc563bd98: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc5ea8330 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7b900 (pid 38634) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426249, on dev ad0s1e 0xc6351000: tag ufs, type VREG usecount 1, writecount 0, refcount 2 mountedhere 0 flags () v_object 0xc6ded3b8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4c39900 (pid 38652) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc0ae3bce at ufs_rename+0x1de #5 0xc0be59e5 at VOP_RENAME_APV+0xa5 #6 0xc092a127 at kern_renameat+0x307 #7 0xc092a2d6 at kern_rename+0x36 #8 0xc092a309 at rename+0x29 #9 0xc0bcc5a4 at syscall+0x2b4 #10 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426289, on dev ad0s1e 0xc69086cc: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc5ea8aa0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc5159900 (pid 38567) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426300, on dev ad0s1e 0xc62c6d98: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc667edd0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc52ca480 (pid 38601) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426301, on dev ad0s1e 0xc6908570: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc667e110 ref 0 pages 0 lock type ufs: EXCL by thread 0xc5158240 (pid 38594) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426302, on dev ad0s1e 0xc6908000: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc5ea85d8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc4dd6240 (pid 38564) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426303, on dev ad0s1e 0xc5214c3c: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc6f017f8 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8cfb240 (pid 38595) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426304, on dev ad0s1e 0xc5214d98: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc4b40770 ref 0 pages 0 lock type ufs: EXCL by thread 0xc517cd80 (pid 38599) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426305, on dev ad0s1e 0xc5209d98: tag ufs, type VREG usecount 1, writecount 1, refcount 64 mountedhere 0 flags () v_object 0xc6f01000 ref 0 pages 248 lock type ufs: EXCL by thread 0xc5008480 (pid 38662) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426306, on dev ad0s1e 0xc52092b8: tag ufs, type VREG usecount 1, writecount 1, refcount 121 mountedhere 0 flags () v_object 0xc6dedc38 ref 0 pages 476 lock type ufs: EXCL by thread 0xc519d240 (pid 38673) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426307, on dev ad0s1e 0xc5209984: tag ufs, type VREG usecount 1, writecount 1, refcount 66 mountedhere 0 flags () v_object 0xc52227f8 ref 0 pages 256 lock type ufs: EXCL by thread 0xc79ec000 (pid 38671) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426308, on dev ad0s1e 0xc5209828: tag ufs, type VREG usecount 1, writecount 1, refcount 72 mountedhere 0 flags () v_object 0xc4b40b28 ref 0 pages 280 lock type ufs: EXCL by thread 0xc804ab40 (pid 38665) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426309, on dev ad0s1e 0xc69b26cc: tag ufs, type VREG usecount 1, writecount 1, refcount 113 mountedhere 0 flags () v_object 0xc6f01088 ref 0 pages 444 lock type ufs: EXCL by thread 0xc517c6c0 (pid 38668) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426310, on dev ad0s1e 0xc69b2c3c: tag ufs, type VREG usecount 1, writecount 1, refcount 95 mountedhere 0 flags () v_object 0xc6f01cc0 ref 0 pages 372 lock type ufs: EXCL by thread 0xc8d54480 (pid 38667) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426311, on dev ad0s1e 0xc662b570: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc6ded770 ref 0 pages 0 lock type ufs: EXCL by thread 0xc535f000 (pid 38597) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426313, on dev ad0s1e 0xc69b22b8: tag ufs, type VREG usecount 1, writecount 1, refcount 78 mountedhere 0 flags () v_object 0xc5176ee0 ref 0 pages 304 lock type ufs: EXCL by thread 0xc5007480 (pid 38664) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426314, on dev ad0s1e 0xc662bae0: tag ufs, type VREG usecount 1, writecount 1, refcount 57 mountedhere 0 flags () v_object 0xc6ded660 ref 0 pages 220 lock type ufs: EXCL by thread 0xc5360240 (pid 38669) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426315, on dev ad0s1e 0xc662b2b8: tag ufs, type VREG usecount 1, writecount 1, refcount 89 mountedhere 0 flags () v_object 0xc6ded330 ref 0 pages 348 lock type ufs: EXCL by thread 0xc4b0c900 (pid 38670) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426316, on dev ad0s1e 0xc69b2984: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc5176cc0 ref 0 pages 0 lock type ufs: EXCL by thread 0xc8a7ab40 (pid 38565) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426317, on dev ad0s1e 0xc69b2000: tag ufs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xc6f01770 ref 0 pages 0 lock type ufs: EXCL by thread 0xc47f7b40 (pid 38566) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092978f at kern_linkat+0x1df #5 0xc09299be at kern_link+0x3e #6 0xc09299e9 at link+0x29 #7 0xc0bcc5a4 at syscall+0x2b4 #8 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426318, on dev ad0s1e 0xc62c6414: tag ufs, type VREG usecount 1, writecount 1, refcount 43 mountedhere 0 flags () v_object 0xc70fb908 ref 0 pages 164 lock type ufs: EXCL by thread 0xc52c5900 (pid 38666) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426319, on dev ad0s1e 0xc62c6828: tag ufs, type VREG usecount 1, writecount 1, refcount 43 mountedhere 0 flags () v_object 0xc70fb110 ref 0 pages 164 lock type ufs: EXCL by thread 0xc4ae9480 (pid 38661) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426321, on dev ad0s1e 0xc62c6c3c: tag ufs, type VREG usecount 1, writecount 1, refcount 59 mountedhere 0 flags () v_object 0xc70fb660 ref 0 pages 228 lock type ufs: EXCL by thread 0xc519b6c0 (pid 38672) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426327, on dev ad0s1e 0xc7716414: tag ufs, type VREG usecount 1, writecount 1, refcount 74 mountedhere 0 flags () v_object 0xc70fbbb0 ref 0 pages 288 lock type ufs: EXCL by thread 0xc6e32000 (pid 38663) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0ad4d11 at ffs_lock+0xa1 #2 0xc0be53f5 at VOP_LOCK1_APV+0xb5 #3 0xc092e478 at _vn_lock+0x78 #4 0xc092f7e6 at vn_write+0x156 #5 0xc08d4475 at dofilewrite+0x95 #6 0xc08d5bc8 at kern_writev+0x58 #7 0xc08d5cdf at write+0x4f #8 0xc0bcc5a4 at syscall+0x2b4 #9 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 426351, on dev ad0s1e 0xc63a2570: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc4c03000 (pid 38600) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427328, on dev ad0s1e 0xc5193c3c: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc861dd80 (pid 38639) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427329, on dev ad0s1e 0xc66a7000: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc52c1240 (pid 38603) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427330, on dev ad0s1e 0xc66a76cc: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc79ec240 (pid 38585) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2823 at ufs_symlink+0x33 #6 0xc0be5505 at VOP_SYMLINK_APV+0xc5 #7 0xc09268cc at kern_symlinkat+0x27c #8 0xc092699e at kern_symlink+0x2e #9 0xc09269c9 at symlink+0x29 #10 0xc0bcc5a4 at syscall+0x2b4 #11 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427331, on dev ad0s1e 0xc5a33d98: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc4b306c0 (pid 38598) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427332, on dev ad0s1e 0xc5a3315c: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc8a7a240 (pid 38602) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427333, on dev ad0s1e 0xc5a33570: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc519d480 (pid 38596) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427334, on dev ad0s1e 0xc5a332b8: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc5008d80 (pid 38622) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427335, on dev ad0s1e 0xc5a33c3c: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc4b2c000 (pid 38641) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2a40 at ufs_create+0x30 #6 0xc0be63c5 at VOP_CREATE_APV+0xc5 #7 0xc092dd35 at vn_open_cred+0x205 #8 0xc092e12b at vn_open+0x3b #9 0xc092bf2f at kern_openat+0x11f #10 0xc092c495 at kern_open+0x35 #11 0xc092c4d0 at open+0x30 #12 0xc0bcc5a4 at syscall+0x2b4 #13 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427336, on dev ad0s1e 0xc63a2ae0: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc481cd80 (pid 38574) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2823 at ufs_symlink+0x33 #6 0xc0be5505 at VOP_SYMLINK_APV+0xc5 #7 0xc09268cc at kern_symlinkat+0x27c #8 0xc092699e at kern_symlink+0x2e #9 0xc09269c9 at symlink+0x29 #10 0xc0bcc5a4 at syscall+0x2b4 #11 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427337, on dev ad0s1e 0xc63a2d98: tag ufs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags () lock type ufs: EXCL by thread 0xc79ec900 (pid 38579) #0 0xc087787e at __lockmgr_args+0xc1e #1 0xc0acf671 at ffs_vgetf+0x1e1 #2 0xc0acfa5e at ffs_vget+0x2e #3 0xc0aaaf6f at ffs_valloc+0x58f #4 0xc0ae2283 at ufs_makeinode+0xc3 #5 0xc0ae2823 at ufs_symlink+0x33 #6 0xc0be5505 at VOP_SYMLINK_APV+0xc5 #7 0xc09268cc at kern_symlinkat+0x27c #8 0xc092699e at kern_symlink+0x2e #9 0xc09269c9 at symlink+0x29 #10 0xc0bcc5a4 at syscall+0x2b4 #11 0xc0bae8e0 at Xint0x80_syscall+0x20 ino 427338, on dev ad0s1e db:0:lockedvnods> show mount 0xc4ad1b50 /dev/ad0s1a on / (ufs) 0xc4ad2000 devfs on /dev (devfs) 0xc4c075a8 /dev/ad0s1f on /home (ufs) 0xc4c07000 /dev/ad0s1d on /usr (ufs) 0xc4c0c000 /dev/ad0s1g on /var (ufs) 0xc4ad2b50 /dev/ad0s1e on /tmp (ufs) More info: show mount db:0:mount> ps pid ppid pgrp uid state wmesg wchan cmd 38688 1145 1141 1001 S nanslp 0xc0dfe9c4 sleep 38673 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38672 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38671 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38670 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38669 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38668 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38667 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38666 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38665 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38664 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38663 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38662 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38661 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38660 38630 37876 1001 S+ wdrain 0xc0f6b060 rw 38659 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38658 38615 37876 1001 RL+ CPU 3 rename 38657 38615 37876 1001 R+ rename 38656 38615 37876 1001 R+ rename 38655 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38654 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38653 38615 37876 1001 S+ biowr 0xd863bae0 rename 38652 38615 37876 1001 S+ getblk 0xd8754ba0 rename 38651 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38650 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38649 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38648 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38647 38615 37876 1001 S+ biowr 0xd8799de0 rename 38646 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38645 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38644 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38643 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38642 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38641 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38640 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38639 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38638 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38637 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38636 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38635 38615 37876 1001 S+ getblk 0xd863bb40 rename 38634 38615 37876 1001 S+ wdrain 0xc0f6b060 rename 38633 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38632 38611 37876 1001 S+ ufs 0xc500f1b4 mkdir 38631 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38630 38552 37876 1001 S+ wait 0xc8cf5aa0 rw 38629 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38628 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38627 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38626 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38625 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38624 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38623 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38622 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38621 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38620 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38619 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38618 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38617 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38616 38562 37876 1001 R+ lockf2 38615 38558 37876 1001 S+ wait 0xc7946000 rename 38614 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38613 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38612 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38611 38557 37876 1001 S+ wait 0xc51552a8 mkdir 38610 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38609 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38608 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38607 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38606 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38605 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38604 38562 37876 1001 R+ lockf2 38603 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38602 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38601 38561 37876 1001 R+ CPU 0 link 38600 38580 37876 1001 S+ biord 0xd85f1a40 creat 38599 38561 37876 1001 R+ link 38598 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38597 38561 37876 1001 S+ getblk 0xd8754ba0 link 38596 38580 37876 1001 S+ getblk 0xd85f1aa0 creat 38595 38561 37876 1001 R+ link 38594 38561 37876 1001 R+ link 38593 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38592 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38591 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38590 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38589 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38588 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38587 38581 37876 1001 S+ ufs 0xc500f1b4 lockf 38586 38575 37876 1001 S+ ufs 0xc500f1b4 fts 38585 38563 37876 1001 S+ getblk 0xd85f1aa0 symlink 38584 38580 37876 1001 R+ creat 38583 38570 37876 1001 S+ ufs 0xc500f1b4 mkfifo 38582 38570 37876 1001 R+ CPU 2 mkfifo 38581 38555 37876 1001 S+ wait 0xc6e2e7f8 lockf 38580 38556 37876 1001 S+ wait 0xc8cf22a8 creat 38579 38563 37876 1001 S+ getblk 0xd85f1aa0 symlink 38578 38563 37876 1001 S+ nanslp 0xc0dfe9c4 symlink 38577 38562 37876 1001 R+ lockf2 38576 38563 37876 1001 S+ nanslp 0xc0dfe9c4 symlink 38575 38553 37876 1001 S+ wait 0xc7f3d550 fts 38574 38563 37876 1001 S+ getblk 0xd85f1aa0 symlink 38573 38562 37876 1001 R+ lockf2 38572 38563 37876 1001 S+ nanslp 0xc0dfe9c4 symlink 38571 38562 37876 1001 S+ ufs 0xc500f1b4 lockf2 38570 38560 37876 1001 S+ wait 0xc8a77000 mkfifo 38569 38562 37876 1001 S+ ufs 0xc500f1b4 lockf2 38568 38562 37876 1001 R+ lockf2 38567 38561 37876 1001 R+ link 38566 38561 37876 1001 S+ getblk 0xd863bb40 link 38565 38561 37876 1001 R+ link 38564 38561 37876 1001 R+ link 38563 38550 37876 1001 S+ wait 0xc8cf9000 symlink 38562 38549 37876 1001 S+ wait 0xc51ff7f8 lockf2 38561 38554 37876 1001 S+ wait 0xc8026d48 link 38560 37885 37876 1001 S+ nanslp 0xc0dfe9c4 mkfifo 38558 37885 37876 1001 S+ nanslp 0xc0dfe9c4 rename 38557 37885 37876 1001 S+ nanslp 0xc0dfe9c4 mkdir 38556 37885 37876 1001 S+ nanslp 0xc0dfe9c4 creat 38555 37885 37876 1001 S+ nanslp 0xc0dfe9c4 lockf 38554 37885 37876 1001 S+ nanslp 0xc0dfe9c4 link 38553 37885 37876 1001 S+ nanslp 0xc0dfe9c4 fts 38552 37885 37876 1001 S+ nanslp 0xc0dfe9c4 rw 38550 37885 37876 1001 S+ nanslp 0xc0dfe9c4 symlink 38549 37885 37876 1001 S+ nanslp 0xc0dfe9c4 lockf2 37885 37884 37876 1001 S+ wait 0xc7f3c2a8 run 37884 37883 37876 1001 S+ wait 0xc52a8000 run 37883 37876 37876 1001 S+ nanslp 0xc0dfe9c4 run 37876 1061 37876 1001 S+ wait 0xc7947aa0 sh 1146 1141 1141 1001 S piperd 0xc4c64dc8 awk 1145 1141 1141 1001 S wait 0xc4dc42a8 sh 1144 1143 1144 1001 Ss+ select 0xc5585164 top 1143 1134 1134 1001 S select 0xc548ae24 sshd 1142 1140 1142 1001 Ss kqread 0xc5d5b100 tail 1141 1139 1141 1001 Ss wait 0xc5183550 sh 1140 1135 1135 1001 S select 0xc5406b64 sshd 1139 1133 1133 1001 S select 0xc55a0d64 sshd 1135 945 1135 0 Ss sbwait 0xc5e5d0b8 sshd 1134 945 1134 0 Ss sbwait 0xc4c460b8 sshd 1133 945 1133 0 Ss sbwait 0xc4daa0b8 sshd 1061 1060 1061 1001 Ss+ wait 0xc4b2ad48 bash 1060 1058 1058 1001 S select 0xc4e048e4 sshd 1058 945 1058 0 Ss sbwait 0xc4c4d8c4 sshd 1055 1 1055 0 Ss+ ttyin 0xc483b070 getty 1054 1 1054 0 Ss+ ttyin 0xc483b270 getty 1053 1 1053 0 Ss+ ttyin 0xc468fe70 getty 1052 1 1052 0 Ss+ ttyin 0xc4821870 getty 1051 1 1051 0 Ss+ ttyin 0xc4551e70 getty 1050 1 1050 0 Ss+ ttyin 0xc468fc70 getty 1049 1 1049 0 Ss+ ttyin 0xc468f670 getty 1048 1 1048 0 Ss+ ttyin 0xc468fa70 getty 1026 1 1026 0 Ss select 0xc4837664 inetd 1002 1 1002 0 Ss select 0xc4837364 moused 984 1 984 0 Ss nanslp 0xc0dfe9c4 watchdogd 962 1 962 0 Ss nanslp 0xc0dfe9c4 cron 956 1 956 25 Ss pause 0xc4dc4058 sendmail 952 1 952 0 Ss select 0xc4a8da24 sendmail 945 1 945 0 Ss select 0xc4a78e64 sshd 908 1 908 0 Ss select 0xc4837424 ntpd 809 808 808 0 S (threaded) nfsd 100104 S rpcsvc 0xc4ac10d0 nfsd: service 100103 S rpcsvc 0xc4835c50 nfsd: service 100102 S rpcsvc 0xc4ac1c50 nfsd: service 100079 S rpcsvc 0xc4a456d0 nfsd: master 808 1 808 0 Ss select 0xc4a78364 nfsd 806 1 806 0 Ss select 0xc4a459a4 mountd 711 1 711 0 Ss select 0xc4a79064 rpcbind 691 1 691 0 Ss select 0xc48378a4 syslogd 561 1 561 0 Ss select 0xc4ac1aa4 devd 19 0 0 0 SL flowclea 0xc0f6b508 [flowcleaner] 18 0 0 0 RL [softdepflush] 17 0 0 0 SL vlruwt 0xc4a5aaa0 [vnlru] 16 0 0 0 SL syncer 0xc0f6b314 [syncer] 15 0 0 0 SL psleep 0xc0f6b048 [bufdaemon] 9 0 0 0 SL pgzero 0xc0f77b14 [pagezero] 8 0 0 0 SL psleep 0xc0f77744 [vmdaemon] 7 0 0 0 SL psleep 0xc0f7770c [pagedaemon] 6 0 0 0 SL - 0xc482143c [fdc0] 14 0 0 0 SL (threaded) [usb] 100034 D - 0xc479fdac [usbus0] 100033 D - 0xc479fd7c [usbus0] 100032 D - 0xc479fd4c [usbus0] 100031 D - 0xc479fd1c [usbus0] 5 0 0 0 SL ccb_scan 0xc0dcabd4 [xpt_thrd] 13 0 0 0 SL - 0xc0dfe824 [yarrow] 4 0 0 0 SL - 0xc0dfc5e4 [g_down] 3 0 0 0 RL [g_up] 2 0 0 0 SL - 0xc0dfc5d8 [g_event] 12 0 0 0 RL (threaded) [intr] 100042 I [irq7: ppc0] 100040 I [swi0: uart uart] 100039 I [irq12: psm0] 100038 I [irq1: atkbd0] 100037 I [irq15: ata1] 100036 I [irq14: ata0] 100035 I [irq17: fxp0] 100030 I [irq16: uhci0] 100028 I [irq9: acpi0] 100026 I [swi5: +] 100021 I [swi2: cambio] 100019 I [swi6: task queue] 100018 I [swi6: Giant taskq] 100012 I [swi1: netisr 0] 100011 I [swi4: clock] 100010 I [swi4: clock] 100009 I [swi4: clock] 100008 RunQ [swi4: clock] 100007 I [swi3: vm] 11 0 0 0 RL (threaded) [idle] 100006 CanRun [idle: cpu0] 100005 Run CPU 1 [idle: cpu1] 100004 CanRun [idle: cpu2] 100003 CanRun [idle: cpu3] 1 0 1 0 SLs wait 0xc457bd48 [init] 10 0 0 0 SL audit_wo 0xc0f76540 [audit] 0 0 0 0 SLs (threaded) [kernel] 100029 D - 0xc4783340 [em0 taskq] 100027 D - 0xc474a100 [thread taskq] 100025 D - 0xc474a1c0 [kqueue taskq] 100024 D - 0xc474a200 [acpi_task_2] 100023 D - 0xc474a200 [acpi_task_1] 100022 D - 0xc474a200 [acpi_task_0] 100013 D - 0xc4562e00 [firmware taskq] 100000 D sched 0xc0dfc6c0 [swapper] 38559 37885 37876 1001 Z+ swap 38551 37885 37876 1001 Z+ openat db:0:ps> allt Tracing command sleep pid 38688 tid 100423 td 0xc47fa000 sched_switch(c47fa000,0,104,191,f981145e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c47fa000,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(2711,c08c8460,c47fa000,0,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,2711,...) at _sleep+0x31e kern_nanosleep(c47fa000,e7270c64,e7270c6c,a,0,...) at kern_nanosleep+0xc1 nanosleep(c47fa000,e7270cf8,8,c47fa000,c0d8dba0,...) at nanosleep+0x6f syscall(e7270d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2815bad7, esp = 0xbfbfeccc, ebp = 0xbfbfed08 --- Tracing command rw pid 38673 tid 100175 td 0xc519d240 sched_switch(c519d240,0,104,191,8bcde54a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c519d240,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c52093b0,d84e6a20,375,d87980a0,c22a3dc8,...) at waitrunningbufspace+0x6a bufwrite(d84e6a20,7,e6eed9cc,c090eac7,d84e6a20,...) at bufwrite+0x187 bawrite(d84e6a20,d84e6b98,1c,3af,0,...) at bawrite+0x5c cluster_wbuild(c52092b8,4000,75,0,7,...) at cluster_wbuild+0x837 cluster_write(c52092b8,d85de240,1d8000,0,7f,...) at cluster_write+0x203 ffs_write(e6eedbc4,c0cdea06,c52092b8,0,c52092b8,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6eedbc4,c52092b8,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4da3070,e6eedc58,c4a76000,0,c519d240,...) at vn_write+0x1ca dofilewrite(e6eedc58,ffffffff,ffffffff,0,c4da3070,...) at dofilewrite+0x95 kern_writev(c519d240,4,e6eedc58,e6eedc78,1,...) at kern_writev+0x58 write(c519d240,e6eedcf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6eedd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38672 tid 100181 td 0xc519b6c0 sched_switch(c519b6c0,0,104,191,8a87e732,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c519b6c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c62c6d34,d84e66e0,375,d85394e0,c2048678,...) at waitrunningbufspace+0x6a bufwrite(d84e66e0,8,e6f049cc,c090eac7,d84e66e0,...) at bufwrite+0x187 bawrite(d84e66e0,d84e6868,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c62c6c3c,4000,38,0,8,...) at cluster_wbuild+0x837 cluster_write(c62c6c3c,d85394e0,e0000,0,7f,...) at cluster_write+0x696 ffs_write(e6f04bc4,c0cdea06,c62c6c3c,0,c62c6c3c,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6f04bc4,c62c6c3c,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4ce0968,e6f04c58,c4a76000,0,c519b6c0,...) at vn_write+0x1ca dofilewrite(e6f04c58,ffffffff,ffffffff,0,c4ce0968,...) at dofilewrite+0x95 kern_writev(c519b6c0,4,e6f04c58,e6f04c78,1,...) at kern_writev+0x58 write(c519b6c0,e6f04cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6f04d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38671 tid 100192 td 0xc79ec000 sched_switch(c79ec000,0,104,191,8bd6baf2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c79ec000,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c5209a7c,d84ea7e0,375,d873a4c0,c223b578,...) at waitrunningbufspace+0x6a bufwrite(d84ea7e0,8,e6f389cc,c090eac7,d84ea7e0,...) at bufwrite+0x187 bawrite(d84ea7e0,d84ea968,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c5209984,4000,3f,0,8,...) at cluster_wbuild+0x837 cluster_write(c5209984,d873a4c0,fc000,0,7f,...) at cluster_write+0x696 ffs_write(e6f38bc4,c0cdea06,c5209984,0,c5209984,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6f38bc4,c5209984,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4b23428,e6f38c58,c4a76000,0,c79ec000,...) at vn_write+0x1ca dofilewrite(e6f38c58,ffffffff,ffffffff,0,c4b23428,...) at dofilewrite+0x95 kern_writev(c79ec000,4,e6f38c58,e6f38c78,1,...) at kern_writev+0x58 write(c79ec000,e6f38cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6f38d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38670 tid 100064 td 0xc4b0c900 sched_switch(c4b0c900,0,104,191,7d9f1682,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c4b0c900,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c662b3b0,d84e7c00,375,d8539000,c2102078,...) at waitrunningbufspace+0x6a bufwrite(d84e7c00,8,e6d019cc,c090eac7,d84e7c00,...) at bufwrite+0x187 bawrite(d84e7c00,d84e7d88,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c662b2b8,4000,56,0,8,...) at cluster_wbuild+0x837 cluster_write(c662b2b8,d8539000,158000,0,7f,...) at cluster_write+0x696 ffs_write(e6d01bc4,c0cdea06,c662b2b8,0,c662b2b8,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6d01bc4,c662b2b8,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4aef118,e6d01c58,c4a76000,0,c4b0c900,...) at vn_write+0x1ca dofilewrite(e6d01c58,ffffffff,ffffffff,0,c4aef118,...) at dofilewrite+0x95 kern_writev(c4b0c900,4,e6d01c58,e6d01c78,1,...) at kern_writev+0x58 write(c4b0c900,e6d01cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6d01d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38669 tid 100375 td 0xc5360240 sched_switch(c5360240,0,104,191,8bd98856,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c5360240,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c662bbd8,d84ea160,375,d86f41e0,c1e28d60,...) at waitrunningbufspace+0x6a bufwrite(d84ea160,8,e71ce9cc,c090eac7,d84ea160,...) at bufwrite+0x187 bawrite(d84ea160,d84ea2e8,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c662bae0,4000,36,0,8,...) at cluster_wbuild+0x837 cluster_write(c662bae0,d86f41e0,d8000,0,7f,...) at cluster_write+0x696 ffs_write(e71cebc4,c0cdea06,c662bae0,0,c662bae0,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e71cebc4,c662bae0,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4ce0ce8,e71cec58,c4a76000,0,c5360240,...) at vn_write+0x1ca dofilewrite(e71cec58,ffffffff,ffffffff,0,c4ce0ce8,...) at dofilewrite+0x95 kern_writev(c5360240,4,e71cec58,e71cec78,1,...) at kern_writev+0x58 write(c5360240,e71cecf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e71ced38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38668 tid 100155 td 0xc517c6c0 sched_switch(c517c6c0,0,104,191,7daa57f6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c517c6c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c69b27c4,d84e7a60,375,d85698c0,c29b2db8,...) at waitrunningbufspace+0x6a bufwrite(d84e7a60,8,e6e9d9cc,c090eac7,d84e7a60,...) at bufwrite+0x187 bawrite(d84e7a60,d84e7be8,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c69b26cc,4000,6e,0,8,...) at cluster_wbuild+0x837 cluster_write(c69b26cc,d85698c0,1b8000,0,7f,...) at cluster_write+0x696 ffs_write(e6e9dbc4,c0cdea06,c69b26cc,0,c69b26cc,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6e9dbc4,c69b26cc,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4da34d0,e6e9dc58,c4a76000,0,c517c6c0,...) at vn_write+0x1ca dofilewrite(e6e9dc58,ffffffff,ffffffff,0,c4da34d0,...) at dofilewrite+0x95 kern_writev(c517c6c0,4,e6e9dc58,e6e9dc78,1,...) at kern_writev+0x58 write(c517c6c0,e6e9dcf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6e9dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38667 tid 100327 td 0xc8d54480 sched_switch(c8d54480,0,104,191,7f750f76,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c8d54480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c69b2d34,d84e66e0,375,d855d5c0,c28b5d20,...) at waitrunningbufspace+0x6a bufwrite(d84e66e0,8,e71049cc,c090eac7,d84e66e0,...) at bufwrite+0x187 bawrite(d84e66e0,d84e6868,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c69b2c3c,4000,5c,0,8,...) at cluster_wbuild+0x837 cluster_write(c69b2c3c,d855d5c0,170000,0,7f,...) at cluster_write+0x696 ffs_write(e7104bc4,c0cdea06,c69b2c3c,0,c69b2c3c,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e7104bc4,c69b2c3c,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4da3d58,e7104c58,c4a76000,0,c8d54480,...) at vn_write+0x1ca dofilewrite(e7104c58,ffffffff,ffffffff,0,c4da3d58,...) at dofilewrite+0x95 kern_writev(c8d54480,4,e7104c58,e7104c78,1,...) at kern_writev+0x58 write(c8d54480,e7104cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e7104d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38666 tid 100408 td 0xc52c5900 sched_switch(c52c5900,0,104,191,7ea0dfb6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c52c5900,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c62c650c,d84e9c80,375,d8506a00,c226eb00,...) at waitrunningbufspace+0x6a bufwrite(d84e9c80,8,e72439cc,c090eac7,d84e9c80,...) at bufwrite+0x187 bawrite(d84e9c80,d84e9e08,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c62c6414,4000,28,0,8,...) at cluster_wbuild+0x837 cluster_write(c62c6414,d8506a00,a0000,0,7f,...) at cluster_write+0x696 ffs_write(e7243bc4,c0cdea06,c62c6414,0,c62c6414,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e7243bc4,c62c6414,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(cb89f3f0,e7243c58,c4a76000,0,c52c5900,...) at vn_write+0x1ca dofilewrite(e7243c58,ffffffff,ffffffff,0,cb89f3f0,...) at dofilewrite+0x95 kern_writev(c52c5900,4,e7243c58,e7243c78,1,...) at kern_writev+0x58 write(c52c5900,e7243cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e7243d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38665 tid 100242 td 0xc804ab40 sched_switch(c804ab40,0,104,191,8bc03e06,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c804ab40,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c5209920,d84ea640,375,d87556a0,c2549570,...) at waitrunningbufspace+0x6a bufwrite(d84ea640,8,e70059cc,c090eac7,d84ea640,...) at bufwrite+0x187 bawrite(d84ea640,d84ea7c8,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c5209828,4000,45,0,8,...) at cluster_wbuild+0x837 cluster_write(c5209828,d87556a0,114000,0,7f,...) at cluster_write+0x696 ffs_write(e7005bc4,c0cdea06,c5209828,0,c5209828,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e7005bc4,c5209828,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4b231c0,e7005c58,c4a76000,0,c804ab40,...) at vn_write+0x1ca dofilewrite(e7005c58,ffffffff,ffffffff,0,c4b231c0,...) at dofilewrite+0x95 kern_writev(c804ab40,4,e7005c58,e7005c78,1,...) at kern_writev+0x58 write(c804ab40,e7005cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e7005d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38664 tid 100131 td 0xc5007480 sched_switch(c5007480,0,104,191,8be21c3a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c5007480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c69b23b0,d84e7580,375,d8581ec0,c260c798,...) at waitrunningbufspace+0x6a bufwrite(d84e7580,8,e6e389cc,c090eac7,d84e7580,...) at bufwrite+0x187 bawrite(d84e7580,d84e7708,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c69b22b8,4000,4b,0,8,...) at cluster_wbuild+0x837 cluster_write(c69b22b8,d8581ec0,12c000,0,7f,...) at cluster_write+0x696 ffs_write(e6e38bc4,c0cdea06,c69b22b8,0,c69b22b8,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6e38bc4,c69b22b8,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c7f57540,e6e38c58,c4a76000,0,c5007480,...) at vn_write+0x1ca dofilewrite(e6e38c58,ffffffff,ffffffff,0,c7f57540,...) at dofilewrite+0x95 kern_writev(c5007480,4,e6e38c58,e6e38c78,1,...) at kern_writev+0x58 write(c5007480,e6e38cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6e38d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38663 tid 100354 td 0xc6e32000 sched_switch(c6e32000,0,104,191,7ea110fa,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c6e32000,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c771650c,d84e85c0,375,d84f6600,c21345b0,...) at waitrunningbufspace+0x6a bufwrite(d84e85c0,8,e71559cc,c090eac7,d84e85c0,...) at bufwrite+0x187 bawrite(d84e85c0,d84e8748,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c7716414,4000,47,0,8,...) at cluster_wbuild+0x837 cluster_write(c7716414,d84f6600,11c000,0,7f,...) at cluster_write+0x696 ffs_write(e7155bc4,c0cdea06,c7716414,0,c7716414,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e7155bc4,c7716414,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c4bf8070,e7155c58,c4a76000,0,c6e32000,...) at vn_write+0x1ca dofilewrite(e7155c58,ffffffff,ffffffff,0,c4bf8070,...) at dofilewrite+0x95 kern_writev(c6e32000,4,e7155c58,e7155c78,1,...) at kern_writev+0x58 write(c6e32000,e7155cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e7155d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38662 tid 100152 td 0xc5008480 sched_switch(c5008480,0,104,191,8bd25dd6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c5008480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c5209e90,d84e7c00,375,d8540ec0,c20c7200,...) at waitrunningbufspace+0x6a bufwrite(d84e7c00,8,e6e919cc,c090eac7,d84e7c00,...) at bufwrite+0x187 bawrite(d84e7c00,d84e7d88,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c5209d98,4000,3d,0,8,...) at cluster_wbuild+0x837 cluster_write(c5209d98,d8540ec0,f4000,0,7f,...) at cluster_write+0x696 ffs_write(e6e91bc4,c0cdea06,c5209d98,0,c5209d98,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6e91bc4,c5209d98,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c7f57c08,e6e91c58,c4a76000,0,c5008480,...) at vn_write+0x1ca dofilewrite(e6e91c58,ffffffff,ffffffff,0,c7f57c08,...) at dofilewrite+0x95 kern_writev(c5008480,4,e6e91c58,e6e91c78,1,...) at kern_writev+0x58 write(c5008480,e6e91cf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6e91d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38661 tid 100063 td 0xc4ae9480 sched_switch(c4ae9480,0,104,191,7d8493ce,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c4ae9480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c62c6920,d84e6a20,375,d8564920,c196bb78,...) at waitrunningbufspace+0x6a bufwrite(d84e6a20,8,e6cfd9cc,c090eac7,d84e6a20,...) at bufwrite+0x187 bawrite(d84e6a20,d84e6ba8,20,3af,0,...) at bawrite+0x5c cluster_wbuild(c62c6828,4000,28,0,8,...) at cluster_wbuild+0x837 cluster_write(c62c6828,d8564920,a0000,0,7f,...) at cluster_write+0x696 ffs_write(e6cfdbc4,c0cdea06,c62c6828,0,c62c6828,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e6cfdbc4,c62c6828,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c7d98e38,e6cfdc58,c4a76000,0,c4ae9480,...) at vn_write+0x1ca dofilewrite(e6cfdc58,ffffffff,ffffffff,0,c7d98e38,...) at dofilewrite+0x95 kern_writev(c4ae9480,4,e6cfdc58,e6cfdc78,1,...) at kern_writev+0x58 write(c4ae9480,e6cfdcf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e6cfdd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rw pid 38660 tid 100346 td 0xc6e34240 sched_switch(c6e34240,0,104,191,7ea0605a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c6e34240,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(cb455668,d84ea640,375,d851ad60,c23ae6f0,...) at waitrunningbufspace+0x6a bufwrite(d84ea640,8,e713d9cc,c090eac7,d84ea640,...) at bufwrite+0x187 bawrite(d84ea640,d84ea7c8,20,3af,0,...) at bawrite+0x5c cluster_wbuild(cb455570,4000,5ec,0,8,...) at cluster_wbuild+0x837 cluster_write(cb455570,d851ad60,17b0000,0,7f,...) at cluster_write+0x696 ffs_write(e713dbc4,c0cdea06,cb455570,0,cb455570,...) at ffs_write+0x5eb VOP_WRITE_APV(c0daee60,e713dbc4,cb455570,25f,0,...) at VOP_WRITE_APV+0x136 vn_write(c7f57658,e713dc58,c4a76000,0,c6e34240,...) at vn_write+0x1ca dofilewrite(e713dc58,ffffffff,ffffffff,0,c7f57658,...) at dofilewrite+0x95 kern_writev(c6e34240,4,e713dc58,e713dc78,1,...) at kern_writev+0x58 write(c6e34240,e713dcf8,c,c0c87ea6,c0d8c1d0,...) at write+0x4f syscall(e713dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2818e093, esp = 0xbfbfd6dc, ebp = 0xbfbfe788 --- Tracing command rename pid 38659 tid 100355 td 0xc8d54d80 sched_switch(c8d54d80,0,104,191,8bc2f1ee,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c8d54d80,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c56507c4,d87891c0,375,0,d87891c0,...) at waitrunningbufspace+0x6a bufwrite(d87891c0,d8789220,e71586f4,c0ad496f,d87891c0,...) at bufwrite+0x187 bawrite(d87891c0,0,c0cc8b93,101,0,...) at bawrite+0x5c ffs_syncvnode(c56506cc,1,c4539030,c0f3c338,e7158718,...) at ffs_syncvnode+0x29f ffs_truncate(c56506cc,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c56506cc,0,e7158a0c,e7158ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7158c1c,0,cb6646cc,e7158bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7158c1c,0,1,e7158ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c8d54d80,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c8d54d80,bfbfe644,bfbfe6c4,0,e7158d2c,...) at kern_rename+0x36 rename(c8d54d80,e7158cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7158d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38658 tid 100169 td 0xc519e000 cpustop_handler(8,e6ed53f0,c0bcc826,e6ed5380,c087ecb4,...) at cpustop_handler+0x32 ipi_nmi_handler(e6ed5380,c087ecb4,c0dfeab4,4,c5185aa0,...) at ipi_nmi_handler+0x2f trap(e6ed53fc) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc087f299, esp = 0xe6ed543c, ebp = 0xe6ed5458 --- _mtx_lock_sleep(c0f76cb0,c519e000,0,c0cc6347,1976,...) at _mtx_lock_sleep+0x99 _mtx_lock_flags(c0f76cb0,0,c0cc6347,1976,4,...) at _mtx_lock_flags+0xf7 softdep_disk_io_initiation(d8754b40,4,d8754b40,0,0,...) at softdep_disk_io_initiation+0x152 ffs_geom_strategy(c4ad37c4,d8754b40,0,d8754b40,cb3b33a0,...) at ffs_geom_strategy+0x13f bufwrite(d8754b40,0,c0cc8729,728,0) at bufwrite+0x159 ffs_bufwrite(d8754b40,c5a4bb00,100,4000,0,...) at ffs_bufwrite+0x290 ffs_update(c6373414,1,c0cc8b93,165,0,...) at ffs_update+0x2bc ffs_syncvnode(c6373414,1,c4539030,c0f3d3b8,e6ed5718,...) at ffs_syncvnode+0x48f ffs_truncate(c6373414,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c6373414,0,e6ed5a0c,e6ed5ba0,0,...) at ufs_direnter+0x846 ufs_rename(e6ed5c1c,0,caf90414,e6ed5bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e6ed5c1c,0,1,e6ed5ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c519e000,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c519e000,bfbfe644,bfbfe6c4,0,e6ed5d2c,...) at kern_rename+0x36 rename(c519e000,e6ed5cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e6ed5d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38657 tid 100308 td 0xc804c480 sched_switch(c804c480,0,104,191,8a85b2e2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804c480,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(c5f05ae0,1,0,1,c4a76000,...) at ffs_update+0x1a2 ffs_truncate(c5f05ae0,a00,0,880,c4a76000,...) at ffs_truncate+0xef0 ufs_direnter(c5f05ae0,0,e70cba0c,e70cbba0,0,...) at ufs_direnter+0x846 ufs_rename(e70cbc1c,0,c4f926cc,e70cbbc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e70cbc1c,0,1,e70cbba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c804c480,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c804c480,bfbfe644,bfbfe6c4,0,e70cbd2c,...) at kern_rename+0x36 rename(c804c480,e70cbcf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e70cbd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38656 tid 100300 td 0xc804a6c0 sched_switch(c804a6c0,0,104,191,8a5f229a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804a6c0,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(c6349ae0,0,a00,0,67fe1,...) at ffs_update+0x1a2 ufs_direnter(c6349ae0,0,e70b3a0c,e70b3ba0,0,...) at ufs_direnter+0x2d8 ufs_rename(e70b3c1c,0,cb3f16cc,e70b3bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e70b3c1c,0,1,e70b3ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c804a6c0,ffffff9c,bfbfe6c4,ffffff9c,bfbfe644,...) at kern_renameat+0x307 kern_rename(c804a6c0,bfbfe6c4,bfbfe644,0,e70b3d2c,...) at kern_rename+0x36 rename(c804a6c0,e70b3cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e70b3d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38655 tid 100411 td 0xc52c5240 sched_switch(c52c5240,0,104,191,8be8636a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c52c5240,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(cb67c3b0,d86641a0,375,0,d86641a0,...) at waitrunningbufspace+0x6a bufwrite(d86641a0,d8664200,e724c6f4,c0ad496f,d86641a0,...) at bufwrite+0x187 bawrite(d86641a0,0,c0cc8b93,101,0,...) at bawrite+0x5c ffs_syncvnode(cb67c2b8,1,c4539030,c0f3de60,e724c718,...) at ffs_syncvnode+0x29f ffs_truncate(cb67c2b8,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(cb67c2b8,0,e724ca0c,e724cba0,0,...) at ufs_direnter+0x846 ufs_rename(e724cc1c,0,cb4b9c3c,e724cbc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e724cc1c,0,1,e724cba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c52c5240,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c52c5240,bfbfe644,bfbfe6c4,0,e724cd2c,...) at kern_rename+0x36 rename(c52c5240,e724ccf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e724cd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38654 tid 100365 td 0xc6e4f000 sched_switch(c6e4f000,0,104,191,8a8aca1e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c6e4f000,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c65bc50c,d877f5c0,375,0,d877f5c0,...) at waitrunningbufspace+0x6a bufwrite(d877f5c0,d877f620,e71766f4,c0ad496f,d877f5c0,...) at bufwrite+0x187 bawrite(d877f5c0,0,c0cc8b93,101,0,...) at bawrite+0x5c ffs_syncvnode(c65bc414,1,c4539030,c0f3ddb0,e7176718,...) at ffs_syncvnode+0x29f ffs_truncate(c65bc414,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c65bc414,0,e7176a0c,e7176ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7176c1c,0,c6fb6414,e7176bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7176c1c,0,1,e7176ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c6e4f000,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c6e4f000,bfbfe644,bfbfe6c4,0,e7176d2c,...) at kern_rename+0x36 rename(c6e4f000,e7176cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7176d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38653 tid 100075 td 0xc4b2cb40 sched_switch(c4b2cb40,0,104,191,889d840a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c4b2cb40,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(d863bae0,4c,c0cab210,0,0,...) at sleepq_wait+0x63 _sleep(d863bae0,c454f920,4c,c0cab210,0,...) at _sleep+0x36b bwait(d863bae0,4c,c0cab210,d863bae0,e6d34610,...) at bwait+0x6f bufwait(d863bae0,d863bae0,0,d863bae0,c68e54fc,...) at bufwait+0x48 bufwrite(d863bae0,0,c0cc8729,728,0) at bufwrite+0x165 ffs_bufwrite(d863bae0,cb723300,100,4000,0,...) at ffs_bufwrite+0x290 ffs_update(cb6aa6cc,1,c0cc8b93,165,0,...) at ffs_update+0x2bc ffs_syncvnode(cb6aa6cc,1,c4539030,c0f3bec0,e6d34718,...) at ffs_syncvnode+0x48f ffs_truncate(cb6aa6cc,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(cb6aa6cc,0,e6d34a0c,e6d34ba0,0,...) at ufs_direnter+0x846 ufs_rename(e6d34c1c,0,c56702b8,e6d34bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e6d34c1c,0,1,e6d34ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c4b2cb40,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c4b2cb40,bfbfe644,bfbfe6c4,0,e6d34d2c,...) at kern_rename+0x36 rename(c4b2cb40,e6d34cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e6d34d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38652 tid 100082 td 0xc4c39900 sched_switch(c4c39900,0,104,191,8bf268ca,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4c39900,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(c655bc3c,1,c0cc8b93,165,0,...) at ffs_update+0x1a2 ffs_syncvnode(c655bc3c,1,c4539030,c0f3baf8,e6d68718,...) at ffs_syncvnode+0x48f ffs_truncate(c655bc3c,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c655bc3c,0,e6d68a0c,e6d68ba0,0,...) at ufs_direnter+0x846 ufs_rename(e6d68c1c,0,c6351000,e6d68bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e6d68c1c,0,1,e6d68ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c4c39900,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c4c39900,bfbfe644,bfbfe6c4,0,e6d68d2c,...) at kern_rename+0x36 rename(c4c39900,e6d68cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e6d68d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command mkdir pid 38651 tid 100198 td 0xc519b480 sched_switch(c519b480,0,104,191,d13729a2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c519b480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6f64a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6f64a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6f64abc,...) at _vn_lock+0x78 lookup(e6f64bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6f64bd4,c08c8a27,c519b480,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c519b480,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c519b480,bfbfe363,0,1f8,e6f64d2c,...) at kern_mkdir+0x2e mkdir(c519b480,e6f64cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e6f64d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command rename pid 38650 tid 100344 td 0xc6e346c0 sched_switch(c6e346c0,0,104,191,8b91997e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c6e346c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c57b90f8,d85c89c0,375,0,d85c89c0,...) at waitrunningbufspace+0x6a bufwrite(d85c89c0,d85c8a20,e71376f4,c0ad496f,d85c89c0,...) at bufwrite+0x187 bawrite(d85c89c0,0,c0cc8b93,101,0,...) at bawrite+0x5c ffs_syncvnode(c57b9000,1,c4539030,c0f3d780,e7137718,...) at ffs_syncvnode+0x29f ffs_truncate(c57b9000,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c57b9000,0,e7137a0c,e7137ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7137c1c,0,c52fa828,e7137bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7137c1c,0,1,e7137ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c6e346c0,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c6e346c0,bfbfe644,bfbfe6c4,0,e7137d2c,...) at kern_rename+0x36 rename(c6e346c0,e7137cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7137d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command mkdir pid 38649 tid 100334 td 0xc8d52480 sched_switch(c8d52480,0,104,191,f7845ea2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8d52480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7119a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7119a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7119abc,...) at _vn_lock+0x78 lookup(e7119bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7119bd4,c08c8a27,c8d52480,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c8d52480,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c8d52480,bfbfe363,0,1f8,e7119d2c,...) at kern_mkdir+0x2e mkdir(c8d52480,e7119cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e7119d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command rename pid 38648 tid 100282 td 0xc8a7a900 sched_switch(c8a7a900,0,104,191,7db10eb2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c8a7a900,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(c67e87c4,d86e0840,375,d86e0840,0,...) at waitrunningbufspace+0x6a bufwrite(d86e0840,c4a54000,e707d698,c0ace07f,d86e0840,...) at bufwrite+0x187 bawrite(d86e0840,0,c0cc6347,2276,0,...) at bawrite+0x5c softdep_sync_metadata(c67e86cc,0,c0cc8b93,146,0,...) at softdep_sync_metadata+0xfdf ffs_syncvnode(c67e86cc,1,c4539030,c0f3deb8,e707d718,...) at ffs_syncvnode+0x3e2 ffs_truncate(c67e86cc,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c67e86cc,0,e707da0c,e707dba0,0,...) at ufs_direnter+0x846 ufs_rename(e707dc1c,0,c61e0000,e707dbc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e707dc1c,0,1,e707dba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c8a7a900,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c8a7a900,bfbfe644,bfbfe6c4,0,e707dd2c,...) at kern_rename+0x36 rename(c8a7a900,e707dcf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e707dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38647 tid 100430 td 0xc47f7000 sched_switch(c47f7000,0,104,191,88a31e9e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c47f7000,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(d8799de0,4c,c0cab210,0,0,...) at sleepq_wait+0x63 _sleep(d8799de0,c454f0ec,4c,c0cab210,0,...) at _sleep+0x36b bwait(d8799de0,4c,c0cab210,d8799de0,e72856f4,...) at bwait+0x6f bufwait(d8799de0,d8799de0,1799de0,c4a54000,0,...) at bufwait+0x48 bufwrite(d8799de0,1000,0,1,c4a76000,...) at bufwrite+0x165 ffs_truncate(c60fc6cc,a00,0,880,c4a76000,...) at ffs_truncate+0xcb5 ufs_direnter(c60fc6cc,0,e7285a0c,e7285ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7285c1c,0,cb4b6984,e7285bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7285c1c,0,1,e7285ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c47f7000,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c47f7000,bfbfe644,bfbfe6c4,0,e7285d2c,...) at kern_rename+0x36 rename(c47f7000,e7285cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7285d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command mkdir pid 38646 tid 100144 td 0xc51586c0 sched_switch(c51586c0,0,104,191,f782e982,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c51586c0,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6e71a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e71a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6e71abc,...) at _vn_lock+0x78 lookup(e6e71bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6e71bd4,c51532a8,246,0,0,...) at namei+0x57f kern_mkdirat(c51586c0,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c51586c0,bfbfe363,0,1f8,e6e71d2c,...) at kern_mkdir+0x2e mkdir(c51586c0,e6e71cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e6e71d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38645 tid 100391 td 0xc4b756c0 sched_switch(c4b756c0,0,104,191,d133ff3a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b756c0,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7210a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7210a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7210abc,...) at _vn_lock+0x78 lookup(e7210bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7210bd4,c08c8a27,c4b756c0,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c4b756c0,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c4b756c0,bfbfe363,0,1f8,e7210d2c,...) at kern_mkdir+0x2e mkdir(c4b756c0,e7210cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e7210d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38644 tid 100439 td 0xc47f1480 sched_switch(c47f1480,0,104,191,f785ce92,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47f1480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e72a6a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e72a6a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e72a6abc,...) at _vn_lock+0x78 lookup(e72a6bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e72a6bd4,c08c8a27,c47f1480,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c47f1480,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c47f1480,bfbfe363,0,1f8,e72a6d2c,...) at kern_mkdir+0x2e mkdir(c47f1480,e72a6cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e72a6d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38643 tid 100338 td 0xc8cfcb40 sched_switch(c8cfcb40,0,104,191,d1359676,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8cfcb40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7125a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7125a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7125abc,...) at _vn_lock+0x78 lookup(e7125bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7125bd4,c08c8a27,c8cfcb40,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c8cfcb40,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c8cfcb40,bfbfe363,0,1f8,e7125d2c,...) at kern_mkdir+0x2e mkdir(c8cfcb40,e7125cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e7125d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38642 tid 100432 td 0xc52cab40 sched_switch(c52cab40,0,104,191,4659bf82,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c52cab40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e728ba48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e728ba48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e728babc,...) at _vn_lock+0x78 lookup(e728bbd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e728bbd4,c08c8a27,c52cab40,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c52cab40,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c52cab40,bfbfe363,0,1f8,e728bd2c,...) at kern_mkdir+0x2e mkdir(c52cab40,e728bcf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e728bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command creat pid 38641 tid 100136 td 0xc4b2c000 sched_switch(c4b2c000,0,104,191,88cc682a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b2c000,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68548,80000,e6e518cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68548,80000,e6e518cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb67c984,81b0,c4a76000,e6e518cc,e6e518b8,...) at ffs_valloc+0x58f ufs_makeinode(e6e51bd0,c0daf360,e6e51abc,e6e51a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e6e51abc,c0cdead0,0,0,e6e51ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e6e51abc,e6e51bd0,e6e51a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e6e51ba4,e6e51c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e6e51ba4,e6e51c5c,1b0,c4aef3b8,c0cca82f,...) at vn_open+0x3b kern_openat(c4b2c000,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c4b2c000,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c4b2c000,e6e51cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6e51d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command mkdir pid 38640 tid 100440 td 0xc47f1240 sched_switch(c47f1240,0,104,191,e1af1546,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47f1240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e72aaa48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e72aaa48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e72aaabc,...) at _vn_lock+0x78 lookup(e72aabd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e72aabd4,c08c8a27,c47f1240,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c47f1240,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c47f1240,bfbfe363,0,1f8,e72aad2c,...) at kern_mkdir+0x2e mkdir(c47f1240,e72aacf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e72aad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command creat pid 38639 tid 100257 td 0xc861dd80 sched_switch(c861dd80,0,104,191,87e8051a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c861dd80,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68541,80000,e70328cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68541,80000,e70328cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(c67fa984,81b0,c4a76000,e70328cc,e70328b8,...) at ffs_valloc+0x58f ufs_makeinode(e7032bd0,c0daf360,e7032abc,e7032a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e7032abc,c0cdead0,0,0,e7032ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e7032abc,e7032bd0,e7032a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e7032ba4,e7032c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e7032ba4,e7032c5c,1b0,c4b237e0,c0cca82f,...) at vn_open+0x3b kern_openat(c861dd80,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c861dd80,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c861dd80,e7032cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e7032d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command mkdir pid 38638 tid 100260 td 0xc861d6c0 sched_switch(c861d6c0,0,104,191,eae2a86e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c861d6c0,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e703ba48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e703ba48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e703babc,...) at _vn_lock+0x78 lookup(e703bbd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e703bbd4,c08c8a27,c861d6c0,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c861d6c0,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c861d6c0,bfbfe363,0,1f8,e703bd2c,...) at kern_mkdir+0x2e mkdir(c861d6c0,e703bcf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e703bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38637 tid 100100 td 0xc4b30d80 sched_switch(c4b30d80,0,104,191,e1ca4b32,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b30d80,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6dcea48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6dcea48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6dceabc,...) at _vn_lock+0x78 lookup(e6dcebd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6dcebd4,c08c8a27,c4b30d80,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c4b30d80,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c4b30d80,bfbfe363,0,1f8,e6dced2c,...) at kern_mkdir+0x2e mkdir(c4b30d80,e6dcecf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e6dced38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38636 tid 100442 td 0xc47eed80 sched_switch(c47eed80,0,104,191,f77fa956,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47eed80,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e72b2a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e72b2a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e72b2abc,...) at _vn_lock+0x78 lookup(e72b2bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e72b2bd4,c08c8a27,c47eed80,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c47eed80,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c47eed80,bfbfe363,0,1f8,e72b2d2c,...) at kern_mkdir+0x2e mkdir(c47eed80,e72b2cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e72b2d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command rename pid 38635 tid 100248 td 0xc5006900 sched_switch(c5006900,0,104,191,894198f2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5006900,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d863bb40,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d863bb40,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f60,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f60,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f60,0,4000,0,...) at bread+0x4c ffs_update(cb3edd98,1,0,1,c4a76000,...) at ffs_update+0x1a2 ffs_truncate(cb3edd98,a00,0,880,c4a76000,...) at ffs_truncate+0xef0 ufs_direnter(cb3edd98,0,e7017a0c,e7017ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7017c1c,0,c4de2570,e7017bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7017c1c,0,1,e7017ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c5006900,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c5006900,bfbfe644,bfbfe6c4,0,e7017d2c,...) at kern_rename+0x36 rename(c5006900,e7017cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7017d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command rename pid 38634 tid 100275 td 0xc8a7b900 sched_switch(c8a7b900,0,104,191,8a8f869a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c8a7b900,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f6b060,44,c0caaf20,0,0,...) at sleepq_wait+0x63 _sleep(c0f6b060,c0f6b064,44,c0caaf20,0,...) at _sleep+0x36b waitrunningbufspace(cb6147c4,d86d3360,375,0,d86d3360,...) at waitrunningbufspace+0x6a bufwrite(d86d3360,d86d33c0,e70686f4,c0ad496f,d86d3360,...) at bufwrite+0x187 bawrite(d86d3360,0,c0cc8b93,101,0,...) at bawrite+0x5c ffs_syncvnode(cb6146cc,1,c4539030,c0f3d0f8,e7068718,...) at ffs_syncvnode+0x29f ffs_truncate(cb6146cc,a00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(cb6146cc,0,e7068a0c,e7068ba0,0,...) at ufs_direnter+0x846 ufs_rename(e7068c1c,0,c563bd98,e7068bc8,0,...) at ufs_rename+0xcd3 VOP_RENAME_APV(c0daee60,e7068c1c,0,1,e7068ba0,...) at VOP_RENAME_APV+0xa5 kern_renameat(c8a7b900,ffffff9c,bfbfe644,ffffff9c,bfbfe6c4,...) at kern_renameat+0x307 kern_rename(c8a7b900,bfbfe644,bfbfe6c4,0,e7068d2c,...) at kern_rename+0x36 rename(c8a7b900,e7068cf8,8,c0cdec25,c0d8cf60,...) at rename+0x29 syscall(e7068d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (128, FreeBSD ELF32, rename), eip = 0x280eabfb, esp = 0xbfbfe60c, ebp = 0xbfbfe748 --- Tracing command mkdir pid 38633 tid 100331 td 0xc8d52b40 sched_switch(c8d52b40,0,104,191,34960372,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8d52b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7110a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7110a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7110abc,...) at _vn_lock+0x78 lookup(e7110bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7110bd4,c08c8a27,c8d52b40,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c8d52b40,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c8d52b40,bfbfe363,0,1f8,e7110d2c,...) at kern_mkdir+0x2e mkdir(c8d52b40,e7110cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e7110d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command mkdir pid 38632 tid 100378 td 0xc535fb40 sched_switch(c535fb40,0,104,191,52b26bc2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c535fb40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e71d7a48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e71d7a48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e71d7abc,...) at _vn_lock+0x78 lookup(e71d7bd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e71d7bd4,c08c8a27,c535fb40,0,c0ca42a7,...) at namei+0x57f kern_mkdirat(c535fb40,ffffff9c,bfbfe363,0,1f8,...) at kern_mkdirat+0x68 kern_mkdir(c535fb40,bfbfe363,0,1f8,e71d7d2c,...) at kern_mkdir+0x2e mkdir(c535fb40,e71d7cf8,8,c0ca693c,c0d8d040,...) at mkdir+0x29 syscall(e71d7d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2817d5c3, esp = 0xbfbfdf0c, ebp = 0xbfbfe338 --- Tracing command fts pid 38631 tid 100073 td 0xc4b2f000 sched_switch(c4b2f000,0,104,191,69cbc3e2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b2f000,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6d2cb90,c087efdc,c1894c08,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6d2cb90,e6d2cbc8,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cae7a7,2b0,e6d2cbe0,...) at _vn_lock+0x78 vn_statfile(cb89f310,e6d2cc18,c4a76000,c4b2f000,cb89f310,...) at vn_statfile+0xf6 kern_fstat(c4b2f000,4,e6d2cc18,c500f15c,0,...) at kern_fstat+0x83 fstat(c4b2f000,e6d2ccf8,8,c0c86f68,c0d8d60c,...) at fstat+0x27 syscall(e6d2cd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (189, FreeBSD ELF32, fstat), eip = 0x2818c50b, esp = 0xbfbfe60c, ebp = 0xbfbfe698 --- Tracing command rw pid 38630 tid 100318 td 0xc8cfb000 sched_switch(c8cfb000,0,104,191,49493482,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8cfb000,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c8cf5aa0,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c8cf5aa0,c8cf5b28,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c8cfb000,9704,e70e9c74,0,0,...) at kern_wait+0xb76 wait4(c8cfb000,e70e9cf8,10,c8cfb000,c0d8c224,...) at wait4+0x3b syscall(e70e9d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe78c, ebp = 0xbfbfe7a8 --- Tracing command lockf pid 38629 tid 100349 td 0xc6e32b40 sched_switch(c6e32b40,0,104,191,d13225b6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c6e32b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7146910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7146910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7146984,...) at _vn_lock+0x78 lookup(e7146ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7146ba4,e7146a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e7146ba4,e7146c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e7146ba4,e7146c5c,180,c6976c78,315e,...) at vn_open+0x3b kern_openat(c6e32b40,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c6e32b40,804d420,0,602,180,...) at kern_open+0x35 open(c6e32b40,e7146cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e7146d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command fts pid 38628 tid 100150 td 0xc5008900 sched_switch(c5008900,0,104,191,3e6b350a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5008900,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6e8984c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e8984c,c50089a4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c5008900,231,200000,...) at vget+0xbb cache_lookup(c5082414,e6e89bbc,e6e89bd0,e6e89bbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e6e89988,c0cadf84,c0dc9460,200000,e6e89ba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e6e89988,e6e89bd0,1f1,e6e89bbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e6e89ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e6e89ba4,e6e89a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6e89ba4,e6e89c5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6e89ba4,e6e89c5c,0,c564bb98,c0cca82f,...) at vn_open+0x3b kern_openat(c5008900,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c5008900,2819847f,0,0,0,...) at kern_open+0x35 open(c5008900,e6e89cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6e89d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command lockf pid 38627 tid 100101 td 0xc4b30b40 sched_switch(c4b30b40,0,104,191,f77de852,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b30b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6dd2910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6dd2910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6dd2984,...) at _vn_lock+0x78 lookup(e6dd2ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6dd2ba4,e6dd2a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6dd2ba4,e6dd2c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6dd2ba4,e6dd2c5c,180,c4b1c070,315e,...) at vn_open+0x3b kern_openat(c4b30b40,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c4b30b40,804d420,0,602,180,...) at kern_open+0x35 open(c4b30b40,e6dd2cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6dd2d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command fts pid 38626 tid 100305 td 0xc804cb40 sched_switch(c804cb40,0,104,191,53b18bf2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804cb40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e70c29d8,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e70c29d8,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e70c2a4c,...) at _vn_lock+0x78 lookup(e70c2b5c,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e70c2b5c,c4536790,e70c2b08,c08d1b2b,c0cca82f,...) at namei+0x57f kern_statat_vnhook(c804cb40,0,ffffff9c,2822c8b8,0,...) at kern_statat_vnhook+0x72 kern_statat(c804cb40,0,ffffff9c,2822c8b8,0,...) at kern_statat+0x3c kern_stat(c804cb40,2822c8b8,0,e70c2c18,c0c9a725,...) at kern_stat+0x36 stat(c804cb40,e70c2cf8,8,e70c2c9c,c0d8d5f0,...) at stat+0x2f syscall(e70c2d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (188, FreeBSD ELF32, stat), eip = 0x2817c5a3, esp = 0xbfbfe61c, ebp = 0xbfbfe698 --- Tracing command lockf pid 38625 tid 100272 td 0xc519e480 sched_switch(c519e480,0,104,191,e1ab3c4e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c519e480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e705f910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e705f910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e705f984,...) at _vn_lock+0x78 lookup(e705fba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e705fba4,e705fa80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e705fba4,e705fc5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e705fba4,e705fc5c,180,c4aee700,315e,...) at vn_open+0x3b kern_openat(c519e480,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c519e480,804d420,0,602,180,...) at kern_open+0x35 open(c519e480,e705fcf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e705fd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38624 tid 100315 td 0xc8cfb6c0 sched_switch(c8cfb6c0,0,104,191,f7814b9a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8cfb6c0,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e70e0910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e70e0910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e70e0984,...) at _vn_lock+0x78 lookup(e70e0ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e70e0ba4,e70e0a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e70e0ba4,e70e0c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e70e0ba4,e70e0c5c,180,c564b3b8,315e,...) at vn_open+0x3b kern_openat(c8cfb6c0,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c8cfb6c0,804d420,0,602,180,...) at kern_open+0x35 open(c8cfb6c0,e70e0cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e70e0d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38623 tid 100156 td 0xc517c480 sched_switch(c517c480,0,104,191,d1306d62,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c517c480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6ea1910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6ea1910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6ea1984,...) at _vn_lock+0x78 lookup(e6ea1ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6ea1ba4,e6ea1a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6ea1ba4,e6ea1c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6ea1ba4,e6ea1c5c,180,cb89f118,315e,...) at vn_open+0x3b kern_openat(c517c480,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c517c480,804d420,0,602,180,...) at kern_open+0x35 open(c517c480,e6ea1cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6ea1d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command creat pid 38622 tid 100148 td 0xc5008d80 sched_switch(c5008d80,0,104,191,88aa373e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5008d80,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68547,80000,e6e818cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68547,80000,e6e818cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(c5e09570,81b0,c4a76000,e6e818cc,e6e818b8,...) at ffs_valloc+0x58f ufs_makeinode(e6e81bd0,c0daf360,e6e81abc,e6e81a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e6e81abc,c0cdead0,0,0,e6e81ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e6e81abc,e6e81bd0,e6e81a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e6e81ba4,e6e81c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e6e81ba4,e6e81c5c,1b0,c4aefc78,c0cca82f,...) at vn_open+0x3b kern_openat(c5008d80,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c5008d80,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c5008d80,e6e81cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6e81d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command lockf pid 38621 tid 100219 td 0xc7f3fb40 sched_switch(c7f3fb40,0,104,191,d12ea506,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7f3fb40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6fc0910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6fc0910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6fc0984,...) at _vn_lock+0x78 lookup(e6fc0ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6fc0ba4,e6fc0a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6fc0ba4,e6fc0c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6fc0ba4,e6fc0c5c,180,c4b23070,315e,...) at vn_open+0x3b kern_openat(c7f3fb40,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c7f3fb40,804d420,0,602,180,...) at kern_open+0x35 open(c7f3fb40,e6fc0cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6fc0d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38620 tid 100122 td 0xc4b0a480 sched_switch(c4b0a480,0,104,191,f779d636,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b0a480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6e1b910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e1b910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6e1b984,...) at _vn_lock+0x78 lookup(e6e1bba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6e1bba4,e6e1ba80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6e1bba4,e6e1bc5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6e1bba4,e6e1bc5c,180,cb89f1f8,315e,...) at vn_open+0x3b kern_openat(c4b0a480,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c4b0a480,804d420,0,602,180,...) at kern_open+0x35 open(c4b0a480,e6e1bcf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6e1bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38619 tid 100332 td 0xc8d52900 sched_switch(c8d52900,0,104,191,e1acfeb2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8d52900,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7113910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7113910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7113984,...) at _vn_lock+0x78 lookup(e7113ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7113ba4,e7113a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e7113ba4,e7113c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e7113ba4,e7113c5c,180,c7d98658,315e,...) at vn_open+0x3b kern_openat(c8d52900,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c8d52900,804d420,0,602,180,...) at kern_open+0x35 open(c8d52900,e7113cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e7113d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38618 tid 100239 td 0xc804b240 sched_switch(c804b240,0,104,191,f77b9252,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804b240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6ffc910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6ffc910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6ffc984,...) at _vn_lock+0x78 lookup(e6ffcba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6ffcba4,e6ffca80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6ffcba4,e6ffcc5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6ffcba4,e6ffcc5c,180,c7f57188,315e,...) at vn_open+0x3b kern_openat(c804b240,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c804b240,804d420,0,602,180,...) at kern_open+0x35 open(c804b240,e6ffccf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6ffcd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38617 tid 100421 td 0xc47fa480 sched_switch(c47fa480,0,104,191,52b0d28a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47fa480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e726a910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e726a910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e726a984,...) at _vn_lock+0x78 lookup(e726aba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e726aba4,e726aa80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e726aba4,e726ac5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e726aba4,e726ac5c,180,c6976738,315e,...) at vn_open+0x3b kern_openat(c47fa480,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c47fa480,804d420,0,602,180,...) at kern_open+0x35 open(c47fa480,e726acf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e726ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf2 pid 38616 tid 100360 td 0xc6e4fb40 sched_switch(c6e4fb40,0,60b,18c,8bf13792,...) at sched_switch+0x406 mi_switch(60b,0,c0ca18d4,815,1,...) at mi_switch+0x200 sched_preempt(c6e4fb40,1,c6c54440,e7167a4c,c0baef6e,...) at sched_preempt+0xb5 ipi_bitmap_handler(e7160008,28,c7d40028,0,c7341d00,...) at ipi_bitmap_handler+0x34 Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e --- interrupt, eip = 0xc087821b, esp = 0xe7167a4c, ebp = 0xe7167a4c --- lf_blocks(cb616d00,0,c0c9cff6,290,c0f3c9d0,...) at lf_blocks+0xb lf_advlockasync(e7167acc,cb616d94,100000,0,c0d9db80,...) at lf_advlockasync+0xd2d lf_advlock(e7167c00,cb616d94,100000,0,1,...) at lf_advlock+0x55 vop_stdadvlock(e7167c00,c0cde40b,c4aefd90,c4aefd90,cb616c3c,...) at vop_stdadvlock+0xb5 VOP_ADVLOCK_APV(c0daee60,e7167c00,245,196,c092ba5f,...) at VOP_ADVLOCK_APV+0xd6 kern_fcntl(c6e4fb40,3,c,e7167c40,e84ac,...) at kern_fcntl+0x9a2 fcntl(c6e4fb40,e7167cf8,c,c0ca6b15,c0d8cb70,...) at fcntl+0x101 syscall(e7167d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (92, FreeBSD ELF32, fcntl), eip = 0x28179aff, esp = 0xbfbfe6dc, ebp = 0xbfbfe718 --- Tracing command rename pid 38615 tid 100188 td 0xc4c39d80 sched_switch(c4c39d80,0,104,191,47316be0,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4c39d80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7946000,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7946000,c7946088,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4c39d80,96ea,e6f2cc74,0,0,...) at kern_wait+0xb76 wait4(c4c39d80,e6f2ccf8,10,c4c39d80,c0d8c224,...) at wait4+0x3b syscall(e6f2cd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe75c, ebp = 0xbfbfe778 --- Tracing command fts pid 38614 tid 100265 td 0xc7d44b40 sched_switch(c7d44b40,0,104,191,53b1edb6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7d44b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e704a84c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e704a84c,c7d44be4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c7d44b40,231,200000,...) at vget+0xbb cache_lookup(c5082414,e704abbc,e704abd0,e704abbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e704a988,c0cadf84,c0dc9460,200000,e704aba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e704a988,e704abd0,1f1,e704abbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e704aba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e704aba4,e704aa80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e704aba4,e704ac5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e704aba4,e704ac5c,0,c4b23658,c0cca82f,...) at vn_open+0x3b kern_openat(c7d44b40,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c7d44b40,2819847f,0,0,0,...) at kern_open+0x35 open(c7d44b40,e704acf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e704ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command fts pid 38613 tid 100185 td 0xc4dd6480 sched_switch(c4dd6480,0,104,191,a140f4e2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4dd6480,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6f2384c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6f2384c,c4dd6524,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c4dd6480,231,200000,...) at vget+0xbb cache_lookup(c5082414,e6f23bbc,e6f23bd0,e6f23bbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e6f23988,c0cadf84,c0dc9460,200000,e6f23ba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e6f23988,e6f23bd0,1f1,e6f23bbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e6f23ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e6f23ba4,e6f23a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6f23ba4,e6f23c5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6f23ba4,e6f23c5c,0,c4da33f0,c0cca82f,...) at vn_open+0x3b kern_openat(c4dd6480,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c4dd6480,2819847f,0,0,0,...) at kern_open+0x35 open(c4dd6480,e6f23cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6f23d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command fts pid 38612 tid 100299 td 0xc861d000 sched_switch(c861d000,0,104,191,4ce83e26,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c861d000,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e70b084c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e70b084c,c861d0a4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c861d000,231,200000,...) at vget+0xbb cache_lookup(c5082414,e70b0bbc,e70b0bd0,e70b0bbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e70b0988,c0cadf84,c0dc9460,200000,e70b0ba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e70b0988,e70b0bd0,1f1,e70b0bbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e70b0ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e70b0ba4,e70b0a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e70b0ba4,e70b0c5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e70b0ba4,e70b0c5c,0,c4bf8818,c0cca82f,...) at vn_open+0x3b kern_openat(c861d000,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c861d000,2819847f,0,0,0,...) at kern_open+0x35 open(c861d000,e70b0cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e70b0d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command mkdir pid 38611 tid 100138 td 0xc5159480 sched_switch(c5159480,0,104,191,46b55cda,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c5159480,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c51552a8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c51552a8,c5155330,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c5159480,96e8,e6e59c74,0,0,...) at kern_wait+0xb76 wait4(c5159480,e6e59cf8,10,c5159480,c0d8c224,...) at wait4+0x3b syscall(e6e59d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe76c, ebp = 0xbfbfe788 --- Tracing command fts pid 38610 tid 100149 td 0xc5008b40 sched_switch(c5008b40,0,104,191,4ce7d7e2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5008b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6e85c18,e6e85c18,c087efdc,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e85c18,c500f15c,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cae64e,2f2,c5304d00,...) at _vn_lock+0x78 fchdir(c5008b40,e6e85cf8,4,c0ca6a01,c0d8c2cc,...) at fchdir+0xfd syscall(e6e85d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (13, FreeBSD ELF32, fchdir), eip = 0x280ea1ff, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command fts pid 38609 tid 100240 td 0xc804b000 sched_switch(c804b000,0,104,191,3e6b66ee,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804b000,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6fff84c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6fff84c,c804b0a4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c804b000,231,200000,...) at vget+0xbb cache_lookup(c5082414,e6fffbbc,e6fffbd0,e6fffbbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e6fff988,c0cadf84,c0dc9460,200000,e6fffba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e6fff988,e6fffbd0,1f1,e6fffbbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e6fffba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e6fffba4,e6fffa80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6fffba4,e6fffc5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6fffba4,e6fffc5c,0,c7f574d0,c0cca82f,...) at vn_open+0x3b kern_openat(c804b000,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c804b000,2819847f,0,0,0,...) at kern_open+0x35 open(c804b000,e6fffcf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6fffd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command fts pid 38608 tid 100199 td 0xc519b240 sched_switch(c519b240,0,104,191,3e6bc2ce,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c519b240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6f68910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6f68910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6f68984,...) at _vn_lock+0x78 lookup(e6f68ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6f68ba4,e6f68a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6f68ba4,e6f68c5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6f68ba4,e6f68c5c,0,c4ce0d58,4b2e72de,...) at vn_open+0x3b kern_openat(c519b240,ffffff9c,2822c0b8,0,5,...) at kern_openat+0x11f kern_open(c519b240,2822c0b8,0,4,28200000,...) at kern_open+0x35 open(c519b240,e6f68cf8,c,e6f68c9c,c0d8c1ec,...) at open+0x30 syscall(e6f68d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe61c, ebp = 0xbfbfe698 --- Tracing command fts pid 38607 tid 100071 td 0xc481c900 sched_switch(c481c900,0,104,191,3e6b937e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c481c900,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6d1d84c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6d1d84c,c481c9a4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c481c900,231,200000,...) at vget+0xbb cache_lookup(c5082414,e6d1dbbc,e6d1dbd0,e6d1dbbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e6d1d988,c0cadf84,c0dc9460,200000,e6d1dba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e6d1d988,e6d1dbd0,1f1,e6d1dbbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e6d1dba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e6d1dba4,e6d1da80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6d1dba4,e6d1dc5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6d1dba4,e6d1dc5c,0,c7f57888,c0cca82f,...) at vn_open+0x3b kern_openat(c481c900,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c481c900,2819847f,0,0,0,...) at kern_open+0x35 open(c481c900,e6d1dcf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6d1dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command fts pid 38606 tid 100422 td 0xc47fa240 sched_switch(c47fa240,0,104,191,4ce80ae2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47fa240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e726d84c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e726d84c,c47fa2e4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c47fa240,231,200000,...) at vget+0xbb cache_lookup(c6453c3c,e726dbbc,e726dbd0,e726dbbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e726d988,c0cadf84,c0dc9460,200000,e726dba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e726d988,e726dbd0,1f1,e726dbbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e726dba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e726dba4,e726da80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e726dba4,e726dc5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e726dba4,e726dc5c,0,c564b1c0,c0cca82f,...) at vn_open+0x3b kern_openat(c47fa240,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c47fa240,2819847f,0,0,0,...) at kern_open+0x35 open(c47fa240,e726dcf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e726dd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe60c, ebp = 0xbfbfe698 --- Tracing command lockf pid 38605 tid 100231 td 0xc804c240 sched_switch(c804c240,0,104,191,d12cc022,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804c240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6fe4910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6fe4910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6fe4984,...) at _vn_lock+0x78 lookup(e6fe4ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6fe4ba4,e6fe4a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6fe4ba4,e6fe4c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6fe4ba4,e6fe4c5c,180,c7f57578,315e,...) at vn_open+0x3b kern_openat(c804c240,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c804c240,804d420,0,602,180,...) at kern_open+0x35 open(c804c240,e6fe4cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6fe4d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf2 pid 38604 tid 100107 td 0xc4c03d80 sched_switch(c4c03d80,0,60b,18c,8bf0aa0a,...) at sched_switch+0x406 mi_switch(60b,0,c0ca18d4,815,3,...) at mi_switch+0x200 sched_preempt(c4c03d80,3,c7d46240,e6deeab4,c0baef6e,...) at sched_preempt+0xb5 ipi_bitmap_handler(c8260008,28,c7d40028,0,c7d46240,...) at ipi_bitmap_handler+0x34 Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e --- interrupt, eip = 0xc087af8c, esp = 0xe6deea54, ebp = 0xe6deeab4 --- lf_advlockasync(e6deeacc,cb659980,100000,0,c0d9db80,...) at lf_advlockasync+0xd6c lf_advlock(e6deec00,cb659980,100000,0,1,...) at lf_advlock+0x55 vop_stdadvlock(e6deec00,c0cde40b,c4aee1c0,c4aee1c0,cb659828,...) at vop_stdadvlock+0xb5 VOP_ADVLOCK_APV(c0daee60,e6deec00,c0c9a725,25b,c092ba5f,...) at VOP_ADVLOCK_APV+0xd6 kern_fcntl(c4c03d80,3,d,e6deec40,f189c,...) at kern_fcntl+0x95f fcntl(c4c03d80,e6deecf8,c,c0ca6936,c0d8cb70,...) at fcntl+0x101 syscall(e6deed38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (92, FreeBSD ELF32, fcntl), eip = 0x28179aff, esp = 0xbfbfe6dc, ebp = 0xbfbfe718 --- Tracing command creat pid 38603 tid 100418 td 0xc52c1240 sched_switch(c52c1240,0,104,191,87edeb66,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c52c1240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68542,80000,e72618cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68542,80000,e72618cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb3c6ae0,81b0,c4a76000,e72618cc,e72618b8,...) at ffs_valloc+0x58f ufs_makeinode(e7261bd0,c0daf360,e7261abc,e7261a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e7261abc,c0cdead0,0,0,e7261ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e7261abc,e7261bd0,e7261a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e7261ba4,e7261c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e7261ba4,e7261c5c,1b0,c4bf8ab8,c0cca82f,...) at vn_open+0x3b kern_openat(c52c1240,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c52c1240,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c52c1240,e7261cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e7261d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command creat pid 38602 tid 100285 td 0xc8a7a240 sched_switch(c8a7a240,0,104,191,889d466e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8a7a240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68545,80000,e70868cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68545,80000,e70868cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb6dc828,81b0,c4a76000,e70868cc,e70868b8,...) at ffs_valloc+0x58f ufs_makeinode(e7086bd0,c0daf360,e7086abc,e7086a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e7086abc,c0cdead0,0,0,e7086ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e7086abc,e7086bd0,e7086a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e7086ba4,e7086c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e7086ba4,e7086c5c,1b0,c7d982d8,c0cca82f,...) at vn_open+0x3b kern_openat(c8a7a240,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c8a7a240,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c8a7a240,e7086cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e7086d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command link pid 38601 tid 100435 td 0xc52ca480 cpustop_handler(1,e72967ec,c0bcc826,c089ba48,8a36bf92,...) at cpustop_handler+0x32 ipi_nmi_handler(c089ba48,8a36bf92,800671c9,369e99,c52977f8,...) at ipi_nmi_handler+0x2f trap(e72967f8) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc088e930, esp = 0xe7296838, ebp = 0xe729685c --- panic(c0caaf3e,d8754b40,e72968c0,c090b8b9,d8754b40,...) at panic+0x30 bremfree(d8754b40,81900,c4ad37c4,c0cab933,50,...) at bremfree+0x20 getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x199 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb689ae0,0,6000,0,6813d,...) at ffs_update+0x1a2 ufs_direnter(cb689ae0,c62c6d98,e7296a10,e7296bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e7296c24,c0cde983,0,0,c62c6d98,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e7296c24,c62c6d98,e7296bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c52ca480,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c52ca480,bfbfe674,bfbfe6f4,0,e7296d2c,...) at kern_link+0x3e link(c52ca480,e7296cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e7296d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command creat pid 38600 tid 100092 td 0xc4c03000 sched_switch(c4c03000,0,104,191,87e783d2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c4c03000,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(d85f1a40,4c,c0cab20a,0,0,...) at sleepq_wait+0x63 _sleep(d85f1a40,c454f484,4c,c0cab20a,0,...) at _sleep+0x36b bwait(d85f1a40,4c,c0cab20a,d85f1a40,e6da7730,...) at bwait+0x6f bufwait(d85f1a40,0,0,0,0,...) at bufwait+0x28 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x132 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68540,80000,e6da78cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68540,80000,e6da78cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb3e0828,81b0,c4a76000,e6da78cc,e6da78b8,...) at ffs_valloc+0x58f ufs_makeinode(e6da7bd0,c0daf360,e6da7abc,e6da7a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e6da7abc,c0cdead0,0,0,e6da7ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e6da7abc,e6da7bd0,e6da7a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e6da7ba4,e6da7c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e6da7ba4,e6da7c5c,1b0,c7f57d20,c0cca82f,...) at vn_open+0x3b kern_openat(c4c03000,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c4c03000,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c4c03000,e6da7cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6da7d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command link pid 38599 tid 100201 td 0xc517cd80 sched_switch(c517cd80,0,104,191,8a74c63e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c517cd80,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb65d6cc,0,7800,0,68141,...) at ffs_update+0x1a2 ufs_direnter(cb65d6cc,c5214d98,e6f6ea10,e6f6ebfc,0,...) at ufs_direnter+0x2d8 ufs_link(e6f6ec24,c0cde983,0,0,c5214d98,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e6f6ec24,c5214d98,e6f6ebfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c517cd80,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c517cd80,bfbfe674,bfbfe6f4,0,e6f6ed2c,...) at kern_link+0x3e link(c517cd80,e6f6ecf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e6f6ed38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command creat pid 38598 tid 100215 td 0xc4b306c0 sched_switch(c4b306c0,0,104,191,889b00ee,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4b306c0,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68544,80000,e6fb48cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68544,80000,e6fb48cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb386d98,81b0,c4a76000,e6fb48cc,e6fb48b8,...) at ffs_valloc+0x58f ufs_makeinode(e6fb4bd0,c0daf360,e6fb4abc,e6fb4a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e6fb4abc,c0cdead0,0,0,e6fb4ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e6fb4abc,e6fb4bd0,e6fb4a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e6fb4ba4,e6fb4c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e6fb4ba4,e6fb4c5c,1b0,cb89f2a0,c0cca82f,...) at vn_open+0x3b kern_openat(c4b306c0,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c4b306c0,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c4b306c0,e6fb4cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6fb4d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command link pid 38597 tid 100383 td 0xc535f000 sched_switch(c535f000,0,104,191,8bf29f4e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c535f000,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb57f6cc,0,4800,0,68149,...) at ffs_update+0x1a2 ufs_direnter(cb57f6cc,c662b570,e71f8a10,e71f8bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e71f8c24,c0cde983,0,0,c662b570,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e71f8c24,c662b570,e71f8bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c535f000,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c535f000,bfbfe674,bfbfe6f4,0,e71f8d2c,...) at kern_link+0x3e link(c535f000,e71f8cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e71f8d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command creat pid 38596 tid 100174 td 0xc519d480 sched_switch(c519d480,0,104,191,889f3886,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c519d480,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68546,80000,e6ee98cc,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68546,80000,e6ee98cc,c0aab220,...) at ffs_vget+0x2e ffs_valloc(cb714570,81b0,c4a76000,e6ee98cc,e6ee98b8,...) at ffs_valloc+0x58f ufs_makeinode(e6ee9bd0,c0daf360,e6ee9abc,e6ee9a18,c0be63c5,...) at ufs_makeinode+0xc3 ufs_create(e6ee9abc,c0cdead0,0,0,e6ee9ba4,...) at ufs_create+0x30 VOP_CREATE_APV(c0daee60,e6ee9abc,e6ee9bd0,e6ee9a54,0,...) at VOP_CREATE_APV+0xc5 vn_open_cred(e6ee9ba4,e6ee9c5c,1b0,0,c4a76000,...) at vn_open_cred+0x205 vn_open(e6ee9ba4,e6ee9c5c,1b0,c4da3d90,c0cca82f,...) at vn_open+0x3b kern_openat(c519d480,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c519d480,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c519d480,e6ee9cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e6ee9d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command link pid 38595 tid 100317 td 0xc8cfb240 sched_switch(c8cfb240,0,104,191,8a5ebfe6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8cfb240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb612c3c,0,6400,0,68140,...) at ffs_update+0x1a2 ufs_direnter(cb612c3c,c5214c3c,e70e6a10,e70e6bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e70e6c24,c0cde983,0,0,c5214c3c,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e70e6c24,c5214c3c,e70e6bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c8cfb240,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c8cfb240,bfbfe674,bfbfe6f4,0,e70e6d2c,...) at kern_link+0x3e link(c8cfb240,e70e6cf8,8,e70e6ca0,c0d8c25c,...) at link+0x29 syscall(e70e6d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command link pid 38594 tid 100146 td 0xc5158240 sched_switch(c5158240,0,104,191,8a861882,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5158240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb4f72b8,0,6e00,0,6813e,...) at ffs_update+0x1a2 ufs_direnter(cb4f72b8,c6908570,e6e79a10,e6e79bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e6e79c24,c0cde983,0,0,c6908570,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e6e79c24,c6908570,e6e79bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c5158240,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c5158240,bfbfe674,bfbfe6f4,0,e6e79d2c,...) at kern_link+0x3e link(c5158240,e6e79cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e6e79d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command fts pid 38593 tid 100356 td 0xc8d54b40 sched_switch(c8d54b40,0,104,191,53b1bc52,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8d54b40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e715bc18,e715bc18,c087efdc,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e715bc18,c500f15c,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cae64e,2f2,c7bd5300,...) at _vn_lock+0x78 fchdir(c8d54b40,e715bcf8,4,e715bc9c,c0d8c2cc,...) at fchdir+0xfd syscall(e715bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (13, FreeBSD ELF32, fchdir), eip = 0x280ea1ff, esp = 0xbfbfe60c, ebp = 0xbfbfe698 --- Tracing command lockf pid 38592 tid 100429 td 0xc47f7240 sched_switch(c47f7240,0,104,191,c6d15c02,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47f7240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7282910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7282910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7282984,...) at _vn_lock+0x78 lookup(e7282ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7282ba4,e7282a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e7282ba4,e7282c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e7282ba4,e7282c5c,180,cb89f738,315e,...) at vn_open+0x3b kern_openat(c47f7240,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c47f7240,804d420,0,602,180,...) at kern_open+0x35 open(c47f7240,e7282cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e7282d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command fts pid 38591 tid 100312 td 0xc8cfbd80 sched_switch(c8cfbd80,0,104,191,a0e40302,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8cfbd80,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e70d784c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e70d784c,c8cfbe24,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c8cfbd80,231,200000,...) at vget+0xbb cache_lookup(c5082414,e70d7bbc,e70d7bd0,e70d7bbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e70d7988,c0cadf84,c0dc9460,200000,e70d7ba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e70d7988,e70d7bd0,1f1,e70d7bbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e70d7ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e70d7ba4,e70d7a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e70d7ba4,e70d7c5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e70d7ba4,e70d7c5c,0,c4bf8268,c0cca82f,...) at vn_open+0x3b kern_openat(c8cfbd80,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c8cfbd80,2819847f,0,0,0,...) at kern_open+0x35 open(c8cfbd80,e70d7cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e70d7d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe67c, ebp = 0xbfbfe708 --- Tracing command lockf pid 38590 tid 100461 td 0xc7647000 sched_switch(c7647000,0,104,191,4657b862,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7647000,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e72fd910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e72fd910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e72fd984,...) at _vn_lock+0x78 lookup(e72fdba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e72fdba4,e72fda80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e72fdba4,e72fdc5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e72fdba4,e72fdc5c,180,c564ba48,315e,...) at vn_open+0x3b kern_openat(c7647000,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c7647000,804d420,0,602,180,...) at kern_open+0x35 open(c7647000,e72fdcf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e72fdd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command fts pid 38589 tid 100386 td 0xc6e5d900 sched_switch(c6e5d900,0,104,191,69cbf966,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c6e5d900,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e72019d8,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e72019d8,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7201a4c,...) at _vn_lock+0x78 lookup(e7201b5c,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7201b5c,e7201afc,60,0,c6e5d900,...) at namei+0x57f kern_statat_vnhook(c6e5d900,200,ffffff9c,282313b8,0,...) at kern_statat_vnhook+0x72 kern_statat(c6e5d900,200,ffffff9c,282313b8,0,...) at kern_statat+0x3c kern_lstat(c6e5d900,282313b8,0,e7201c18,54,...) at kern_lstat+0x36 lstat(c6e5d900,e7201cf8,8,e7201c9c,c0d8d628,...) at lstat+0x2f syscall(e7201d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (190, FreeBSD ELF32, lstat), eip = 0x2817c583, esp = 0xbfbfe60c, ebp = 0xbfbfe698 --- Tracing command lockf pid 38588 tid 100385 td 0xc6e5db40 sched_switch(c6e5db40,0,104,191,e1a969a2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c6e5db40,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e71fe910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e71fe910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e71fe984,...) at _vn_lock+0x78 lookup(e71feba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e71feba4,e71fea80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e71feba4,e71fec5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e71feba4,e71fec5c,180,c7d987e0,315e,...) at vn_open+0x3b kern_openat(c6e5db40,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c6e5db40,804d420,0,602,180,...) at kern_open+0x35 open(c6e5db40,e71fecf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e71fed38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command lockf pid 38587 tid 100140 td 0xc5159000 sched_switch(c5159000,0,104,191,52aef486,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5159000,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6e61910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6e61910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6e61984,...) at _vn_lock+0x78 lookup(e6e61ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6e61ba4,e6e61a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6e61ba4,e6e61c5c,180,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e6e61ba4,e6e61c5c,180,c564b2d8,315e,...) at vn_open+0x3b kern_openat(c5159000,ffffff9c,804d420,0,603,...) at kern_openat+0x11f kern_open(c5159000,804d420,0,602,180,...) at kern_open+0x35 open(c5159000,e6e61cf8,c,c0ca693c,c0d8c1ec,...) at open+0x30 syscall(e6e61d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe73c, ebp = 0xbfbfe768 --- Tracing command fts pid 38586 tid 100361 td 0xc6e4f900 sched_switch(c6e4f900,0,104,191,69cb8ad2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c6e4f900,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200100,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e716a84c,c08d1b2b,c0cac192,200100,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e716a84c,c6e4f9a4,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200100,c0cad30e,823,0,...) at _vn_lock+0x78 vget(c500f15c,200100,c6e4f900,231,200000,...) at vget+0xbb cache_lookup(cb3edd98,e716abbc,e716abd0,e716abbc,c4a76000,...) at cache_lookup+0x67b vfs_cache_lookup(e716a988,c0cadf84,c0dc9460,200000,e716aba4,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0daee60,e716a988,e716abd0,1f1,e716abbc,...) at VOP_LOOKUP_APV+0xe5 lookup(e716aba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x67b namei(e716aba4,e716aa80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e716aba4,e716ac5c,0,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e716aba4,e716ac5c,0,c7f571c0,c0cca82f,...) at vn_open+0x3b kern_openat(c6e4f900,ffffff9c,2819847f,0,1,...) at kern_openat+0x11f kern_open(c6e4f900,2819847f,0,0,0,...) at kern_open+0x35 open(c6e4f900,e716acf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e716ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe60c, ebp = 0xbfbfe698 --- Tracing command symlink pid 38585 tid 100191 td 0xc79ec240 sched_switch(c79ec240,0,104,191,88944c1e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c79ec240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68543,80000,e6f359c0,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68543,80000,e6f359c0,c0aab220,...) at ffs_vget+0x2e ffs_valloc(c6f55c3c,a1ff,c4a76000,e6f359c0,1,...) at ffs_valloc+0x58f ufs_makeinode(e6f35bfc,c6f55c94,e6f35af8,c09108ba,c6f55c94,...) at ufs_makeinode+0xc3 ufs_symlink(e6f35c24,c0cde884,0,0,e6f35b68,...) at ufs_symlink+0x33 VOP_SYMLINK_APV(c0daee60,e6f35c24,e6f35bfc,e6f35b68,c5995400,...) at VOP_SYMLINK_APV+0xc5 kern_symlinkat(c79ec240,804bb28,ffffff9c,bfbfe6d0,0,...) at kern_symlinkat+0x27c kern_symlink(c79ec240,804bb28,bfbfe6d0,0,e6f35d2c,...) at kern_symlink+0x2e symlink(c79ec240,e6f35cf8,8,c0ca71cb,c0d8c79c,...) at symlink+0x29 syscall(e6f35d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (57, FreeBSD ELF32, symlink), eip = 0x280eafbf, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- Tracing command creat pid 38584 tid 100410 td 0xc52c5480 sched_switch(c52c5480,0,104,191,5590803a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c52c5480,0,c0ca42a7,260,c60fc880,...) at sleepq_switch+0x15f sleepq_wait(c60fc880,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c60fc880,200400,c60fc8ec,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7249910,0,c4536248,200400,c60fc828,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7249910,848,c0dc9820,c60fc828,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c60fc828,200400,c0cac900,1f1,e7249984,...) at _vn_lock+0x78 lookup(e7249ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7249ba4,e7249a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e7249ba4,e7249c5c,1b0,0,c4a76000,...) at vn_open_cred+0x90 vn_open(e7249ba4,e7249c5c,1b0,c4ce0c08,c0cca82f,...) at vn_open+0x3b kern_openat(c52c5480,ffffff9c,bfbfe6e4,0,602,...) at kern_openat+0x11f kern_open(c52c5480,bfbfe6e4,0,601,1b0,...) at kern_open+0x35 open(c52c5480,e7249cf8,c,c0cc1e09,c0d8c1ec,...) at open+0x30 syscall(e7249d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817d603, esp = 0xbfbfe68c, ebp = 0xbfbfe6a8 --- Tracing command mkfifo pid 38583 tid 100304 td 0xc804cd80 sched_switch(c804cd80,0,104,191,3e6afd6a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c804cd80,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e70bfa48,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e70bfa48,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e70bfabc,...) at _vn_lock+0x78 lookup(e70bfbd4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e70bfbd4,ffffffdf,e70bfc00,e70bfb6c,0,...) at namei+0x57f kern_mkfifoat(c804cd80,ffffff9c,804d240,0,1b6,...) at kern_mkfifoat+0x68 kern_mkfifo(c804cd80,804d240,0,1b6,e70bfd2c,...) at kern_mkfifo+0x2e mkfifo(c804cd80,e70bfcf8,8,c0ca693c,c0d8cfd0,...) at mkfifo+0x29 syscall(e70bfd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (132, FreeBSD ELF32, mkfifo), eip = 0x280eabdb, esp = 0xbfbfe72c, ebp = 0xbfbfe758 --- Tracing command mkfifo pid 38582 tid 100340 td 0xc8cfc6c0 kdb_enter(c0c9fd4b,c0c9fd4b,c0cc83f4,e712b638,2,...) at kdb_enter+0x3a panic(c0cc83f4,0,c0cc6347,2384,0,...) at panic+0x136 softdep_sync_metadata(c500f15c,0,c0cc8b93,146,0,...) at softdep_sync_metadata+0x8eb ffs_syncvnode(c500f15c,1,c4539030,c0f3b6d8,e712b740,...) at ffs_syncvnode+0x3e2 ffs_truncate(c500f15c,e00,0,880,c4a76000,...) at ffs_truncate+0x6a6 ufs_direnter(c500f15c,cb71c6cc,e712b9f8,e712bc00,0,...) at ufs_direnter+0x846 ufs_makeinode(e712bc00,c09212ff,c0daee60,e712bb28,c0daf360,...) at ufs_makeinode+0x595 ufs_mknod(e712bc28,c0cdea8e,0,0,e712bb6c,...) at ufs_mknod+0x35 VOP_MKNOD_APV(c0daee60,e712bc28,e712bc00,e712bb6c,0,...) at VOP_MKNOD_APV+0xc5 kern_mkfifoat(c8cfc6c0,ffffff9c,804d240,0,1b6,...) at kern_mkfifoat+0x217 kern_mkfifo(c8cfc6c0,804d240,0,1b6,e712bd2c,...) at kern_mkfifo+0x2e mkfifo(c8cfc6c0,e712bcf8,8,c0ca693c,c0d8cfd0,...) at mkfifo+0x29 syscall(e712bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (132, FreeBSD ELF32, mkfifo), eip = 0x280eabdb, esp = 0xbfbfe72c, ebp = 0xbfbfe758 --- Tracing command lockf pid 38581 tid 100347 td 0xc6e34000 sched_switch(c6e34000,0,104,191,43e3a96a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c6e34000,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c6e2e7f8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c6e2e7f8,c6e2e880,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c6e34000,96bb,e7140c74,0,0,...) at kern_wait+0xb76 wait4(c6e34000,e7140cf8,10,c6e34000,c0d8c224,...) at wait4+0x3b syscall(e7140d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe76c, ebp = 0xbfbfe788 --- Tracing command creat pid 38580 tid 100333 td 0xc8d526c0 sched_switch(c8d526c0,0,104,191,4513f542,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8d526c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c8cf22a8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c8cf22a8,c8cf2330,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c8d526c0,96b8,e7116c74,0,0,...) at kern_wait+0xb76 wait4(c8d526c0,e7116cf8,10,c8d526c0,c0d8c224,...) at wait4+0x3b syscall(e7116d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe76c, ebp = 0xbfbfe788 --- Tracing command symlink pid 38579 tid 100229 td 0xc79ec900 sched_switch(c79ec900,0,104,191,894075ae,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c79ec900,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,6854a,80000,e6fde9c0,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,6854a,80000,e6fde9c0,c0aab220,...) at ffs_vget+0x2e ffs_valloc(c6f55000,a1ff,c4a76000,e6fde9c0,1,...) at ffs_valloc+0x58f ufs_makeinode(e6fdebfc,c6f55058,e6fdeaf8,c09108ba,c6f55058,...) at ufs_makeinode+0xc3 ufs_symlink(e6fdec24,c0cde884,0,0,e6fdeb68,...) at ufs_symlink+0x33 VOP_SYMLINK_APV(c0daee60,e6fdec24,e6fdebfc,e6fdeb68,c64f3800,...) at VOP_SYMLINK_APV+0xc5 kern_symlinkat(c79ec900,804bb28,ffffff9c,bfbfe6d0,0,...) at kern_symlinkat+0x27c kern_symlink(c79ec900,804bb28,bfbfe6d0,0,e6fded2c,...) at kern_symlink+0x2e symlink(c79ec900,e6fdecf8,8,c0ca71cb,c0d8c79c,...) at symlink+0x29 syscall(e6fded38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (57, FreeBSD ELF32, symlink), eip = 0x280eafbf, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- Tracing command symlink pid 38578 tid 100329 td 0xc8d54000 sched_switch(c8d54000,0,104,191,7deb4ab6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8d54000,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c8d54000,0,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c8d54000,e710ac64,e710ac6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c8d54000,e710acf8,8,c0cc5d23,c0d8dba0,...) at nanosleep+0x6f syscall(e710ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe65c, ebp = 0xbfbfe688 --- Tracing command lockf2 pid 38577 tid 100277 td 0xc8a7b480 sched_switch(c8a7b480,0,60b,18c,8beff682,...) at sched_switch+0x406 mi_switch(60b,0,c0ca18d4,815,2,...) at mi_switch+0x200 sched_preempt(c8a7b480,2,c75f9a40,e706ea4c,c0baef6e,...) at sched_preempt+0xb5 ipi_bitmap_handler(c0ba0008,e7060028,e7060028,0,c75f9a40,...) at ipi_bitmap_handler+0x34 Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e --- interrupt, eip = 0xc0878204, esp = 0xe706ea44, ebp = 0xe706ea4c --- lf_overlaps(c0dfd4e0,c0c9cff6,5e8,5e6,c0f3d5d8,...) at lf_overlaps+0x54 lf_advlockasync(e706eacc,c60f0adc,100000,0,c0d9db80,...) at lf_advlockasync+0xd51 lf_advlock(e706ec00,c60f0adc,100000,0,1,...) at lf_advlock+0x55 vop_stdadvlock(e706ec00,c0cde40b,c6976540,c6976540,c60f0984,...) at vop_stdadvlock+0xb5 VOP_ADVLOCK_APV(c0daee60,e706ec00,c0c9a725,25b,c092ba5f,...) at VOP_ADVLOCK_APV+0xd6 kern_fcntl(c8a7b480,3,d,e706ec40,de7df,...) at kern_fcntl+0x95f fcntl(c8a7b480,e706ecf8,c,c0ca6936,c0d8cb70,...) at fcntl+0x101 syscall(e706ed38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (92, FreeBSD ELF32, fcntl), eip = 0x28179aff, esp = 0xbfbfe6dc, ebp = 0xbfbfe718 --- Tracing command symlink pid 38576 tid 100434 td 0xc52ca6c0 sched_switch(c52ca6c0,0,104,191,3e0980c2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c52ca6c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c52ca6c0,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c52ca6c0,e7292c64,e7292c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c52ca6c0,e7292cf8,8,c0cc5d23,c0d8dba0,...) at nanosleep+0x6f syscall(e7292d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe65c, ebp = 0xbfbfe688 --- Tracing command fts pid 38575 tid 100214 td 0xc4b30900 sched_switch(c4b30900,0,104,191,442bf8a6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4b30900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7f3d550,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7f3d550,c7f3d5d8,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4b30900,96ba,e6fb1c74,0,0,...) at kern_wait+0xb76 wait4(c4b30900,e6fb1cf8,10,c4b30900,c0d8c224,...) at wait4+0x3b syscall(e6fb1d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810007b, esp = 0xbfbfe77c, ebp = 0xbfbfe798 --- Tracing command symlink pid 38574 tid 100069 td 0xc481cd80 sched_switch(c481cd80,0,104,191,893cfbfa,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c481cd80,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d85f1aa0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d85f1aa0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,6765c0,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,6765c0,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,6765c0,0,4000,0,...) at bread+0x4c ffs_vgetf(c4ad2b50,68549,80000,e6d159c0,0,...) at ffs_vgetf+0x3aa ffs_vget(c4ad2b50,68549,80000,e6d159c0,c0aab220,...) at ffs_vget+0x2e ffs_valloc(c58a1d98,a1ff,c4a76000,e6d159c0,1,...) at ffs_valloc+0x58f ufs_makeinode(e6d15bfc,c58a1df0,e6d15af8,c09108ba,c58a1df0,...) at ufs_makeinode+0xc3 ufs_symlink(e6d15c24,c0cde884,0,0,e6d15b68,...) at ufs_symlink+0x33 VOP_SYMLINK_APV(c0daee60,e6d15c24,e6d15bfc,e6d15b68,c595e000,...) at VOP_SYMLINK_APV+0xc5 kern_symlinkat(c481cd80,804bb28,ffffff9c,bfbfe6d0,0,...) at kern_symlinkat+0x27c kern_symlink(c481cd80,804bb28,bfbfe6d0,0,e6d15d2c,...) at kern_symlink+0x2e symlink(c481cd80,e6d15cf8,8,c0ca71cb,c0d8c79c,...) at symlink+0x29 syscall(e6d15d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (57, FreeBSD ELF32, symlink), eip = 0x280eafbf, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- Tracing command lockf2 pid 38573 tid 100124 td 0xc4b0a000 sched_switch(c4b0a000,0,207,18c,484cac46,...) at sched_switch+0x406 mi_switch(207,0,c0ca4ae6,d6,5c,...) at mi_switch+0x200 ast(e6e23d38) at ast+0x2b3 doreti_ast() at doreti_ast+0x17 Tracing command symlink pid 38572 tid 100283 td 0xc8a7a6c0 sched_switch(c8a7a6c0,0,104,191,4f1aa34a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8a7a6c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c8a7a6c0,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c8a7a6c0,e7080c64,e7080c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c8a7a6c0,e7080cf8,8,c0cc5d23,c0d8dba0,...) at nanosleep+0x6f syscall(e7080d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe65c, ebp = 0xbfbfe688 --- Tracing command lockf2 pid 38571 tid 100409 td 0xc52c56c0 sched_switch(c52c56c0,0,104,191,3fba5bde,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c52c56c0,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e7246910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e7246910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e7246984,...) at _vn_lock+0x78 lookup(e7246ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e7246ba4,e7246a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e7246ba4,e7246c5c,180,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e7246ba4,e7246c5c,180,c4ce0a10,315e,...) at vn_open+0x3b kern_openat(c52c56c0,ffffff9c,804c3c0,0,3,...) at kern_openat+0x11f kern_open(c52c56c0,804c3c0,0,2,180,...) at kern_open+0x35 open(c52c56c0,e7246cf8,c,c0ca6c06,c0d8c1ec,...) at open+0x30 syscall(e7246d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe71c, ebp = 0xbfbfe758 --- Tracing command mkfifo pid 38570 tid 100276 td 0xc8a7b6c0 sched_switch(c8a7b6c0,0,104,191,40e87208,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8a7b6c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c8a77000,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c8a77000,c8a77088,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c8a7b6c0,96b6,e706bc74,0,0,...) at kern_wait+0xb76 wait4(c8a7b6c0,e706bcf8,10,c8a7b6c0,c0d8c224,...) at wait4+0x3b syscall(e706bd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe75c, ebp = 0xbfbfe778 --- Tracing command lockf2 pid 38569 tid 100157 td 0xc517c240 sched_switch(c517c240,0,104,191,3eb8a8f2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c517c240,0,c0ca42a7,260,c500f1b4,...) at sleepq_switch+0x15f sleepq_wait(c500f1b4,50,c0c988fb,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c500f1b4,200400,c500f220,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(e6ea5910,0,c4536248,200400,c500f15c,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0daee60,e6ea5910,848,c0dc9820,c500f15c,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c500f15c,200400,c0cac900,1f1,e6ea5984,...) at _vn_lock+0x78 lookup(e6ea5ba4,c0cac900,ea,c5,ffffff9c,...) at lookup+0x106 namei(e6ea5ba4,e6ea5a80,c0c9a72e,5aa,0,...) at namei+0x57f vn_open_cred(e6ea5ba4,e6ea5c5c,180,0,c4a76000,...) at vn_open_cred+0x31f vn_open(e6ea5ba4,e6ea5c5c,180,c6976498,315e,...) at vn_open+0x3b kern_openat(c517c240,ffffff9c,804c3c0,0,3,...) at kern_openat+0x11f kern_open(c517c240,804c3c0,0,2,180,...) at kern_open+0x35 open(c517c240,e6ea5cf8,c,c0ca6c06,c0d8c1ec,...) at open+0x30 syscall(e6ea5d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (5, FreeBSD ELF32, open), eip = 0x2817c603, esp = 0xbfbfe71c, ebp = 0xbfbfe758 --- Tracing command lockf2 pid 38568 tid 100335 td 0xc8d52240 sched_switch(c8d52240,0,60b,18c,8bf10812,...) at sched_switch+0x406 mi_switch(60b,0,c0ca18d4,815,0,...) at mi_switch+0x200 sched_preempt(c8d52240,0,c71eec80,e711ca4c,c0baef6e,...) at sched_preempt+0xb5 ipi_bitmap_handler(c0ba0008,e7110028,c6fb0028,0,c826d880,...) at ipi_bitmap_handler+0x34 Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e --- interrupt, eip = 0xc087821b, esp = 0xe711ca4c, ebp = 0xe711ca4c --- lf_blocks(c0dfd4e0,c0c9cff6,5e8,5e6,c0f3b9a8,...) at lf_blocks+0xb lf_advlockasync(e711cacc,cb68e2b4,100000,0,c0d9db80,...) at lf_advlockasync+0xd2d lf_advlock(e711cc00,cb68e2b4,100000,0,1,...) at lf_advlock+0x55 vop_stdadvlock(e711cc00,c0cde40b,cb89f2d8,cb89f2d8,cb68e15c,...) at vop_stdadvlock+0xb5 VOP_ADVLOCK_APV(c0daee60,e711cc00,c0c9a725,25b,c092ba5f,...) at VOP_ADVLOCK_APV+0xd6 kern_fcntl(c8d52240,3,d,e711cc40,af372,...) at kern_fcntl+0x95f fcntl(c8d52240,e711ccf8,c,c0ca6936,c0d8cb70,...) at fcntl+0x101 syscall(e711cd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (92, FreeBSD ELF32, fcntl), eip = 0x28179aff, esp = 0xbfbfe6dc, ebp = 0xbfbfe718 --- Tracing command link pid 38567 tid 100168 td 0xc5159900 sched_switch(c5159900,0,104,191,8b0f8f9e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c5159900,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb689984,0,7800,0,6813c,...) at ffs_update+0x1a2 ufs_direnter(cb689984,c69086cc,e6ed1a10,e6ed1bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e6ed1c24,c0cde983,0,0,c69086cc,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e6ed1c24,c69086cc,e6ed1bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c5159900,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c5159900,bfbfe674,bfbfe6f4,0,e6ed1d2c,...) at kern_link+0x3e link(c5159900,e6ed1cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e6ed1d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command link pid 38566 tid 100425 td 0xc47f7b40 sched_switch(c47f7b40,0,104,191,88cfb2d6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c47f7b40,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d863bb40,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d863bb40,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f60,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f60,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f60,0,4000,0,...) at bread+0x4c ffs_update(c51e0000,0,d800,0,6814e,...) at ffs_update+0x1a2 ufs_direnter(c51e0000,c69b2000,e7276a10,e7276bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e7276c24,c0cde983,0,0,c69b2000,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e7276c24,c69b2000,e7276bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c47f7b40,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c47f7b40,bfbfe674,bfbfe6f4,0,e7276d2c,...) at kern_link+0x3e link(c47f7b40,e7276cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e7276d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command link pid 38565 tid 100281 td 0xc8a7ab40 sched_switch(c8a7ab40,0,104,191,8ad8f31a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c8a7ab40,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb718c3c,0,4800,0,6814d,...) at ffs_update+0x1a2 ufs_direnter(cb718c3c,c69b2984,e707aa10,e707abfc,0,...) at ufs_direnter+0x2d8 ufs_link(e707ac24,c0cde983,0,0,c69b2984,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e707ac24,c69b2984,e707abfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c8a7ab40,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c8a7ab40,bfbfe674,bfbfe6f4,0,e707ad2c,...) at kern_link+0x3e link(c8a7ab40,e707acf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e707ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command link pid 38564 tid 100186 td 0xc4dd6240 sched_switch(c4dd6240,0,104,191,8a45d1de,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4dd6240,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d8754ba0,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d8754ba0,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f40,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f40,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f40,0,4000,0,...) at bread+0x4c ffs_update(cb68e000,0,6000,0,6813f,...) at ffs_update+0x1a2 ufs_direnter(cb68e000,c6908000,e6f26a10,e6f26bfc,0,...) at ufs_direnter+0x2d8 ufs_link(e6f26c24,c0cde983,0,0,c6908000,...) at ufs_link+0x176 VOP_LINK_APV(c0daee60,e6f26c24,c6908000,e6f26bfc,0,...) at VOP_LINK_APV+0xf6 kern_linkat(c4dd6240,ffffff9c,ffffff9c,bfbfe674,bfbfe6f4,...) at kern_linkat+0x2fa kern_link(c4dd6240,bfbfe674,bfbfe6f4,0,e6f26d2c,...) at kern_link+0x3e link(c4dd6240,e6f26cf8,8,c0c4cd45,c0d8c25c,...) at link+0x29 syscall(e6f26d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (9, FreeBSD ELF32, link), eip = 0x280eb23f, esp = 0xbfbfe63c, ebp = 0xbfbfe778 --- Tracing command symlink pid 38563 tid 100310 td 0xc8cfc240 sched_switch(c8cfc240,0,104,191,4129424a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8cfc240,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c8cf9000,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c8cf9000,c8cf9088,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c8cfc240,96ac,e70d1c74,0,0,...) at kern_wait+0xb76 wait4(c8cfc240,e70d1cf8,10,c8cfc240,c0d8c224,...) at wait4+0x3b syscall(e70d1d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe75c, ebp = 0xbfbfe778 --- Tracing command lockf2 pid 38562 tid 100447 td 0xc4aa4900 sched_switch(c4aa4900,0,104,191,4309d8f6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4aa4900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c51ff7f8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c51ff7f8,c51ff880,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4aa4900,96a8,e72d1c74,0,0,...) at kern_wait+0xb76 wait4(c4aa4900,e72d1cf8,10,c4aa4900,c0d8c224,...) at wait4+0x3b syscall(e72d1d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810007b, esp = 0xbfbfe75c, ebp = 0xbfbfe778 --- Tracing command link pid 38561 tid 100228 td 0xc79ecb40 sched_switch(c79ecb40,0,104,191,41f3a7a4,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c79ecb40,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c8026d48,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c8026d48,c8026dd0,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c79ecb40,96a4,e6fdbc74,0,0,...) at kern_wait+0xb76 wait4(c79ecb40,e6fdbcf8,10,c79ecb40,c0d8c224,...) at wait4+0x3b syscall(e6fdbd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810107b, esp = 0xbfbfe77c, ebp = 0xbfbfe798 --- Tracing command mkfifo pid 38560 tid 100403 td 0xc5360b40 sched_switch(c5360b40,0,104,191,72aaa072,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c5360b40,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c5360b40,2,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c5360b40,e7234c64,e7234c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c5360b40,e7234cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7234d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe77c, ebp = 0xbfbfe7a8 --- Tracing command rename pid 38558 tid 100264 td 0xc7d44d80 sched_switch(c7d44d80,0,104,191,763c3596,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7d44d80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c7d44d80,3,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c7d44d80,e7047c64,e7047c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c7d44d80,e7047cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7047d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe77c, ebp = 0xbfbfe7a8 --- Tracing command mkdir pid 38557 tid 100345 td 0xc6e34480 sched_switch(c6e34480,0,104,191,7a421b5e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c6e34480,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c6e34480,0,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c6e34480,e713ac64,e713ac6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c6e34480,e713acf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e713ad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe78c, ebp = 0xbfbfe7b8 --- Tracing command creat pid 38556 tid 100284 td 0xc8a7a480 sched_switch(c8a7a480,0,104,191,72f57ece,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8a7a480,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c8a7a480,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c8a7a480,e7083c64,e7083c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c8a7a480,e7083cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7083d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe78c, ebp = 0xbfbfe7b8 --- Tracing command lockf pid 38555 tid 100424 td 0xc47f7d80 sched_switch(c47f7d80,0,104,191,7b356d52,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c47f7d80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c47f7d80,3,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c47f7d80,e7273c64,e7273c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c47f7d80,e7273cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7273d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe78c, ebp = 0xbfbfe7b8 --- Tracing command link pid 38554 tid 100238 td 0xc804b480 sched_switch(c804b480,0,104,191,72f69736,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c804b480,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c804b480,0,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c804b480,e6ff9c64,e6ff9c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c804b480,e6ff9cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e6ff9d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe79c, ebp = 0xbfbfe7c8 --- Tracing command fts pid 38553 tid 100123 td 0xc4b0a240 sched_switch(c4b0a240,0,104,191,72cb833a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4b0a240,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c4b0a240,2,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c4b0a240,e6e1ec64,e6e1ec6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c4b0a240,e6e1ecf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e6e1ed38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816dad7, esp = 0xbfbfe79c, ebp = 0xbfbfe7c8 --- Tracing command rw pid 38552 tid 100196 td 0xc79eb6c0 sched_switch(c79eb6c0,0,104,191,78bedd96,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c79eb6c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c79eb6c0,3,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c79eb6c0,e6f44c64,e6f44c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c79eb6c0,e6f44cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e6f44d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe7ac, ebp = 0xbfbfe7d8 --- Tracing command symlink pid 38550 tid 100337 td 0xc8cfcd80 sched_switch(c8cfcd80,0,104,191,7312ddde,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c8cfcd80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c8cfcd80,3,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c8cfcd80,e7122c64,e7122c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c8cfcd80,e7122cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7122d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816ead7, esp = 0xbfbfe77c, ebp = 0xbfbfe7a8 --- Tracing command lockf2 pid 38549 tid 100321 td 0xc4ab9900 sched_switch(c4ab9900,0,104,191,72f4acfe,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4ab9900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c4ab9900,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c4ab9900,e70f2c64,e70f2c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c4ab9900,e70f2cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e70f2d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816dad7, esp = 0xbfbfe77c, ebp = 0xbfbfe7a8 --- Tracing command run pid 37885 tid 100221 td 0xc7f3f6c0 sched_switch(c7f3f6c0,0,104,191,47c82ae6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7f3f6c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7f3c2a8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7f3c2a8,c7f3c330,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c7f3f6c0,9695,e6fc6c74,0,0,...) at kern_wait+0xb76 wait4(c7f3f6c0,e6fc6cf8,10,c7f3f6c0,c0d8c224,...) at wait4+0x3b syscall(e6fc6d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810007b, esp = 0xbfbfe18c, ebp = 0xbfbfe1a8 --- Tracing command run pid 37884 tid 100420 td 0xc4b75d80 sched_switch(c4b75d80,0,104,191,32c17bda,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4b75d80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c52a8000,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c52a8000,c52a8088,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4b75d80,93fd,e7267c74,0,0,...) at kern_wait+0xb76 wait4(c4b75d80,e7267cf8,10,c4b75d80,c0d8c224,...) at wait4+0x3b syscall(e7267d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2810007b, esp = 0xbfbfe63c, ebp = 0xbfbfe658 --- Tracing command run pid 37883 tid 100243 td 0xc804a900 sched_switch(c804a900,0,104,191,46f6d386,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c804a900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c804a900,0,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,3e9,...) at _sleep+0x31e kern_nanosleep(c804a900,e7008c64,e7008c6c,1,0,...) at kern_nanosleep+0xc1 nanosleep(c804a900,e7008cf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e7008d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2816dad7, esp = 0xbfbfe65c, ebp = 0xbfbfe688 --- Tracing command sh pid 37876 tid 100210 td 0xc7d426c0 sched_switch(c7d426c0,0,104,191,312149c6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7d426c0,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7947aa0,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7947aa0,c7947b28,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c7d426c0,ffffffff,e6f89c74,2,0,...) at kern_wait+0xb76 wait4(c7d426c0,e6f89cf8,10,c0ca6aa8,c0d8c224,...) at wait4+0x3b syscall(e6f89d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815e07b, esp = 0xbfbfe81c, ebp = 0xbfbfe838 --- Tracing command awk pid 1146 tid 100177 td 0xc519d000 sched_switch(c519d000,0,104,191,f84ad6a6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c519d000,0,c0ca42a7,1a0,4c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4c64dc8,4c,c0ca66e0,100,0,...) at sleepq_wait_sig+0x17 _sleep(c4c64dc8,c4c64f38,14c,c0ca66e0,0,...) at _sleep+0x354 pipe_read(c4aef4d0,e6ef4c58,c54b8a00,0,c519d000,...) at pipe_read+0x417 dofileread(e6ef4c58,ffffffff,ffffffff,0,c4aef4d0,...) at dofileread+0x96 kern_readv(c519d000,0,e6ef4c58,e6ef4c78,1,...) at kern_readv+0x58 read(c519d000,e6ef4cf8,c,c519d000,c0d8c1b4,...) at read+0x4f syscall(e6ef4d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x281b20b3, esp = 0xbfbfe97c, ebp = 0xbfbfe998 --- Tracing command sh pid 1145 tid 100109 td 0xc4c03900 sched_switch(c4c03900,0,104,191,f885dd2a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4c03900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4dc42a8,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c4dc42a8,c4dc4330,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4c03900,ffffffff,e6df4c74,2,0,...) at kern_wait+0xb76 wait4(c4c03900,e6df4cf8,10,c0ca6aa8,c0d8c224,...) at wait4+0x3b syscall(e6df4d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815e07b, esp = 0xbfbfe95c, ebp = 0xbfbfe978 --- Tracing command top pid 1144 tid 100065 td 0xc4b0c6c0 sched_switch(c4b0c6c0,0,104,191,2451176e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4b0c6c0,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6d05a4c,c087f06a,c5585150,0,c4b0c6c0,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c5585164,0,e6d05a7c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c5585164,c5585150,3e9,603,c4b23b28,...) at _cv_timedwait_sig+0x250 seltdwait(e6d05c28,e6d05c30,c5ee7000,c4b0c6c0,616e6572,...) at seltdwait+0x8a kern_select(c4b0c6c0,2,bfbfebec,0,0,e6d05c70,20,1,0) at kern_select+0x4f4 select(c4b0c6c0,e6d05cf8,14,c0c87ea6,c0d8cb8c,...) at select+0x66 syscall(e6d05d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x281e8033, esp = 0xbfbfeb8c, ebp = 0xbfbfece8 --- Tracing command sshd pid 1143 tid 100179 td 0xc519bb40 sched_switch(c519bb40,0,104,191,2523bfd6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c519bb40,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c087f06a,c548ae10,0,c0c9e4d3,c519bb40,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c548ae24,0,e6efca7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c548ae24,c548ae10,c0ca652f,603,c4ce07a8,...) at _cv_wait_sig+0x240 seltdwait(c4ce07a8,58,c5ee4680,c519bb40,200246,...) at seltdwait+0xa2 kern_select(c519bb40,a,286030b8,286030dc,0,0,20,0,28100c70) at kern_select+0x4f4 select(c519bb40,e6efccf8,14,c0c87ea6,c0d8cb8c,...) at select+0x66 syscall(e6efcd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283ce033, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command tail pid 1142 tid 100068 td 0xc4b2f240 sched_switch(c4b2f240,0,104,191,59329bea,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,58,...) at mi_switch+0x200 sleepq_switch(c4b2f240,0,c0ca42a7,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08c8460,c4b2f240,2,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c5d5b100,58,c0c9ae72,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c5d5b100,c5d5b100,158,c0c9ae72,3e9,...) at _sleep+0x31e kern_kevent(c4b2f240,4,0,1,e6d11c58,...) at kern_kevent+0x364 kevent(c4b2f240,e6d11cf8,18,c0c3f0a9,c0d8e914,...) at kevent+0x19b syscall(e6d11d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (363, FreeBSD ELF32, kevent), eip = 0x2815fcbb, esp = 0xbfbfeb5c, ebp = 0xbfbfec18 --- Tracing command sh pid 1141 tid 100178 td 0xc519bd80 sched_switch(c519bd80,0,104,191,1489aeaa,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c519bd80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c5183550,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c5183550,c51835d8,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c519bd80,ffffffff,e6ef8c74,2,0,...) at kern_wait+0xb76 wait4(c519bd80,e6ef8cf8,10,c519bd80,c0d8c224,...) at wait4+0x3b syscall(e6ef8d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815e07b, esp = 0xbfbfeb6c, ebp = 0xbfbfeb88 --- Tracing command sshd pid 1140 tid 100129 td 0xc5007900 Tracing command sshd pid 1139 tid 100105 td 0xc4c38240 sched_switch(c4c38240,0,104,191,c986f5e6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4c38240,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c087f06a,c55a0d50,0,c0c9e4d3,c4c38240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c55a0d64,0,e6de8a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c55a0d64,c55a0d50,c0ca652f,603,c4aee8f8,...) at _cv_wait_sig+0x240 seltdwait(c4aee8f8,58,c57ec700,c4c38240,200246,...) at seltdwait+0xa2 kern_select(c4c38240,c,286030b8,286030dc,0,0,20,0,28100c70) at kern_select+0x4f4 select(c4c38240,e6de8cf8,14,c0c87ea6,c0d8cb8c,...) at select+0x66 syscall(e6de8d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283ce033, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 1135 tid 100176 td 0xc5007000 Tracing command sshd pid 1134 tid 100120 td 0xc4b0a900 Tracing command sshd pid 1133 tid 100130 td 0xc50076c0 Tracing command bash pid 1061 tid 100057 td 0xc4b2f900 sched_switch(c4b2f900,0,104,191,28cbd5c2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4b2f900,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4b2ad48,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c4b2ad48,c4b2add0,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c4b2f900,ffffffff,e6ce5c74,6,0,...) at kern_wait+0xb76 wait4(c4b2f900,e6ce5cf8,10,c0ca69b8,c0d8c224,...) at wait4+0x3b syscall(e6ce5d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x282be07b, esp = 0xbfbfe9cc, ebp = 0xbfbfe9e8 --- Tracing command sshd pid 1060 tid 100126 td 0xc5008000 sched_switch(c5008000,0,104,191,40bbfcce,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c5008000,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c087f06a,c4e048d0,0,c0c9e4d3,c5008000,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4e048e4,0,e6e29a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c4e048e4,c4e048d0,c0ca652f,603,c4aefb28,...) at _cv_wait_sig+0x240 seltdwait(c4aefb28,58,c4a8cc80,c5008000,200246,...) at seltdwait+0xa2 kern_select(c5008000,a,286030b8,286030dc,0,0,20,0,28100c70) at kern_select+0x4f4 select(c5008000,e6e29cf8,14,c0c87ea6,c0d8cb8c,...) at select+0x66 syscall(e6e29d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283ce033, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 1058 tid 100116 td 0xc4dd7240 Tracing command getty pid 1055 tid 100067 td 0xc4ae9000 Tracing command getty pid 1054 tid 100115 td 0xc4dd7480 Tracing command getty pid 1053 tid 100090 td 0xc4c386c0 Tracing command getty pid 1052 tid 100089 td 0xc4c38900 Tracing command getty pid 1051 tid 100053 td 0xc4b0cb40 Tracing command getty pid 1050 tid 100072 td 0xc4b0c480 Tracing command getty pid 1049 tid 100091 td 0xc4c38480 Tracing command getty pid 1048 tid 100056 td 0xc4b2fb40 Tracing command inetd pid 1026 tid 100108 td 0xc4c03b40 Tracing command moused pid 1002 tid 100076 td 0xc4b2c900 Tracing command watchdogd pid 984 tid 100054 td 0xc4b30000 sched_switch(c4b30000,0,104,191,e52d6cde,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4b30000,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(ea61,c08c8460,c4b30000,2,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,ea61,...) at _sleep+0x31e kern_nanosleep(c4b30000,e6cd9c64,e6cd9c6c,3c,0,...) at kern_nanosleep+0xc1 nanosleep(c4b30000,e6cd9cf8,8,c0cb7f23,c0d8dba0,...) at nanosleep+0x6f syscall(e6cd9d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x28185ad7, esp = 0xbfbfecec, ebp = 0xbfbfed18 --- Tracing command cron pid 962 tid 100112 td 0xc4dd7b40 sched_switch(c4dd7b40,0,104,191,46b78956,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c4dd7b40,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(ea61,c08c8460,c4dd7b40,2,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0dfe9c4,5c,c0ca0ff8,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0dfe9c4,0,15c,c0ca0ff8,ea61,...) at _sleep+0x31e kern_nanosleep(c4dd7b40,e6dfdc64,e6dfdc6c,3c,0,...) at kern_nanosleep+0xc1 nanosleep(c4dd7b40,e6dfdcf8,8,c0ca6c06,c0d8dba0,...) at nanosleep+0x6f syscall(e6dfdd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x28178ad7, esp = 0xbfbfec8c, ebp = 0xbfbfecb8 --- Tracing command sendmail pid 956 tid 100110 td 0xc4c036c0 sched_switch(c4c036c0,0,104,191,c852da10,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,68,...) at mi_switch+0x200 sleepq_switch(c4c036c0,0,c0ca42a7,1a0,68,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4dc4058,68,c0c5399e,100,0,...) at sleepq_wait_sig+0x17 _sleep(c4dc4058,c4dc4088,168,c0c5399e,0,...) at _sleep+0x354 kern_sigsuspend(c4c036c0,0,0,0,0,...) at kern_sigsuspend+0xae sigsuspend(c4c036c0,e6df7cf8,4,c0ca69b8,c0d8e6ac,...) at sigsuspend+0x4d syscall(e6df7d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x28332efb, esp = 0xbfbfcf8c, ebp = 0xbfbfcfb8 --- Tracing command sendmail pid 952 tid 100111 td 0xc4dd7d80 sched_switch(c4dd7d80,0,104,191,5e10fe36,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4dd7d80,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6dfaa4c,c087f06a,c4a8da10,0,c4dd7d80,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4a8da24,0,e6dfaa7c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4a8da24,c4a8da10,1389,603,c4da32d8,...) at _cv_timedwait_sig+0x250 seltdwait(e6dfac28,e6dfac30,c4abfe00,c4dd7d80,c188b014,...) at seltdwait+0x8a kern_select(c4dd7d80,5,bfbfc510,0,0,e6dfac70,20,5,0) at kern_select+0x4f4 select(c4dd7d80,e6dfacf8,14,c0ca6edc,c0d8cb8c,...) at select+0x66 syscall(e6dfad38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283d7033, esp = 0xbfbfc47c, ebp = 0xbfbfcfa8 --- Tracing command sshd pid 945 tid 100083 td 0xc4c396c0 Tracing command ntpd pid 908 tid 100114 td 0xc4dd76c0 sched_switch(c4dd76c0,0,104,191,3ad725c6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4dd76c0,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c087f06a,c4837410,0,c0c9e4d3,c4dd76c0,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c4837424,0,e6e03a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c4837424,c4837410,c0ca652f,603,c4bf83f0,...) at _cv_wait_sig+0x240 seltdwait(c4bf83f0,58,c4579100,c4dd76c0,0,...) at seltdwait+0xa2 kern_select(c4dd76c0,1c,bfbfed28,0,0,0,20,e6e03c98,246) at kern_select+0x4f4 select(c4dd76c0,e6e03cf8,14,c4dd76c0,c0d8cb8c,...) at select+0x66 syscall(e6e03d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28353033, esp = 0xbfbfecfc, ebp = 0xbfbfedc8 --- Tracing command nfsd pid 809 tid 100104 td 0xc4b0ad80 sched_switch(c4b0ad80,0,104,191,6d9d546e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4b0ad80,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6de3bf8,c087f06a,c4900100,0,c4b0ad80,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4ac10d0,0,e6de3c28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4ac10d0,c4900100,1388,3af,a5a5a5a5,...) at _cv_timedwait_sig+0x250 svc_run_internal(e6de3d24,c0864bf8,c4900100,e6de3d38,c0c9b228,...) at svc_run_internal+0x356 svc_thread_start(c4900100,e6de3d38,c0c9b228,343,c4c367f8,...) at svc_thread_start+0x10 fork_exit(c0a848c0,c4900100,e6de3d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 809 tid 100103 td 0xc4b0c000 sched_switch(c4b0c000,0,104,191,7493403e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4b0c000,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6de0bf8,c087f06a,c4900100,0,c4b0c000,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4835c50,0,e6de0c28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4835c50,c4900100,1388,3af,0,...) at _cv_timedwait_sig+0x250 svc_run_internal(e6de0d24,c0864bf8,c4900100,e6de0d38,c0c9b228,...) at svc_run_internal+0x356 svc_thread_start(c4900100,e6de0d38,c0c9b228,343,c4c367f8,...) at svc_thread_start+0x10 fork_exit(c0a848c0,c4900100,e6de0d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 809 tid 100102 td 0xc4b0c240 sched_switch(c4b0c240,0,104,191,6d53d94e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4b0c240,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6dddbf8,c087f06a,c4900100,0,c4b0c240,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4ac1c50,0,e6dddc28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4ac1c50,c4900100,1388,3af,5a5a5a5a,...) at _cv_timedwait_sig+0x250 svc_run_internal(e6dddd24,c0864bf8,c4900100,e6dddd38,c0c9b228,...) at svc_run_internal+0x356 svc_thread_start(c4900100,e6dddd38,c0c9b228,343,c4c367f8,...) at svc_thread_start+0x10 fork_exit(c0a848c0,c4900100,e6dddd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 809 tid 100079 td 0xc481c6c0 sched_switch(c481c6c0,0,104,191,6cbd43d2,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c481c6c0,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6d5fae8,c087f06a,c4900100,0,c481c6c0,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4a456d0,0,e6d5fb18,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4a456d0,c4900100,1388,3af,e6d5fb60,...) at _cv_timedwait_sig+0x250 svc_run_internal(c481c824,14,c0cc3590,c0cc2044,e6d5fc3c,...) at svc_run_internal+0x356 svc_run(c4900100,0,c0cc2348,1fd,0,...) at svc_run+0x7f nfssvc_nfsd(bfbfe8b0,e6d5fc3c,c,c4579100,e6d5fc50,...) at nfssvc_nfsd+0xad nfssvc_nfsserver(c481c6c0,e6d5fcf8,bfbfe8b0,c481c6c0,c4c367f8,...) at nfssvc_nfsserver+0x24f nfssvc(c481c6c0,e6d5fcf8,8,c0ca6edc,c0d8d254,...) at nfssvc+0x83 syscall(e6d5fd38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (155, FreeBSD ELF32, nfssvc), eip = 0x280daadb, esp = 0xbfbfe86c, ebp = 0xbfbfead8 --- Tracing command nfsd pid 808 tid 100095 td 0xc4bff900 Tracing command mountd pid 806 tid 100060 td 0xc4ae9900 Tracing command rpcbind pid 711 tid 100062 td 0xc4ae96c0 sched_switch(c4ae96c0,0,104,191,f7aa3ce6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4ae96c0,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(e6cf9aa8,c087f06a,c4a79050,0,c4ae96c0,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c4a79064,0,e6cf9ad8,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c4a79064,c4a79050,7531,603,e6cf9b8c,...) at _cv_timedwait_sig+0x250 seltdwait(e6cf9c5c,e6cf9c64,511,c4ae96c0,e6cf9b5c,...) at seltdwait+0x8a poll(c4ae96c0,e6cf9cf8,c,c0ca6c06,c0d8d83c,...) at poll+0x300 syscall(e6cf9d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (209, FreeBSD ELF32, poll), eip = 0x2813f01f, esp = 0xbfbfcc0c, ebp = 0xbfbfedd8 --- Tracing command syslogd pid 691 tid 100088 td 0xc4c38b40 sched_switch(c4c38b40,0,104,191,34eb70c6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4c38b40,0,c0ca42a7,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c087f06a,c4837890,0,c0c9e4d3,c4c38b40,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c48378a4,0,e6d81a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c48378a4,c4837890,c0ca652f,603,c4bf8d90,...) at _cv_wait_sig+0x240 seltdwait(c4bf8d90,58,c4579100,c4c38b40,0,...) at seltdwait+0xa2 kern_select(c4c38b40,9,282290ac,0,0,0,20,0,281a5498) at kern_select+0x4f4 select(c4c38b40,e6d81cf8,14,c0ca6ab8,c0d8cb8c,...) at select+0x66 syscall(e6d81d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28191033, esp = 0xbfbfe2ac, ebp = 0xbfbfee18 --- Tracing command devd pid 561 tid 100081 td 0xc481c240 Tracing command flowcleaner pid 19 tid 100050 td 0xc47686c0 sched_switch(c47686c0,0,104,191,2132f0fa,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c47686c0,0,c0ca42a7,283,c47686c0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f6b508,0,e4addcc4,1,0,...) at sleepq_timedwait+0x6b _cv_timedwait(c0f6b508,c0f6b510,2710,3f0,0,...) at _cv_timedwait+0x250 flowtable_cleaner(0,e4addd38,c0c9b228,343,c4a5a550,...) at flowtable_cleaner+0x1bf fork_exit(c0937cc0,0,e4addd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4addd70, ebp = 0 --- Tracing command softdepflush pid 18 tid 100049 td 0xc4768900 sched_switch(c4768900,0,104,191,4a8c8036,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4768900,0,c0ca42a7,260,50,...) at sleepq_switch+0x15f sleepq_wait(d84f7500,50,c0cab933,4,0,...) at sleepq_wait+0x63 __lockmgr_args(d84f7500,81900,c4ad37c4,c0cab933,50,...) at __lockmgr_args+0xb3f getblk(c4ad36cc,675f00,0,4000,0,...) at getblk+0x163 breadn(c4ad36cc,675f00,0,4000,0,...) at breadn+0x44 bread(c4ad36cc,675f00,0,4000,0,...) at bread+0x4c ffs_blkfree(c4b57300,c4a54000,c4ad36cc,1a23b0,0,...) at ffs_blkfree+0x337 indir_trunc(fffffff4,ffffffff,c9c04700,c9d37b80,0,...) at indir_trunc+0x6d0 handle_workitem_indirblk(4,c0c9e4d3,df,c4b57300,c4b57300,...) at handle_workitem_indirblk+0x64 handle_workitem_freeblocks(0,e4adac88,2,496,200,...) at handle_workitem_freeblocks+0x95 process_worklist_item(c0f76cb0,0,c0cc6347,429,c4768900,...) at process_worklist_item+0x1f5 softdep_process_worklist(c4ad2b50,0,c0cc6347,3cb,3e8,...) at softdep_process_worklist+0x81 softdep_flush(0,e4adad38,c0c9b228,343,c4a5a7f8,...) at softdep_flush+0x287 fork_exit(c0acc1a0,0,e4adad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4adad70, ebp = 0 --- Tracing command vnlru pid 17 tid 100048 td 0xc4768b40 sched_switch(c4768b40,0,104,191,585d1d5a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,50,...) at mi_switch+0x200 sleepq_switch(c4768b40,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c4a5aaa0,50,c0cae2de,0,0,...) at sleepq_timedwait+0x6b _sleep(c4a5aaa0,c0f6b2d4,250,c0cae2de,3e8,...) at _sleep+0x339 vnlru_proc(0,e4ad7d38,c0c9b228,343,c4a5aaa0,...) at vnlru_proc+0xe7 fork_exit(c0923560,0,e4ad7d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ad7d70, ebp = 0 --- Tracing command syncer pid 16 tid 100047 td 0xc4768d80 sched_switch(c4768d80,0,104,191,5783d7a6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4768d80,0,c0ca42a7,283,c4768d80,...) at sleepq_switch+0x15f sleepq_timedwait(c0f6b314,0,e4ad4c88,1,0,...) at sleepq_timedwait+0x6b _cv_timedwait(c0f6b314,c0f6b300,3e8,6cc,4e20,...) at _cv_timedwait+0x250 sched_sync(0,e4ad4d38,c0c9b228,343,c4a5ad48,...) at sched_sync+0x502 fork_exit(c0922990,0,e4ad4d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ad4d70, ebp = 0 --- Tracing command bufdaemon pid 15 tid 100046 td 0xc481b000 sched_switch(c481b000,0,104,191,5991190e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c481b000,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f6b048,44,c0cab84c,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f6b048,c0f6b04c,44,c0cab84c,3e8,...) at _sleep+0x339 buf_daemon(0,e4ad1d38,c0c9b228,343,c457c2a8,...) at buf_daemon+0x138 fork_exit(c090aba0,0,e4ad1d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ad1d70, ebp = 0 --- Tracing command pagezero pid 9 tid 100045 td 0xc481b240 sched_switch(c481b240,0,104,191,4e77cdec,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c481b240,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f77b14,0,c0ccde6c,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f77b14,c0f77600,0,c0ccde6c,493e0,...) at _sleep+0x339 vm_pagezero(0,e4aced38,c0c9b228,343,c457c550,...) at vm_pagezero+0xdc fork_exit(c0b0a870,0,e4aced38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4aced70, ebp = 0 --- Tracing command vmdaemon pid 8 tid 100044 td 0xc481b480 sched_switch(c481b480,0,104,191,a1667ce6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,68,...) at mi_switch+0x200 sleepq_switch(c481b480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f77744,68,c0cab84c,0,0,...) at sleepq_wait+0x63 _sleep(c0f77744,c0f77748,68,c0cab84c,0,...) at _sleep+0x36b vm_daemon(0,e4acbd38,c0c9b228,343,c457c7f8,...) at vm_daemon+0x59 fork_exit(c0b04d10,0,e4acbd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4acbd70, ebp = 0 --- Tracing command pagedaemon pid 7 tid 100043 td 0xc481b6c0 sched_switch(c481b6c0,0,104,191,bbeec48e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c481b6c0,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f7770c,44,c0cab84c,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f7770c,c0f77600,44,c0cab84c,1388,...) at _sleep+0x339 vm_pageout(0,e4ac8d38,c0c9b228,343,c457caa0,...) at vm_pageout+0x2bb fork_exit(c0b05bb0,0,e4ac8d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ac8d70, ebp = 0 --- Tracing command fdc0 pid 6 tid 100041 td 0xc481bb40 sched_switch(c481bb40,0,104,191,260fa812,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c481bb40,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c482143c,4c,c0c956ae,0,0,...) at sleepq_timedwait+0x6b _sleep(c482143c,c48214f0,4c,c0c956ae,3e8,...) at _sleep+0x339 fdc_thread(c4821400,e4ac2d38,c0c9b228,343,c457cd48,...) at fdc_thread+0x27d fork_exit(c0b87e90,c4821400,e4ac2d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ac2d70, ebp = 0 --- Tracing command usb pid 14 tid 100034 td 0xc47666c0 sched_switch(c47666c0,0,104,191,8d1f9a3c,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c47666c0,0,c0ca42a7,260,c47666c0,...) at sleepq_switch+0x15f sleepq_wait(c479fdac,0,c4362cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c479fdac,c479fe4c,c0c8e5e6,6c,c479fdb4,...) at _cv_wait+0x240 usb_process(c479fda4,c4362d38,c0c9b228,343,c474c000,...) at usb_process+0x193 fork_exit(c07bf940,c479fda4,c4362d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4362d70, ebp = 0 --- Tracing command usb pid 14 tid 100033 td 0xc4766900 sched_switch(c4766900,0,104,191,f258c57e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4766900,0,c0ca42a7,260,c4766900,...) at sleepq_switch+0x15f sleepq_wait(c479fd7c,0,c435fcbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c479fd7c,c479fe4c,c0c8e5e6,6c,c479fd84,...) at _cv_wait+0x240 usb_process(c479fd74,c435fd38,c0c9b228,343,c474c000,...) at usb_process+0x193 fork_exit(c07bf940,c479fd74,c435fd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc435fd70, ebp = 0 --- Tracing command usb pid 14 tid 100032 td 0xc4766b40 sched_switch(c4766b40,0,104,191,8ca9cb50,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4766b40,0,c0ca42a7,260,c4766b40,...) at sleepq_switch+0x15f sleepq_wait(c479fd4c,0,c435ccbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c479fd4c,c479fe4c,c0c8e5e6,6c,c479fd54,...) at _cv_wait+0x240 usb_process(c479fd44,c435cd38,c0c9b228,343,c474c000,...) at usb_process+0x193 fork_exit(c07bf940,c479fd44,c435cd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc435cd70, ebp = 0 --- Tracing command usb pid 14 tid 100031 td 0xc4766d80 sched_switch(c4766d80,0,104,191,8ca99e5c,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4766d80,0,c0ca42a7,260,c4766d80,...) at sleepq_switch+0x15f sleepq_wait(c479fd1c,0,c4359cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c479fd1c,c479fe4c,c0c8e5e6,6c,c479fd24,...) at _cv_wait+0x240 usb_process(c479fd14,c4359d38,c0c9b228,343,c474c000,...) at usb_process+0x193 fork_exit(c07bf940,c479fd14,c4359d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4359d70, ebp = 0 --- Tracing command xpt_thrd pid 5 tid 100020 td 0xc47576c0 sched_switch(c47576c0,0,104,191,8ca95e90,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c47576c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0dcabd4,4c,c0c3a25a,0,0,...) at sleepq_wait+0x63 _sleep(c0dcabd4,c0dcabec,4c,c0c3a25a,0,...) at _sleep+0x36b xpt_scanner_thread(0,c4311d38,c0c9b228,343,c474c2a8,...) at xpt_scanner_thread+0x4a fork_exit(c0484aa0,0,c4311d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4311d70, ebp = 0 --- Tracing command yarrow pid 13 tid 100017 td 0xc457f240 sched_switch(c457f240,0,104,191,8afb9f8e,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c457f240,0,c0ca42a7,283,2,...) at sleepq_switch+0x15f sleepq_timedwait(c0dfe824,0,c0c956ae,2,0,...) at sleepq_timedwait+0x6b _sleep(c0dfe824,0,0,c0c956ae,64,...) at _sleep+0x339 pause(c0c956ae,64,c0c82584,111,0,...) at pause+0x47 random_kthread(0,c4308d38,c0c9b228,343,c474c550,...) at random_kthread+0x1ef fork_exit(c07382d0,0,c4308d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4308d70, ebp = 0 --- Tracing command g_down pid 4 tid 100016 td 0xc457f480 sched_switch(c457f480,0,104,191,8be96cd6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c457f480,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0dfc5e4,4c,c0c956ae,0,0,...) at sleepq_wait+0x63 _sleep(c0dfc5e4,c0dfc548,24c,c0c956ae,0,...) at _sleep+0x36b g_io_schedule_down(c457f480,0,c0c96d76,74,0,...) at g_io_schedule_down+0x56 g_down_procbody(0,c4305d38,c0c9b228,343,c457b000,...) at g_down_procbody+0x8d fork_exit(c082bcc0,0,c4305d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4305d70, ebp = 0 --- Tracing command g_up pid 3 tid 100015 td 0xc457f6c0 sched_switch(c457f6c0,0,104,191,8bf022c6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c457f6c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0dfc5e0,4c,c0c956ae,0,0,...) at sleepq_wait+0x63 _sleep(c0dfc5e0,c0dfc568,24c,c0c956ae,0,...) at _sleep+0x36b g_io_schedule_up(c457f6c0,0,c0c96d76,5d,0,...) at g_io_schedule_up+0x11e g_up_procbody(0,c4302d38,c0c9b228,343,c457b2a8,...) at g_up_procbody+0x8d fork_exit(c082bd50,0,c4302d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4302d70, ebp = 0 --- Tracing command g_event pid 2 tid 100014 td 0xc457f900 sched_switch(c457f900,0,104,191,889828fa,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c457f900,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0dfc5d8,4c,c0c956ae,0,0,...) at sleepq_timedwait+0x6b _sleep(c0dfc5d8,0,4c,c0c956ae,64,...) at _sleep+0x339 g_event_procbody(0,c42ffd38,c0c9b228,343,c457b550,...) at g_event_procbody+0xcb fork_exit(c082bde0,0,c42ffd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42ffd70, ebp = 0 --- Tracing command intr pid 12 tid 100042 td 0xc481b900 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100040 td 0xc481bd80 sched_switch(c481bd80,0,109,191,dcb1906a,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c47b1570,...) at mi_switch+0x200 ithread_loop(c4816b20,e4ab5d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c4816b20,e4ab5d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4ab5d70, ebp = 0 --- Tracing command intr pid 12 tid 100039 td 0xc481c000 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100038 td 0xc4757d80 sched_switch(c4757d80,0,109,191,8c332b08,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c4579070,...) at mi_switch+0x200 ithread_loop(c480eca0,e4aafd38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c480eca0,e4aafd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4aafd70, ebp = 0 --- Tracing command intr pid 12 tid 100037 td 0xc4766000 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100036 td 0xc4766240 sched_switch(c4766240,0,109,191,8d96171e,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2370,...) at mi_switch+0x200 ithread_loop(c480e820,e4aa6d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c480e820,e4aa6d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4aa6d70, ebp = 0 --- Tracing command intr pid 12 tid 100035 td 0xc4766480 sched_switch(c4766480,0,109,191,2ff90ca2,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c21f0,...) at mi_switch+0x200 ithread_loop(c47b0b10,e4aa0d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c47b0b10,e4aa0d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xe4aa0d70, ebp = 0 --- Tracing command intr pid 12 tid 100030 td 0xc4768000 sched_switch(c4768000,0,109,191,8c02523c,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2270,...) at mi_switch+0x200 ithread_loop(c4785830,c4356d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c4785830,c4356d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4356d70, ebp = 0 --- Tracing command intr pid 12 tid 100028 td 0xc4768480 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100026 td 0xc45c4900 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100021 td 0xc4757480 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100019 td 0xc4757900 sched_switch(c4757900,0,109,191,195c22c8,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c4704bf0,...) at mi_switch+0x200 ithread_loop(c4532980,c430ed38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c4532980,c430ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc430ed70, ebp = 0 --- Tracing command intr pid 12 tid 100018 td 0xc4757b40 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100012 td 0xc457fd80 sched_switch(c457fd80,0,109,191,441d44fe,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2c70,...) at mi_switch+0x200 ithread_loop(c457a090,c42f9d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c457a090,c42f9d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42f9d70, ebp = 0 --- Tracing command intr pid 12 tid 100011 td 0xc45c4000 sched_switch(c45c4000,0,109,191,7d281c9a,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2cf0,...) at mi_switch+0x200 ithread_loop(c457a0a0,c42f6d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c457a0a0,c42f6d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42f6d70, ebp = 0 --- Tracing command intr pid 12 tid 100010 td 0xc45c4240 sched_switch(c45c4240,0,109,191,8af8cbd2,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2d70,...) at mi_switch+0x200 ithread_loop(c457a0b0,c42f3d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c457a0b0,c42f3d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42f3d70, ebp = 0 --- Tracing command intr pid 12 tid 100009 td 0xc45c4480 sched_switch(c45c4480,0,109,191,886d6c46,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2df0,...) at mi_switch+0x200 ithread_loop(c457a0c0,c42f0d38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c457a0c0,c42f0d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42f0d70, ebp = 0 --- Tracing command intr pid 12 tid 100008 td 0xc457d000 sched_switch(c457d000,0,109,191,8bcf3b9a,...) at sched_switch+0x406 mi_switch(109,0,c0c9b4a7,52d,c45c2e70,...) at mi_switch+0x200 ithread_loop(c457a0d0,c42edd38,c0c9b228,343,c457b7f8,...) at ithread_loop+0x1f6 fork_exit(c0867be0,c457a0d0,c42edd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42edd70, ebp = 0 --- Tracing command intr pid 12 tid 100007 td 0xc457d240 fork_trampoline() at fork_trampoline Tracing command idle pid 11 tid 100006 td 0xc457d480 sched_switch(c457d480,0,60c,18c,f8af5b2,...) at sched_switch+0x406 mi_switch(60c,0,c0ca18d4,815,0,...) at mi_switch+0x200 sched_preempt(c457d480,0,1f4,c42e4c74,c0baef6e,...) at sched_preempt+0x9f ipi_bitmap_handler(8,28,1cb0028,c4551c18,c4551c00,...) at ipi_bitmap_handler+0x34 Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e --- interrupt, eip = 0xc0ba3065, esp = 0xc42e4c74, ebp = 0xc42e4c74 --- acpi_cpu_c1(1,0,0,c08b15e1,c0e11060,...) at acpi_cpu_c1+0x5 acpi_cpu_idle(c42e4cb4,c0bba7bb,1,c42e4cf8,c08b18de,...) at acpi_cpu_idle+0x11c cpu_idle_acpi(1,c42e4cf8,c08b18de,1,c42e4cd4,...) at cpu_idle_acpi+0x1b cpu_idle(1,c42e4cd4,c0ca18d4,3b0,c457d480,...) at cpu_idle+0x1b sched_idletd(0,c42e4d38,c0c9b228,343,c457baa0,...) at sched_idletd+0x23e fork_exit(c08b16a0,0,c42e4d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42e4d70, ebp = 0 --- Tracing command idle pid 11 tid 100005 td 0xc457d6c0 cpustop_handler(2,c42e1c50,c0bcc826,c0dfea3c,4,...) at cpustop_handler+0x32 ipi_nmi_handler(c0dfea3c,4,c0c9e4d3,109,c457baa0,...) at ipi_nmi_handler+0x2f trap(c42e1c5c) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc08aecf6, esp = 0xc42e1c9c, ebp = 0xc42e1cb4 --- tdq_lock_pair(c0e11050,c42e1cd4,c0ca18d4,3b0,c457d6c0,...) at tdq_lock_pair+0x76 sched_idletd(0,c42e1d38,c0c9b228,343,c457baa0,...) at sched_idletd+0x11f fork_exit(c08b16a0,0,c42e1d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42e1d70, ebp = 0 --- Tracing command idle pid 11 tid 100004 td 0xc457d900 sched_switch(c457d900,0,108,18c,252206aa,...) at sched_switch+0x406 mi_switch(108,0,c0ca18d4,3ae,c457d900,...) at mi_switch+0x200 sched_idletd(0,c42ded38,c0c9b228,343,c457baa0,...) at sched_idletd+0x19b fork_exit(c08b16a0,0,c42ded38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42ded70, ebp = 0 --- Tracing command idle pid 11 tid 100003 td 0xc457db40 sched_switch(c457db40,0,108,18c,2563fa4a,...) at sched_switch+0x406 mi_switch(108,0,c0ca18d4,3ae,c457db40,...) at mi_switch+0x200 sched_idletd(0,c42dbd38,c0c9b228,343,c457baa0,...) at sched_idletd+0x19b fork_exit(c08b16a0,0,c42dbd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42dbd70, ebp = 0 --- Tracing command init pid 1 tid 100002 td 0xc457dd80 sched_switch(c457dd80,0,104,191,f8b4210,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c457dd80,0,c0ca42a7,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca42a7,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c457bd48,5c,c0ca6ac9,100,0,...) at sleepq_wait_sig+0x17 _sleep(c457bd48,c457bdd0,15c,c0ca6ac9,0,...) at _sleep+0x354 kern_wait(c457dd80,ffffffff,c42d7c74,0,0,...) at kern_wait+0xb76 wait4(c457dd80,c42d7cf8,10,c0ca68f9,c0d8c224,...) at wait4+0x3b syscall(c42d7d38) at syscall+0x2b4 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x8054def, esp = 0xbfbfe90c, ebp = 0xbfbfe928 --- Tracing command audit pid 10 tid 100001 td 0xc457f000 sched_switch(c457f000,0,104,191,8ca3dddc,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c457f000,0,c0ca42a7,260,c457f000,...) at sleepq_switch+0x15f sleepq_wait(c0f76540,0,c42d4c9c,1,0,...) at sleepq_wait+0x63 _cv_wait(c0f76540,c0f76524,c0cc42ec,194,0,...) at _cv_wait+0x240 audit_worker(0,c42d4d38,c0c9b228,343,c457c000,...) at audit_worker+0x84 fork_exit(c0a949e0,0,c42d4d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42d4d70, ebp = 0 --- Tracing command kernel pid 0 tid 100029 td 0xc4768240 sched_switch(c4768240,0,104,191,8c01aec0,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4768240,0,c0ca42a7,260,c4768240,...) at sleepq_switch+0x15f sleepq_wait(c4783340,0,c0ca0940,c0c956ae,0,...) at sleepq_wait+0x63 msleep_spin(c4783340,c4783358,c0c956ae,0,c0c9e4d3,...) at msleep_spin+0x21d taskqueue_thread_loop(c478b5a0,c4352d38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0x94 fork_exit(c08cae80,c478b5a0,c4352d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4352d70, ebp = 0 --- Tracing command kernel pid 0 tid 100027 td 0xc45c46c0 sched_switch(c45c46c0,0,104,191,f13d6578,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c45c46c0,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c474a100,0,c0c956ae,0,0,...) at sleepq_wait+0x63 _sleep(c474a100,c474a118,0,c0c956ae,0,...) at _sleep+0x36b taskqueue_thread_loop(c0e11248,c4326d38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0xba fork_exit(c08cae80,c0e11248,c4326d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4326d70, ebp = 0 --- Tracing command kernel pid 0 tid 100025 td 0xc45c4b40 sched_switch(c45c4b40,0,104,191,f12ac5a4,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c45c4b40,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c474a1c0,0,c0c956ae,0,0,...) at sleepq_wait+0x63 _sleep(c474a1c0,c474a1d8,0,c0c956ae,0,...) at _sleep+0x36b taskqueue_thread_loop(c0dfcf50,c4320d38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0xba fork_exit(c08cae80,c0dfcf50,c4320d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4320d70, ebp = 0 --- Tracing command kernel pid 0 tid 100024 td 0xc45c4d80 sched_switch(c45c4d80,0,104,191,f12a9330,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c45c4d80,0,c0ca42a7,260,c45c4d80,...) at sleepq_switch+0x15f sleepq_wait(c474a200,0,c0ca0940,c0c956ae,0,...) at sleepq_wait+0x63 msleep_spin(c474a200,c474a218,c0c956ae,0,c0c9e4d3,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dcda20,c431dd38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0x94 fork_exit(c08cae80,c0dcda20,c431dd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc431dd70, ebp = 0 --- Tracing command kernel pid 0 tid 100023 td 0xc4757000 sched_switch(c4757000,0,104,191,f12a6ee0,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4757000,0,c0ca42a7,260,c4757000,...) at sleepq_switch+0x15f sleepq_wait(c474a200,0,c0ca0940,c0c956ae,0,...) at sleepq_wait+0x63 msleep_spin(c474a200,c474a218,c0c956ae,0,c0c9e4d3,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dcda20,c431ad38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0x94 fork_exit(c08cae80,c0dcda20,c431ad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc431ad70, ebp = 0 --- Tracing command kernel pid 0 tid 100022 td 0xc4757240 sched_switch(c4757240,0,104,191,f12a4af4,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c4757240,0,c0ca42a7,260,c4757240,...) at sleepq_switch+0x15f sleepq_wait(c474a200,0,c0ca0940,c0c956ae,0,...) at sleepq_wait+0x63 msleep_spin(c474a200,c474a218,c0c956ae,0,c0c9e4d3,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dcda20,c4317d38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0x94 fork_exit(c08cae80,c0dcda20,c4317d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc4317d70, ebp = 0 --- Tracing command kernel pid 0 tid 100013 td 0xc457fb40 sched_switch(c457fb40,0,104,191,27ae22e6,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,0,...) at mi_switch+0x200 sleepq_switch(c457fb40,0,c0ca42a7,260,0,...) at sleepq_switch+0x15f sleepq_wait(c4562e00,0,c0c956ae,0,0,...) at sleepq_wait+0x63 _sleep(c4562e00,c4562e18,0,c0c956ae,0,...) at _sleep+0x36b taskqueue_thread_loop(c0e0fce0,c42fcd38,c0c9b228,343,c0dfc6c0,...) at taskqueue_thread_loop+0xba fork_exit(c08cae80,c0e0fce0,c42fcd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc42fcd70, ebp = 0 --- Tracing command kernel pid 0 tid 100000 td 0xc0dfc970 sched_switch(c0dfc970,0,104,191,a7549c2a,...) at sched_switch+0x406 mi_switch(104,0,c0ca42a7,1eb,44,...) at mi_switch+0x200 sleepq_switch(c0dfc970,0,c0ca42a7,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0dfc6c0,44,c0ca2149,0,0,...) at sleepq_timedwait+0x6b _sleep(c0dfc6c0,0,44,c0ca2149,2710,...) at _sleep+0x339 scheduler(0,141ec00,141ec00,141e000,1425000,...) at scheduler+0x23e mi_startup() at mi_startup+0x96 begin() at begin+0x2c db:0:allt> call doadump Physical memory: 1007 MB Dumping 208 MB: 193 177 161 145 129 113 97 81 65 49 33 17 1 Dump complete = 0xf db:0:doadump> reset cpu_reset: Restarting BSP cpu_reset_proxy: Stopped CPU 2 (kgdb) bt #0 doadump () at pcpu.h:246 #1 0xc04d0999 in db_fncall (dummy1=0xc08be63a, dummy2=0x0, dummy3=0xffffffff, dummy4=0xe712b2d8 "ì²\022ç") at ../../../ddb/db_command.c:548 #2 0xc04d0dcf in db_command (last_cmdp=0xc0dcbbfc, cmd_table=0x0, dopager=0x0) at ../../../ddb/db_command.c:445 #3 0xc04d0e84 in db_command_script (command=0xc0dccb08 "call doadump") at ../../../ddb/db_command.c:516 #4 0xc04d5000 in db_script_exec (scriptname=0xc0dcc460 "doadump", warnifnotfound=Variable "warnifnotfound" is not available. ) at ../../../ddb/db_script.c:302 #5 0xc04d5091 in db_run_cmd (addr=0x1, have_addr=0x0, count=0xc0fcb460, modif=0xe712b410 "") at ../../../ddb/db_script.c:375 #6 0xc04d0d91 in db_command (last_cmdp=0xc0dcbbfc, cmd_table=0x0, dopager=0x1) at ../../../ddb/db_command.c:445 #7 0xc04d0eea in db_command_loop () at ../../../ddb/db_command.c:498 #8 0xc04d2d8d in db_trap (type=0x3, code=0x0) at ../../../ddb/db_main.c:229 #9 0xc08be4b6 in kdb_trap (type=0x3, code=0x0, tf=0xe712b5b8) at ../../../kern/subr_kdb.c:535 #10 0xc0bcce1b in trap (frame=0xe712b5b8) at ../../../i386/i386/trap.c:690 #11 0xc0bae87b in calltrap () at ../../../i386/i386/exception.s:165 #12 0xc08be63a in kdb_enter (why=0xc0c9fd4b "panic", msg=0xc0c9fd4b "panic") at cpufunc.h:71 #13 0xc088ea36 in panic (fmt=0xc0cc83f4 "flush_pagedep_deps: MKDIR_BODY") at ../../../kern/kern_shutdown.c:562 #14 0xc0acd98b in softdep_sync_metadata (vp=0xc500f15c) at ../../../ufs/ffs/ffs_softdep.c:9099 #15 0xc0ad4ab2 in ffs_syncvnode (vp=0xc500f15c, waitfor=0x1) at ../../../ufs/ffs/ffs_vnops.c:333 #16 0xc0ab4246 in ffs_truncate (vp=0xc500f15c, length=0xe00, flags=0x880, cred=0xc4a76000, td=0xc8cfc6c0) at ../../../ufs/ffs/ffs_inode.c:285 #17 0xc0add256 in ufs_direnter (dvp=0xc500f15c, tvp=0xcb71c6cc, dirp=0xe712b9f8, cnp=0xe712bc00, newdirbp=0x0) at ../../../ufs/ufs/ufs_lookup.c:988 #18 0xc0ae2755 in ufs_makeinode (mode=0x11b6, dvp=0xc500f15c, vpp=0xe712bbec, cnp=0xe712bc00) at ../../../ufs/ufs/ufs_vnops.c:2540 #19 0xc0ae2975 in ufs_mknod (ap=0xe712bc28) at ../../../ufs/ufs/ufs_vnops.c:222 #20 0xc0be6235 in VOP_MKNOD_APV (vop=0xc0daf360, a=0xe712bc28) at vnode_if.c:379 #21 0xc09280a7 in kern_mkfifoat (td=0xc8cfc6c0, fd=0xffffff9c, path=0x804d240
, pathseg=UIO_USERSPACE, mode=Variable "mode" is not available. ) at vnode_if.h:164 #22 0xc092814e in kern_mkfifo (td=0xc8cfc6c0, path=0x804d240
, pathseg=UIO_USERSPACE, mode=0x1b6) at ../../../kern/vfs_syscalls.c:1402 #23 0xc0928179 in mkfifo (td=0xc8cfc6c0, uap=0xe712bcf8) at ../../../kern/vfs_syscalls.c:1380 #24 0xc0bcc5a4 in syscall (frame=0xe712bd38) at ../../../i386/i386/trap.c:1076 #25 0xc0bae8e0 in Xint0x80_syscall () at ../../../i386/i386/exception.s:261 #26 0x00000033 in ?? () (kgdb) f 14 #14 0xc0acd98b in softdep_sync_metadata (vp=0xc500f15c) at ../../../ufs/ffs/ffs_softdep.c:9099 9099 panic("flush_pagedep_deps: MKDIR_BODY"); (kgdb) l 9094 * If that cleared dependencies, go on to next. 9095 */ 9096 if (dap != LIST_FIRST(diraddhdp)) 9097 continue; 9098 if (dap->da_state & MKDIR_BODY) 9099 panic("flush_pagedep_deps: MKDIR_BODY"); 9100 } 9101 /* 9102 * Flush the inode on which the directory entry depends. 9103 * Having accounted for MKDIR_PARENT and MKDIR_BODY above, (kgdb) p *diraddhdp No symbol "diraddhdp" in current context. (kgdb) f 15 #15 0xc0ad4ab2 in ffs_syncvnode (vp=0xc500f15c, waitfor=0x1) at ../../../ufs/ffs/ffs_vnops.c:333 333 if ((error = softdep_sync_metadata(vp)) != 0) (kgdb) p *vp $1 = {v_type = VDIR, v_tag = 0xc0c988fb "ufs", v_op = 0xc0daee60, v_data = 0xc4de0658, v_mount = 0xc4ad2b50, v_nmntvnodes = {tqe_next = 0xc500f000, tqe_prev = 0xc500fc50}, v_un = {vu_mount = 0x0, vu_socket = 0x0, vu_cdev = 0x0, vu_fifoinfo = 0x0, vu_yield = 0x0}, v_hashlist = {le_next = 0x0, le_prev = 0xc486899c}, v_hash = 0x67800, v_cache_src = {lh_first = 0xc5eed948}, v_cache_dst = {tqh_first = 0xca721ca8, tqh_last = 0xca721cb8}, v_cache_dd = 0xca721ca8, v_cstart = 0x0, v_lasta = 0x0, v_lastw = 0x0, v_clen = 0x0, v_lock = {lock_object = {lo_name = 0xc0c988fb "ufs", lo_flags = 0x57b0000, lo_data = 0x0, lo_witness = 0xc453c228}, lk_lock = 0xc8cfc6c2, lk_exslpfail = 0x0, lk_timo = 0x33, lk_pri = 0x50, lk_stack = {depth = 0xb, pcs = { 0xc08771f2, 0xc0ad4d11, 0xc0be53f5, 0xc092e478, 0xc0915096, 0xc091644f, 0xc0927ef8, 0xc092814e, 0xc0928179, 0xc0bcc5a4, 0xc0bae8e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}, v_interlock = {lock_object = {lo_name = 0xc0ca6351 "vnode interlock", lo_flags = 0x1030000, lo_data = 0x0, lo_witness = 0xc4536248}, mtx_lock = 0x4}, v_vnlock = 0xc500f1b4, v_holdcnt = 0x84, v_usecount = 0x78, v_iflag = 0x0, v_vflag = 0x0, v_writecount = 0x0, v_freelist = {tqe_next = 0x0, tqe_prev = 0x0}, v_bufobj = { bo_mtx = {lock_object = {lo_name = 0xc0cae2b3 "bufobj interlock", lo_flags = 0x1030000, lo_data = 0x0, lo_witness = 0xc453ad70}, mtx_lock = 0x4}, bo_clean = {bv_hd = {tqh_first = 0x0, tqh_last = 0xc500f268}, bv_root = 0x0, bv_cnt = 0x0}, bo_dirty = { bv_hd = {tqh_first = 0xd85f7a20, tqh_last = 0xd85f7a58}, bv_root = 0xd85f7a20, bv_cnt = 0x1}, bo_numoutput = 0x0, bo_flag = 0x1, bo_ops = 0xc0d9c9c0, bo_bsize = 0x4000, bo_object = 0xc519a990, bo_synclist = {le_next = 0x0, le_prev = 0xc47b28cc}, bo_private = 0xc500f15c, __bo_vnode = 0xc500f15c}, v_pollinfo = 0x0, v_label = 0x0, v_lockf = 0x0} (kgdb) $ svn diff -x -p /usr/src/sys Index: /usr/src/sys/ufs/ufs/ufs_dirhash.c =================================================================== --- /usr/src/sys/ufs/ufs/ufs_dirhash.c (revision 200709) +++ /usr/src/sys/ufs/ufs/ufs_dirhash.c (working copy) @@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_DIRHASH, "ufs_dirhash", "UFS directory hash tables"); -static SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem"); - static int ufs_mindirhashsize = DIRBLKSIZ * 5; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_minsize, CTLFLAG_RW, &ufs_mindirhashsize, Index: /usr/src/sys/ufs/ufs/ufs_vnops.c =================================================================== --- /usr/src/sys/ufs/ufs/ufs_vnops.c (revision 200709) +++ /usr/src/sys/ufs/ufs/ufs_vnops.c (working copy) @@ -114,6 +114,8 @@ static vop_close_t ufsfifo_close; static vop_kqfilter_t ufsfifo_kqfilter; static vop_pathconf_t ufsfifo_pathconf; +SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem"); + /* * A virgin directory (no blushing please). */ @@ -902,6 +904,9 @@ ufs_link(ap) error = EXDEV; goto out; } + if (VTOI(tdvp)->i_effnlink < 2) + panic("ufs_link: Bad link count %d on parent", + VTOI(tdvp)->i_effnlink); ip = VTOI(vp); if ((nlink_t)ip->i_nlink >= LINK_MAX) { error = EMLINK; @@ -916,7 +921,7 @@ ufs_link(ap) DIP_SET(ip, i_nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(vp)) - softdep_change_linkcnt(ip); + softdep_setup_link(VTOI(tdvp), ip); error = UFS_UPDATE(vp, !(DOINGSOFTDEP(vp) | DOINGASYNC(vp))); if (!error) { ufs_makedirentry(ip, cnp, &newdir); @@ -929,7 +934,7 @@ ufs_link(ap) DIP_SET(ip, i_nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(vp)) - softdep_change_linkcnt(ip); + softdep_revert_link(VTOI(tdvp), ip); } out: return (error); @@ -990,6 +995,11 @@ ufs_whiteout(ap) return (error); } +static volatile int rename_restarts; +SYSCTL_INT(_vfs_ufs, OID_AUTO, rename_restarts, CTLFLAG_RD, + __DEVOLATILE(int *, &rename_restarts), 0, + "Times rename had to restart due to lock contention"); + /* * Rename system call. * rename("foo", "bar"); @@ -1029,14 +1039,16 @@ ufs_rename(ap) struct vnode *tdvp = ap->a_tdvp; struct vnode *fvp = ap->a_fvp; struct vnode *fdvp = ap->a_fdvp; + struct vnode *nvp; struct componentname *tcnp = ap->a_tcnp; struct componentname *fcnp = ap->a_fcnp; struct thread *td = fcnp->cn_thread; - struct inode *ip, *xp, *dp; + struct inode *ip, *xp, *tdp, *fdp; struct direct newdir; - int doingdirectory = 0, oldparent = 0, newparent = 0; + int doingdirectory, newparent; int error = 0, ioflag; - ino_t fvp_ino; + struct mount *mp; + ino_t ino; #ifdef INVARIANTS if ((tcnp->cn_flags & HASBUF) == 0 || @@ -1049,7 +1061,6 @@ ufs_rename(ap) if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; -abortit: if (tdvp == tvp) vrele(tdvp); else @@ -1060,63 +1071,202 @@ ufs_rename(ap) vrele(fvp); return (error); } - + mp = tdvp->v_mount; + VOP_UNLOCK(tdvp, 0); + if (tvp && tvp != tdvp) + VOP_UNLOCK(tvp, 0); + error = vfs_busy(mp, 0); + if (error) { + mp = NULL; + goto releout; + } +relock: + /* + * We need to acquire 2 to 4 locks depending on whether tvp is NULL + * and fdvp and tdvp are the same directory. Subsequently we need + * to double-check all paths and in the directory rename case we + * need to verify that we are not creating a directory loop. To + * handle this we acquire fdvp and fvp in order using blocking + * locks followed by non-blocking acquisitions for all remaining + * locks. If we fail to acquire any lock in the path we will + * drop all held locks, acquire the new lock in a blocking fashion, + * and then release it and restart the rename. This acquire/release + * step ensures that we do not spin on a lock waiting for release. + */ + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error) + goto releout; + error = vn_lock(fvp, LK_EXCLUSIVE); + if (error) { + VOP_UNLOCK(fdvp, 0); + goto releout; + } + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fvp, 0); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error) + goto releout; + VOP_UNLOCK(tdvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + /* + * If vn_lock fails due to VI_DOOMED being set on fdvp, fvp, or tdvp + * it is a fatal condition. If it occurs on tvp we carry on as if + * it was removed and ufs_lookup_ino() below will resolve the + * condition that cleared it. + */ + if (tvp && vn_lock(tvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + error = vn_lock(tvp, LK_EXCLUSIVE); + if (error) + tvp = NULL; + else + VOP_UNLOCK(tvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + fdp = VTOI(fdvp); + ip = VTOI(fvp); + tdp = VTOI(tdvp); + xp = NULL; + if (tvp) + xp = VTOI(tvp); + /* + * Re-resolve fvp to be certain it still exists at the same inode + * number. If the lookup fails abort the rename. If the inode + * number has changed we need to VGET it and then restart the + * whole lock operation. + */ + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) + goto unlockout; + if (ino != ip->i_number) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + vput(fvp); + if (tvp) + VOP_UNLOCK(tvp, 0); + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &fvp); + if (error) + goto releout; + VOP_UNLOCK(fvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + /* + * Re-lookup to now that all of the locks are held. + */ + error = ufs_lookup_ino(tdvp, NULL, tcnp, &ino); + if (error != 0 && error != EJUSTRETURN) + goto unlockout; + /* + * If tvp disappeared we just need to restart. + */ + if (error == EJUSTRETURN && tvp != NULL) { + vput(tvp); + tvp = NULL; + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + /* + * If tvp changed out from under us we need to drop the old one, + * VGET the new one, and restart. + */ + if (error == 0 && (tvp == NULL || xp->i_number != ino)) { + if (tvp != NULL) + vput(tvp); + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &tvp); + if (error) + tvp = NULL; + else + VOP_UNLOCK(tvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (VTOI(tdvp)->i_flags & APPEND))) { error = EPERM; - goto abortit; + goto unlockout; } - /* * Renaming a file to itself has no effect. The upper layers should - * not call us in that case. Temporarily just warn if they do. + * not call us in that case. */ - if (fvp == tvp) { - printf("ufs_rename: fvp == tvp (can't happen)\n"); - error = 0; - goto abortit; - } - - if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) - goto abortit; - dp = VTOI(fdvp); - ip = VTOI(fvp); + if (fvp == tvp) + panic("ufs_rename: fvp == tvp (can't happen)\n"); + doingdirectory = 0; + newparent = 0; + ino = ip->i_number; if (ip->i_nlink >= LINK_MAX) { - VOP_UNLOCK(fvp, 0); error = EMLINK; - goto abortit; + goto unlockout; } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) - || (dp->i_flags & APPEND)) { - VOP_UNLOCK(fvp, 0); + || (fdp->i_flags & APPEND)) { error = EPERM; - goto abortit; + goto unlockout; } if ((ip->i_mode & IFMT) == IFDIR) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || - (ip->i_flag & IN_RENAME)) { - VOP_UNLOCK(fvp, 0); + fdp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT) { error = EINVAL; - goto abortit; + goto unlockout; } - ip->i_flag |= IN_RENAME; - oldparent = dp->i_number; + if (fdp->i_number != tdp->i_number) + newparent = tdp->i_number; doingdirectory = 1; } - vrele(fdvp); /* - * When the target exists, both the directory - * and target vnodes are returned locked. + * If ".." must be changed (ie the directory gets a new + * parent) then the source directory must not be in the + * directory hierarchy above the target, as this would + * orphan everything below the source directory. Also + * the user must have write permission in the source so + * as to be able to change "..". */ - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); + if (doingdirectory && newparent) { + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); + if (error) + goto unlockout; + error = ufs_checkpath(ino, fdp->i_number, tdp, tcnp->cn_cred, + &ino); + /* + * We encountered a lock that we have to wait for. Unlock + * everything else and VGET before restarting. + */ + if (ino) { + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fvp, 0); + if (tvp) + VOP_UNLOCK(tvp, 0); + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); + if (error == 0) + vput(nvp); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + if (error) + goto unlockout; + if ((tcnp->cn_flags & SAVESTART) == 0) + panic("ufs_rename: lost to startdir"); + } + if (ip->i_effnlink == 0 || fdp->i_effnlink == 0 || tdp->i_effnlink == 0) + panic("Bad effnlink ip %p, fdp %p, tdp %p", ip, fdp, tdp); /* * 1) Bump link count while we're moving stuff @@ -1129,49 +1279,12 @@ ufs_rename(ap) DIP_SET(ip, i_nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - if ((error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | - DOINGASYNC(fvp)))) != 0) { - VOP_UNLOCK(fvp, 0); + softdep_setup_link(tdp, ip); + error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | DOINGASYNC(fvp))); + if (error) goto bad; - } /* - * If ".." must be changed (ie the directory gets a new - * parent) then the source directory must not be in the - * directory hierarchy above the target, as this would - * orphan everything below the source directory. Also - * the user must have write permission in the source so - * as to be able to change "..". We must repeat the call - * to namei, as the parent directory is unlocked by the - * call to checkpath(). - */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - fvp_ino = ip->i_number; - VOP_UNLOCK(fvp, 0); - if (oldparent != dp->i_number) - newparent = dp->i_number; - if (doingdirectory && newparent) { - if (error) /* write access check above */ - goto bad; - if (xp != NULL) - vput(tvp); - error = ufs_checkpath(fvp_ino, dp, tcnp->cn_cred); - if (error) - goto out; - if ((tcnp->cn_flags & SAVESTART) == 0) - panic("ufs_rename: lost to startdir"); - VREF(tdvp); - error = relookup(tdvp, &tvp, tcnp); - if (error) - goto out; - vrele(tdvp); - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); - } - /* * 2) If target doesn't exist, link the target * to the source and unlink the source. * Otherwise, rewrite the target directory @@ -1179,46 +1292,27 @@ ufs_rename(ap) * expunge the original entry's existence. */ if (xp == NULL) { - if (dp->i_dev != ip->i_dev) + if (tdp->i_dev != ip->i_dev) panic("ufs_rename: EXDEV"); - /* - * Account for ".." in new directory. - * When source and destination have the same - * parent we don't fool with the link count. - */ if (doingdirectory && newparent) { - if ((nlink_t)dp->i_nlink >= LINK_MAX) { + /* + * Account for ".." in new directory. + * When source and destination have the same + * parent we don't adjust the link count. The + * actual link modification is completed when + * .. is rewritten below. + */ + if ((nlink_t)tdp->i_nlink >= LINK_MAX) { error = EMLINK; goto bad; } - dp->i_effnlink++; - dp->i_nlink++; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | - DOINGASYNC(tdvp))); - if (error) - goto bad; } ufs_makedirentry(ip, tcnp, &newdir); error = ufs_direnter(tdvp, NULL, &newdir, tcnp, NULL); - if (error) { - if (doingdirectory && newparent) { - dp->i_effnlink--; - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - (void)UFS_UPDATE(tdvp, 1); - } + if (error) goto bad; - } - vput(tdvp); } else { - if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev) + if (xp->i_dev != tdp->i_dev || xp->i_dev != ip->i_dev) panic("ufs_rename: EXDEV"); /* * Short circuit rename(foo, foo). @@ -1231,7 +1325,7 @@ ufs_rename(ap) * destination of the rename. This implements append-only * directories. */ - if ((dp->i_mode & S_ISTXT) && + if ((tdp->i_mode & S_ISTXT) && VOP_ACCESS(tdvp, VADMIN, tcnp->cn_cred, td) && VOP_ACCESS(tvp, VADMIN, tcnp->cn_cred, td)) { error = EPERM; @@ -1242,9 +1336,9 @@ ufs_rename(ap) * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if ((xp->i_mode&IFMT) == IFDIR) { + if ((xp->i_mode & IFMT) == IFDIR) { if ((xp->i_effnlink > 2) || - !ufs_dirempty(xp, dp->i_number, tcnp->cn_cred)) { + !ufs_dirempty(xp, tdp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; } @@ -1257,16 +1351,16 @@ ufs_rename(ap) error = EISDIR; goto bad; } - error = ufs_dirrewrite(dp, xp, ip->i_number, + error = ufs_dirrewrite(tdp, xp, ip->i_number, IFTODT(ip->i_mode), (doingdirectory && newparent) ? newparent : doingdirectory); if (error) goto bad; if (doingdirectory) { if (!newparent) { - dp->i_effnlink--; + tdp->i_effnlink--; if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); + softdep_change_linkcnt(tdp); } xp->i_effnlink--; if (DOINGSOFTDEP(tvp)) @@ -1285,9 +1379,9 @@ ufs_rename(ap) * them now. */ if (!newparent) { - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; + tdp->i_nlink--; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; } xp->i_nlink--; DIP_SET(xp, i_nlink, xp->i_nlink); @@ -1295,105 +1389,80 @@ ufs_rename(ap) ioflag = IO_NORMAL; if (!DOINGASYNC(tvp)) ioflag |= IO_SYNC; + /* Don't go to bad here as the new link exists. */ if ((error = UFS_TRUNCATE(tvp, (off_t)0, ioflag, tcnp->cn_cred, tcnp->cn_thread)) != 0) - goto bad; + goto unlockout; } - vput(tdvp); - vput(tvp); - xp = NULL; } /* - * 3) Unlink the source. + * 3) Unlink the source. We have to resolve the path again to + * fixup the directory offset and count for ufs_dirremove. */ - fcnp->cn_flags &= ~MODMASK; - fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; - if ((fcnp->cn_flags & SAVESTART) == 0) - panic("ufs_rename: lost from startdir"); - VREF(fdvp); - error = relookup(fdvp, &fvp, fcnp); - if (error == 0) - vrele(fdvp); - if (fvp != NULL) { - xp = VTOI(fvp); - dp = VTOI(fdvp); - } else { - /* - * From name has disappeared. IN_RENAME is not sufficient - * to protect against directory races due to timing windows, - * so we have to remove the panic. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. - */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - vrele(ap->a_fvp); - return (0); + if (fdvp == tdvp) { + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) + panic("ufs_rename: from entry went away!"); } /* - * Ensure that the directory entry still exists and has not - * changed while the new name has been entered. If the source is - * a file then the entry may have been unlinked or renamed. In - * either case there is no further work to be done. If the source - * is a directory then it cannot have been rmdir'ed; the IN_RENAME - * flag ensures that it cannot be moved by another rename or removed - * by a rmdir. + * If the source is a directory with a + * new parent, the link count of the old + * parent directory must be decremented + * and ".." set to point to the new parent. */ - if (xp != ip) { + if (doingdirectory && newparent) { /* - * From name resolves to a different inode. IN_RENAME is - * not sufficient protection against timing window races - * so we can't panic here. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. + * If xp exists we simply use its link, otherwise we must + * add a new one. */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - } else { - /* - * If the source is a directory with a - * new parent, the link count of the old - * parent directory must be decremented - * and ".." set to point to the new parent. - */ - if (doingdirectory && newparent) { - xp->i_offset = mastertemplate.dot_reclen; - ufs_dirrewrite(xp, dp, newparent, DT_DIR, 0); - cache_purge(fdvp); + if (xp == NULL) { + tdp->i_effnlink++; + tdp->i_nlink++; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(tdvp)) + softdep_setup_dotdot_link(tdp, ip); + error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | + DOINGASYNC(tdvp))); + /* Don't go to bad here as the new link exists. */ + if (error) + goto unlockout; } - error = ufs_dirremove(fdvp, xp, fcnp->cn_flags, 0); - xp->i_flag &= ~IN_RENAME; + ip->i_offset = mastertemplate.dot_reclen; + ufs_dirrewrite(ip, fdp, newparent, DT_DIR, 0); + cache_purge(fdvp); } - if (dp) - vput(fdvp); - if (xp) - vput(fvp); - vrele(ap->a_fvp); + error = ufs_dirremove(fdvp, ip, fcnp->cn_flags, 0); + +unlockout: + vput(tdvp); + vput(fdvp); + vput(fvp); + if (tvp) + vput(tvp); + if (mp) + vfs_unbusy(mp); return (error); bad: - if (xp) - vput(ITOV(xp)); - vput(ITOV(dp)); -out: - if (doingdirectory) - ip->i_flag &= ~IN_RENAME; - if (vn_lock(fvp, LK_EXCLUSIVE) == 0) { - ip->i_effnlink--; - ip->i_nlink--; - DIP_SET(ip, i_nlink, ip->i_nlink); - ip->i_flag |= IN_CHANGE; - ip->i_flag &= ~IN_RENAME; - if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - vput(fvp); - } else - vrele(fvp); + ip->i_effnlink--; + ip->i_nlink--; + DIP_SET(ip, i_nlink, ip->i_nlink); + ip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(fvp)) + softdep_revert_link(tdp, ip); + goto unlockout; + +releout: + vrele(tdvp); + if (tvp) + vrele(tvp); + vrele(fdvp); + vrele(fvp); + if (mp) + vfs_unbusy(mp); + return (error); } @@ -1565,8 +1634,7 @@ ufs_mkdir(ap) ip->i_effnlink = 2; ip->i_nlink = 2; DIP_SET(ip, i_nlink, 2); - if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(ip); + if (cnp->cn_flags & ISWHITEOUT) { ip->i_flags |= UF_OPAQUE; DIP_SET(ip, i_flags, ip->i_flags); @@ -1582,8 +1650,8 @@ ufs_mkdir(ap) DIP_SET(dp, i_nlink, dp->i_nlink); dp->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(dvp)) - softdep_change_linkcnt(dp); - error = UFS_UPDATE(tvp, !(DOINGSOFTDEP(dvp) | DOINGASYNC(dvp))); + softdep_setup_mkdir(dp, ip); + error = UFS_UPDATE(dvp, !(DOINGSOFTDEP(dvp) | DOINGASYNC(dvp))); if (error) goto bad; #ifdef MAC @@ -1701,8 +1769,6 @@ bad: dp->i_nlink--; DIP_SET(dp, i_nlink, dp->i_nlink); dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(dvp)) - softdep_change_linkcnt(dp); /* * No need to do an explicit VOP_TRUNCATE here, vrele will * do this for us because we set the link count to 0. @@ -1712,7 +1778,8 @@ bad: DIP_SET(ip, i_nlink, 0); ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(ip); + softdep_revert_mkdir(dp, ip); + vput(tvp); } out: @@ -1748,10 +1815,13 @@ ufs_rmdir(ap) * tries to remove a locally mounted on directory). */ error = 0; - if ((ip->i_flag & IN_RENAME) || ip->i_effnlink < 2) { + if (ip->i_effnlink < 2) { error = EINVAL; goto out; } + if (dp->i_effnlink < 3) + panic("ufs_dirrem: Bad link count %d on parent", + dp->i_effnlink); if (!ufs_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; goto out; @@ -1775,18 +1845,14 @@ ufs_rmdir(ap) */ dp->i_effnlink--; ip->i_effnlink--; - if (DOINGSOFTDEP(vp)) { - softdep_change_linkcnt(dp); - softdep_change_linkcnt(ip); - } + if (DOINGSOFTDEP(vp)) + softdep_setup_rmdir(dp, ip); error = ufs_dirremove(dvp, ip, cnp->cn_flags, 1); if (error) { dp->i_effnlink++; ip->i_effnlink++; - if (DOINGSOFTDEP(vp)) { - softdep_change_linkcnt(dp); - softdep_change_linkcnt(ip); - } + if (DOINGSOFTDEP(vp)) + softdep_revert_rmdir(dp, ip); goto out; } cache_purge(dvp); @@ -2282,6 +2348,9 @@ ufs_makeinode(mode, dvp, vpp, cnp) if ((mode & IFMT) == 0) mode |= IFREG; + if (VTOI(dvp)->i_effnlink < 2) + panic("ufs_makeinode: Bad link count %d on parent", + VTOI(dvp)->i_effnlink); error = UFS_VALLOC(dvp, mode, cnp->cn_cred, &tvp); if (error) return (error); @@ -2411,7 +2480,7 @@ ufs_makeinode(mode, dvp, vpp, cnp) ip->i_nlink = 1; DIP_SET(ip, i_nlink, 1); if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(ip); + softdep_setup_create(VTOI(dvp), ip); if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred) && priv_check_cred(cnp->cn_cred, PRIV_VFS_SETGID, 0)) { ip->i_mode &= ~ISGID; @@ -2484,7 +2553,7 @@ bad: DIP_SET(ip, i_nlink, 0); ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(ip); + softdep_revert_create(VTOI(dvp), ip); vput(tvp); return (error); } Index: /usr/src/sys/ufs/ufs/ufsmount.h =================================================================== --- /usr/src/sys/ufs/ufs/ufsmount.h (revision 200709) +++ /usr/src/sys/ufs/ufs/ufsmount.h (working copy) @@ -57,6 +57,7 @@ struct ucred; struct uio; struct vnode; struct ufs_extattr_per_mount; +struct jblocks; /* This structure describes the UFS specific mount structure data. */ struct ufsmount { @@ -75,6 +76,10 @@ struct ufsmount { long um_numindirdeps; /* outstanding indirdeps */ struct workhead softdep_workitem_pending; /* softdep work queue */ struct worklist *softdep_worklist_tail; /* Tail pointer for above */ + struct workhead softdep_journal_pending; /* journal work queue */ + struct worklist *softdep_journal_tail; /* Tail pointer for above */ + struct jblocks *softdep_jblocks; /* Journal block information */ + int softdep_on_journal; /* Items on the journal list */ int softdep_on_worklist; /* Items on the worklist */ int softdep_on_worklist_inprogress; /* Busy items on worklist */ int softdep_deps; /* Total dependency count */ Index: /usr/src/sys/ufs/ufs/ufs_lookup.c =================================================================== --- /usr/src/sys/ufs/ufs/ufs_lookup.c (revision 200709) +++ /usr/src/sys/ufs/ufs/ufs_lookup.c (working copy) @@ -77,9 +77,6 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) -static int ufs_lookup_(struct vnode *, struct vnode **, struct componentname *, - ino_t *); - /* * Convert a component of a pathname into a pointer to a locked inode. * This is a very central and rather complicated routine. @@ -134,11 +131,11 @@ ufs_lookup(ap) } */ *ap; { - return (ufs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); + return (ufs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); } -static int -ufs_lookup_(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, +int +ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino) { struct inode *dp; /* inode for directory being searched */ @@ -464,6 +461,8 @@ notfound: return (ENOENT); found: + if (dd_ino != NULL) + *dd_ino = ino; if (numdirpasses == 2) nchstats.ncs_pass2++; /* @@ -486,11 +485,6 @@ found: if ((flags & ISLASTCN) && nameiop == LOOKUP) dp->i_diroff = i_offset &~ (DIRBLKSIZ - 1); - if (dd_ino != NULL) { - *dd_ino = ino; - return (0); - } - /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. @@ -520,6 +514,8 @@ found: dp->i_count = 0; else dp->i_count = dp->i_offset - prevoff; + if (dd_ino != NULL) + return (0); if (dp->i_number == ino) { VREF(vdp); *vpp = vdp; @@ -560,6 +556,8 @@ found: dp->i_offset = i_offset; if (dp->i_number == ino) return (EISDIR); + if (dd_ino != NULL) + return (0); if ((error = VFS_VGET(vdp->v_mount, ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); @@ -567,6 +565,8 @@ found: cnp->cn_flags |= SAVENAME; return (0); } + if (dd_ino != NULL) + return (0); /* * Step through the translation in the name. We do not `vput' the @@ -598,7 +598,7 @@ found: * to the inode we looked up before vdp lock was * dropped. */ - error = ufs_lookup_(pdp, NULL, cnp, &ino1); + error = ufs_lookup_ino(pdp, NULL, cnp, &ino1); if (error) { vput(tdp); return (error); @@ -819,29 +819,12 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) (bp->b_data + blkoff))->d_reclen = DIRBLKSIZ; blkoff += DIRBLKSIZ; } - if (softdep_setup_directory_add(bp, dp, dp->i_offset, - dirp->d_ino, newdirbp, 1) == 0) { - bdwrite(bp); - return (UFS_UPDATE(dvp, 0)); - } - /* We have just allocated a directory block in an - * indirect block. Rather than tracking when it gets - * claimed by the inode, we simply do a VOP_FSYNC - * now to ensure that it is there (in case the user - * does a future fsync). Note that we have to unlock - * the inode for the entry that we just entered, as - * the VOP_FSYNC may need to lock other inodes which - * can lead to deadlock if we also hold a lock on - * the newly entered node. - */ - if ((error = bwrite(bp))) - return (error); - if (tvp != NULL) - VOP_UNLOCK(tvp, 0); - error = VOP_FSYNC(dvp, MNT_WAIT, td); - if (tvp != NULL) - vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); - return (error); + softdep_setup_directory_add(bp, dp, dp->i_offset, + dirp->d_ino, newdirbp, 1); + if (newdirbp) + bdwrite(newdirbp); + bdwrite(bp); + return (UFS_UPDATE(dvp, 0)); } if (DOINGASYNC(dvp)) { bdwrite(bp); @@ -924,7 +907,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) dp->i_offset + ((char *)ep - dirbuf)); #endif if (DOINGSOFTDEP(dvp)) - softdep_change_directoryentry_offset(dp, dirbuf, + softdep_change_directoryentry_offset(bp, dp, dirbuf, (caddr_t)nep, (caddr_t)ep, dsize); else bcopy((caddr_t)nep, (caddr_t)ep, dsize); @@ -976,6 +959,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) (void) softdep_setup_directory_add(bp, dp, dp->i_offset + (caddr_t)ep - dirbuf, dirp->d_ino, newdirbp, 0); + if (newdirbp) + bdwrite(newdirbp); bdwrite(bp); } else { if (DOINGASYNC(dvp)) { @@ -1084,7 +1069,7 @@ out: if (DOINGSOFTDEP(dvp)) { if (ip) { ip->i_effnlink--; - softdep_change_linkcnt(ip); + softdep_setup_unlink(dp, ip); softdep_setup_remove(bp, dp, ip, isrmdir); } if (softdep_slowdown(dvp)) { @@ -1146,7 +1131,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) ep->d_type = newtype; oip->i_effnlink--; if (DOINGSOFTDEP(vdp)) { - softdep_change_linkcnt(oip); + softdep_setup_unlink(dp, oip); softdep_setup_directory_change(bp, dp, oip, newinum, isrmdir); bdwrite(bp); } else { @@ -1267,25 +1252,25 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cre /* * Check if source directory is in the path of the target directory. - * Target is supplied locked, source is unlocked. - * The target is always vput before returning. */ int -ufs_checkpath(ino_t source_ino, struct inode *target, struct ucred *cred) +ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, struct ucred *cred, ino_t *wait_ino) { - struct vnode *vp, *vp1; + struct mount *mp; + struct vnode *tvp, *vp, *vp1; int error; ino_t dd_ino; - vp = ITOV(target); - if (target->i_number == source_ino) { - error = EEXIST; - goto out; - } - error = 0; + vp = tvp = ITOV(target); + mp = vp->v_mount; + *wait_ino = 0; + if (target->i_number == source_ino) + return (EEXIST); + if (target->i_number == parent_ino) + return (0); if (target->i_number == ROOTINO) - goto out; - + return (0); + error = 0; for (;;) { error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) @@ -1296,9 +1281,13 @@ int } if (dd_ino == ROOTINO) break; - error = vn_vget_ino(vp, dd_ino, LK_EXCLUSIVE, &vp1); - if (error != 0) + if (dd_ino == parent_ino) break; + error = VFS_VGET(mp, dd_ino, LK_EXCLUSIVE | LK_NOWAIT, &vp1); + if (error != 0) { + *wait_ino = dd_ino; + break; + } /* Recheck that ".." still points to vp1 after relock of vp */ error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) { @@ -1310,14 +1299,14 @@ int vput(vp1); continue; } - vput(vp); + if (vp != tvp) + vput(vp); vp = vp1; } -out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); - if (vp != NULL) + panic("checkpath: .. not a directory\n"); + if (vp != tvp) vput(vp); return (error); } Index: /usr/src/sys/ufs/ufs/ufs_extern.h =================================================================== --- /usr/src/sys/ufs/ufs/ufs_extern.h (revision 200709) +++ /usr/src/sys/ufs/ufs/ufs_extern.h (working copy) @@ -57,7 +57,7 @@ int ufs_bmap(struct vop_bmap_args *); int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *); int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); -int ufs_checkpath(ino_t, struct inode *, struct ucred *); +int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *); void ufs_dirbad(struct inode *, doff_t, char *); int ufs_dirbadentry(struct vnode *, struct direct *, int); int ufs_dirempty(struct inode *, ino_t, struct ucred *); @@ -69,6 +69,8 @@ int ufs_direnter(struct vnode *, struct vnode *, struct componentname *, struct buf *); int ufs_dirremove(struct vnode *, struct inode *, int, int); int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); +int ufs_lookup_ino(struct vnode *, struct vnode **, struct componentname *, + ino_t *); int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); int ufs_inactive(struct vop_inactive_args *); int ufs_init(struct vfsconf *); @@ -81,19 +83,33 @@ vfs_root_t ufs_root; int ufs_uninit(struct vfsconf *); int ufs_vinit(struct mount *, struct vop_vector *, struct vnode **); +#include +SYSCTL_DECL(_vfs_ufs); + /* * Soft update function prototypes. */ int softdep_setup_directory_add(struct buf *, struct inode *, off_t, ino_t, struct buf *, int); -void softdep_change_directoryentry_offset(struct inode *, caddr_t, - caddr_t, caddr_t, int); +void softdep_change_directoryentry_offset(struct buf *, struct inode *, + caddr_t, caddr_t, caddr_t, int); void softdep_setup_remove(struct buf *,struct inode *, struct inode *, int); void softdep_setup_directory_change(struct buf *, struct inode *, struct inode *, ino_t, int); void softdep_change_linkcnt(struct inode *); void softdep_releasefile(struct inode *); int softdep_slowdown(struct vnode *); +void softdep_setup_create(struct inode *, struct inode *); +void softdep_setup_dotdot_link(struct inode *, struct inode *); +void softdep_setup_link(struct inode *, struct inode *); +void softdep_setup_mkdir(struct inode *, struct inode *); +void softdep_setup_rmdir(struct inode *, struct inode *); +void softdep_setup_unlink(struct inode *, struct inode *); +void softdep_revert_create(struct inode *, struct inode *); +void softdep_revert_dotdot_link(struct inode *, struct inode *); +void softdep_revert_link(struct inode *, struct inode *); +void softdep_revert_mkdir(struct inode *, struct inode *); +void softdep_revert_rmdir(struct inode *, struct inode *); /* * Flags to low-level allocation routines. The low 16-bits are reserved Index: /usr/src/sys/ufs/ffs/ffs_vfsops.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_vfsops.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_vfsops.c (working copy) @@ -322,6 +322,7 @@ ffs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); + fs->fs_mtime = time_second; fs->fs_clean = 0; if ((error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) { vn_finished_write(mp); @@ -858,6 +859,7 @@ ffs_mountfs(devvp, mp, td) */ bzero(fs->fs_fsmnt, MAXMNTLEN); strlcpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname, MAXMNTLEN); + mp->mnt_stat.f_iosize = fs->fs_bsize; if( mp->mnt_flag & MNT_ROOTFS) { /* @@ -869,6 +871,7 @@ ffs_mountfs(devvp, mp, td) } if (ronly == 0) { + fs->fs_mtime = time_second; if ((fs->fs_flags & FS_DOSOFTDEP) && (error = softdep_mount(devvp, mp, fs, cred)) != 0) { free(fs->fs_csp, M_UFSMNT); @@ -899,7 +902,6 @@ ffs_mountfs(devvp, mp, td) * This would all happen while the filesystem was busy/not * available, so would effectively be "atomic". */ - mp->mnt_stat.f_iosize = fs->fs_bsize; (void) ufs_extattr_autostart(mp, td); #endif /* !UFS_EXTATTR_AUTOSTART */ #endif /* !UFS_EXTATTR */ @@ -1829,9 +1831,6 @@ ffs_bufwrite(struct buf *bp) } BO_UNLOCK(bp->b_bufobj); - /* Mark the buffer clean */ - bundirty(bp); - /* * If this buffer is marked for background writing and we * do not have to wait for it, make a copy and write the @@ -1872,9 +1871,16 @@ ffs_bufwrite(struct buf *bp) newbp->b_flags &= ~B_INVAL; #ifdef SOFTUPDATES - /* move over the dependencies */ - if (!LIST_EMPTY(&bp->b_dep)) - softdep_move_dependencies(bp, newbp); + /* + * Move over the dependencies. If there are rollbacks, + * leave the parent buffer dirtied as it will need to + * be written again. + */ + if (LIST_EMPTY(&bp->b_dep) || + softdep_move_dependencies(bp, newbp) == 0) + bundirty(bp); +#else + bundirty(bp); #endif /* @@ -1887,8 +1893,11 @@ ffs_bufwrite(struct buf *bp) */ bqrelse(bp); bp = newbp; - } + } else + /* Mark the buffer clean */ + bundirty(bp); + /* Let the normal bufwrite do the rest for us */ normal_write: return (bufwrite(bp)); Index: /usr/src/sys/ufs/ffs/ffs_softdep.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_softdep.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_softdep.c (working copy) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -130,10 +131,12 @@ softdep_setup_inomapdep(bp, ip, newinum) } void -softdep_setup_blkmapdep(bp, mp, newblkno) +softdep_setup_blkmapdep(bp, mp, newblkno, frags, oldfrags) struct buf *bp; struct mount *mp; ufs2_daddr_t newblkno; + int frags; + int oldfrags; { panic("softdep_setup_blkmapdep called"); @@ -403,31 +406,13 @@ softdep_get_depcounts(struct mount *mp, * These definitions need to be adapted to the system to which * this file is being ported. */ -/* - * malloc types defined for the softdep system. - */ -static MALLOC_DEFINE(M_PAGEDEP, "pagedep","File page dependencies"); -static MALLOC_DEFINE(M_INODEDEP, "inodedep","Inode dependencies"); -static MALLOC_DEFINE(M_NEWBLK, "newblk","New block allocation"); -static MALLOC_DEFINE(M_BMSAFEMAP, "bmsafemap","Block or frag allocated from cyl group map"); -static MALLOC_DEFINE(M_ALLOCDIRECT, "allocdirect","Block or frag dependency for an inode"); -static MALLOC_DEFINE(M_INDIRDEP, "indirdep","Indirect block dependencies"); -static MALLOC_DEFINE(M_ALLOCINDIR, "allocindir","Block dependency for an indirect block"); -static MALLOC_DEFINE(M_FREEFRAG, "freefrag","Previously used frag for an inode"); -static MALLOC_DEFINE(M_FREEBLKS, "freeblks","Blocks freed from an inode"); -static MALLOC_DEFINE(M_FREEFILE, "freefile","Inode deallocated"); -static MALLOC_DEFINE(M_DIRADD, "diradd","New directory entry"); -static MALLOC_DEFINE(M_MKDIR, "mkdir","New directory"); -static MALLOC_DEFINE(M_DIRREM, "dirrem","Directory entry deleted"); -static MALLOC_DEFINE(M_NEWDIRBLK, "newdirblk","Unclaimed new directory block"); -static MALLOC_DEFINE(M_SAVEDINO, "savedino","Saved inodes"); #define M_SOFTDEP_FLAGS (M_WAITOK | M_USE_RESERVE) #define D_PAGEDEP 0 #define D_INODEDEP 1 -#define D_NEWBLK 2 -#define D_BMSAFEMAP 3 +#define D_BMSAFEMAP 2 +#define D_NEWBLK 3 #define D_ALLOCDIRECT 4 #define D_INDIRDEP 5 #define D_ALLOCINDIR 6 @@ -438,8 +423,64 @@ softdep_get_depcounts(struct mount *mp, #define D_MKDIR 11 #define D_DIRREM 12 #define D_NEWDIRBLK 13 -#define D_LAST D_NEWDIRBLK +#define D_FREEWORK 14 +#define D_FREEDEP 15 +#define D_JADDREF 16 +#define D_JREMREF 17 +#define D_JMVREF 18 +#define D_JNEWBLK 19 +#define D_JFREEBLK 20 +#define D_JFREEFRAG 21 +#define D_JSEG 22 +#define D_JSEGDEP 23 +#define D_LAST D_JSEGDEP +unsigned long dep_current[D_LAST + 1]; +unsigned long dep_total[D_LAST + 1]; + + +SYSCTL_NODE(_debug, OID_AUTO, softdep, CTLFLAG_RW, 0, "soft updates stats"); +SYSCTL_NODE(_debug_softdep, OID_AUTO, total, CTLFLAG_RW, 0, + "total dependencies allocated"); +SYSCTL_NODE(_debug_softdep, OID_AUTO, current, CTLFLAG_RW, 0, + "current dependencies allocated"); + +#define SOFTDEP_TYPE(type, str, long) \ + static MALLOC_DEFINE(M_ ## type, #str, long); \ + SYSCTL_LONG(_debug_softdep_total, OID_AUTO, str, CTLFLAG_RD, \ + &dep_total[D_ ## type], 0, ""); \ + SYSCTL_LONG(_debug_softdep_current, OID_AUTO, str, CTLFLAG_RD, \ + &dep_current[D_ ## type], 0, ""); + +SOFTDEP_TYPE(PAGEDEP, pagedep, "File page dependencies"); +SOFTDEP_TYPE(INODEDEP, inodedep, "Inode dependencies"); +SOFTDEP_TYPE(BMSAFEMAP, bmsafemap, + "Block or frag allocated from cyl group map"); +SOFTDEP_TYPE(NEWBLK, newblk, "New block or frag allocation dependency"); +SOFTDEP_TYPE(ALLOCDIRECT, allocdirect, "Block or frag dependency for an inode"); +SOFTDEP_TYPE(INDIRDEP, indirdep, "Indirect block dependencies"); +SOFTDEP_TYPE(ALLOCINDIR, allocindir, "Block dependency for an indirect block"); +SOFTDEP_TYPE(FREEFRAG, freefrag, "Previously used frag for an inode"); +SOFTDEP_TYPE(FREEBLKS, freeblks, "Blocks freed from an inode"); +SOFTDEP_TYPE(FREEFILE, freefile, "Inode deallocated"); +SOFTDEP_TYPE(DIRADD, diradd, "New directory entry"); +SOFTDEP_TYPE(MKDIR, mkdir, "New directory"); +SOFTDEP_TYPE(DIRREM, dirrem, "Directory entry deleted"); +SOFTDEP_TYPE(NEWDIRBLK, newdirblk, "Unclaimed new directory block"); +SOFTDEP_TYPE(FREEWORK, freework, "free an inode block"); +SOFTDEP_TYPE(FREEDEP, freedep, "track a block free"); +SOFTDEP_TYPE(JADDREF, jaddref, "Journal inode ref add"); +SOFTDEP_TYPE(JREMREF, jremref, "Journal inode ref remove"); +SOFTDEP_TYPE(JMVREF, jmvref, "Journal inode ref move"); +SOFTDEP_TYPE(JNEWBLK, jnewblk, "Journal new block"); +SOFTDEP_TYPE(JFREEBLK, jfreeblk, "Journal free block"); +SOFTDEP_TYPE(JFREEFRAG, jfreefrag, "Journal free frag"); +SOFTDEP_TYPE(JSEG, jseg, "Journal segment"); +SOFTDEP_TYPE(JSEGDEP, jsegdep, "Journal segment complete"); + +static MALLOC_DEFINE(M_SAVEDINO, "savedino", "Saved inodes"); +static MALLOC_DEFINE(M_JBLOCKS, "jblocks", "Journal block locations"); + /* * translate from workitem type to memory type * MUST match the defines above, such that memtype[D_XXX] == M_XXX @@ -447,8 +488,8 @@ softdep_get_depcounts(struct mount *mp, static struct malloc_type *memtype[] = { M_PAGEDEP, M_INODEDEP, + M_BMSAFEMAP, M_NEWBLK, - M_BMSAFEMAP, M_ALLOCDIRECT, M_INDIRDEP, M_ALLOCINDIR, @@ -458,7 +499,17 @@ static struct malloc_type *memtype[] = { M_DIRADD, M_MKDIR, M_DIRREM, - M_NEWDIRBLK + M_NEWDIRBLK, + M_FREEWORK, + M_FREEDEP, + M_JADDREF, + M_JREMREF, + M_JMVREF, + M_JNEWBLK, + M_JFREEBLK, + M_JFREEFRAG, + M_JSEG, + M_JSEGDEP }; #define DtoM(type) (memtype[type]) @@ -467,17 +518,21 @@ static struct malloc_type *memtype[] = { * Names of malloc types. */ #define TYPENAME(type) \ - ((unsigned)(type) < D_LAST ? memtype[type]->ks_shortdesc : "???") + ((unsigned)(type) <= D_LAST ? memtype[type]->ks_shortdesc : "???") /* * End system adaptation definitions. */ +#define DOTDOT_OFFSET offsetof(struct dirtemplate, dotdot_ino) +#define DOT_OFFSET offsetof(struct dirtemplate, dot_ino) + /* * Forward declarations. */ struct inodedep_hashhead; struct newblk_hashhead; struct pagedep_hashhead; +struct bmsafemap_hashhead; /* * Internal function prototypes. @@ -493,53 +548,128 @@ static int flush_inodedep_deps(struct mount *, ino static int flush_deplist(struct allocdirectlst *, int, int *); static int handle_written_filepage(struct pagedep *, struct buf *); static void diradd_inode_written(struct diradd *, struct inodedep *); +static int handle_written_indirdep(struct indirdep *, struct buf *, + struct buf**); static int handle_written_inodeblock(struct inodedep *, struct buf *); -static void handle_allocdirect_partdone(struct allocdirect *); +static int handle_written_bmsafemap(struct bmsafemap *, struct buf *); +static void handle_written_jaddref(struct jaddref *, struct jseg *); +static void handle_written_jremref(struct jremref *, struct jseg *); +static void handle_written_jseg(struct jseg *, struct buf *); +static void handle_written_jnewblk(struct jnewblk *, struct jseg *); +static void handle_written_jfreeblk(struct jfreeblk *, struct jseg *); +static void handle_written_jfreefrag(struct jfreefrag *, struct jseg *); +static void jseg_write(struct fs *, struct jblocks *, struct jseg *, + uint8_t *); +static void jaddref_write(struct jaddref *, uint8_t *); +static void jremref_write(struct jremref *, uint8_t *); +static void jmvref_write(struct jmvref *, uint8_t *); +static void jnewblk_write(struct jnewblk *, uint8_t *); +static void jfreeblk_write(struct jfreeblk *, uint8_t *); +static void jfreefrag_write(struct jfreefrag *, uint8_t *); +static void handle_allocdirect_partdone(struct allocdirect *, + struct workhead *); +static void cancel_newblk(struct newblk *, struct workhead *); +static void handle_workitem_indirdep(struct indirdep *); +static void indirdep_complete(struct indirdep *); static void handle_allocindir_partdone(struct allocindir *); static void initiate_write_filepage(struct pagedep *, struct buf *); +static void initiate_write_indirdep(struct indirdep*, struct buf *); static void handle_written_mkdir(struct mkdir *, int); +static void initiate_write_bmsafemap(struct bmsafemap *, struct buf *); static void initiate_write_inodeblock_ufs1(struct inodedep *, struct buf *); static void initiate_write_inodeblock_ufs2(struct inodedep *, struct buf *); static void handle_workitem_freefile(struct freefile *); static void handle_workitem_remove(struct dirrem *, struct vnode *); static struct dirrem *newdirrem(struct buf *, struct inode *, struct inode *, int, struct dirrem **); -static void free_diradd(struct diradd *); -static void free_allocindir(struct allocindir *, struct inodedep *); +static void free_indirdep(struct indirdep *); +static void free_diradd(struct diradd *, struct workhead *); +static void merge_diradd(struct inodedep *, struct diradd *); +static void complete_diradd(struct diradd *); +static struct diradd *diradd_lookup(struct pagedep *, int); +static void cancel_diradd_dotdot(struct inode *, struct dirrem *); +static void cancel_allocindir(struct allocindir *, struct inodedep *, + struct freeblks *); +static void complete_mkdir(struct mkdir *); static void free_newdirblk(struct newdirblk *); -static int indir_trunc(struct freeblks *, ufs2_daddr_t, int, ufs_lbn_t, - ufs2_daddr_t *); -static void deallocate_dependencies(struct buf *, struct inodedep *); -static void free_allocdirect(struct allocdirectlst *, - struct allocdirect *, int); +static void free_jremref(struct jremref *); +static void free_jaddref(struct jaddref *); +static void free_jsegdep(struct jsegdep *); +static void free_jseg(struct jseg *); +static void free_jnewblk(struct jnewblk *); +static void free_jfreeblk(struct jfreeblk *); +static void free_jfreefrag(struct jfreefrag *); +static void free_freedep(struct freedep *); +static void cancel_jnewblk(struct jnewblk *, struct workhead *); +static void cancel_jaddref(struct jaddref *, struct inodedep *, + struct workhead *); +static void cancel_jfreefrag(struct jfreefrag *); +static void indir_trunc(struct freework *, ufs2_daddr_t, ufs_lbn_t); +static int deallocate_dependencies(struct buf *, struct inodedep *, + struct freeblks *); +static void free_newblk(struct newblk *); +static void cancel_allocdirect(struct allocdirectlst *, + struct allocdirect *, struct freeblks *, int); static int check_inode_unwritten(struct inodedep *); static int free_inodedep(struct inodedep *); +static void freework_freeblock(struct freework *); static void handle_workitem_freeblocks(struct freeblks *, int); +static void handle_complete_freeblocks(struct freeblks *); +static void handle_workitem_indirblk(struct freework *); +static void handle_written_freework(struct freework *); static void merge_inode_lists(struct allocdirectlst *,struct allocdirectlst *); static void setup_allocindir_phase2(struct buf *, struct inode *, - struct allocindir *); + struct inodedep *, struct allocindir *, ufs_lbn_t); static struct allocindir *newallocindir(struct inode *, int, ufs2_daddr_t, - ufs2_daddr_t); + ufs2_daddr_t, ufs_lbn_t); static void handle_workitem_freefrag(struct freefrag *); -static struct freefrag *newfreefrag(struct inode *, ufs2_daddr_t, long); +static struct freefrag *newfreefrag(struct inode *, ufs2_daddr_t, long, + ufs_lbn_t); static void allocdirect_merge(struct allocdirectlst *, struct allocdirect *, struct allocdirect *); -static struct bmsafemap *bmsafemap_lookup(struct mount *, struct buf *); -static int newblk_find(struct newblk_hashhead *, struct fs *, ufs2_daddr_t, - struct newblk **); -static int newblk_lookup(struct fs *, ufs2_daddr_t, int, struct newblk **); +static struct freefrag *allocindir_merge(struct allocindir *, + struct allocindir *); +static int bmsafemap_find(struct bmsafemap_hashhead *, struct mount *, int, + struct bmsafemap **); +static struct bmsafemap *bmsafemap_lookup(struct mount *, struct buf *, + int cg); +static int newblk_find(struct newblk_hashhead *, struct mount *, ufs2_daddr_t, + int, struct newblk **); +static int newblk_lookup(struct mount *, ufs2_daddr_t, int, struct newblk **); static int inodedep_find(struct inodedep_hashhead *, struct fs *, ino_t, struct inodedep **); static int inodedep_lookup(struct mount *, ino_t, int, struct inodedep **); -static int pagedep_lookup(struct inode *, ufs_lbn_t, int, struct pagedep **); +static int pagedep_lookup(struct mount *, ino_t, ufs_lbn_t, int, + struct pagedep **); static int pagedep_find(struct pagedep_hashhead *, ino_t, ufs_lbn_t, struct mount *mp, int, struct pagedep **); static void pause_timer(void *); static int request_cleanup(struct mount *, int); static int process_worklist_item(struct mount *, int); +static void jwork_move(struct workhead *, struct workhead *); static void add_to_worklist(struct worklist *); static void softdep_flush(void); static int softdep_speedup(void); +static int journal_mount(struct mount *, struct fs *, struct ucred *); +static void add_to_journal(struct worklist *); +static void remove_from_journal(struct worklist *); +static void softdep_process_journal(struct mount *, int); +static struct jremref *newjremref(struct dirrem *, struct inode *, + struct inode *ip, off_t); +static struct jaddref *newjaddref(struct inode *, ino_t, off_t, int16_t, + uint16_t); +static struct jmvref *newjmvref(struct inode *, ino_t, off_t, off_t); +static struct jfreeblk *newjfreeblk(struct freeblks *, ufs_lbn_t, + ufs2_daddr_t, int); +static struct jfreefrag *newjfreefrag(struct freefrag *, struct inode *, + ufs2_daddr_t, long, ufs_lbn_t); +static struct freework *newfreework(struct freeblks *, struct freework *, + ufs_lbn_t, ufs2_daddr_t, int, int); +static void jwait(struct worklist *wk); +static struct inodedep *inodedep_lookup_ip(struct inode *); +static int bmsafemap_rollbacks(struct bmsafemap *); +static struct freefile *handle_bufwait(struct inodedep *, struct workhead *); +static void handle_jwork(struct workhead *); /* * Exported softdep operations. @@ -572,40 +702,128 @@ MTX_SYSINIT(softdep_lock, &lk, "Softdep Lock", MTX (item)->wk_state &= ~ONWORKLIST; \ LIST_REMOVE(item, wk_list); \ } while (0) +#define WORKLIST_INSERT_UNLOCKED WORKLIST_INSERT +#define WORKLIST_REMOVE_UNLOCKED WORKLIST_REMOVE + #else /* DEBUG */ -static void worklist_insert(struct workhead *, struct worklist *); -static void worklist_remove(struct worklist *); +static void worklist_insert(struct workhead *, struct worklist *, int); +static void worklist_remove(struct worklist *, int); -#define WORKLIST_INSERT(head, item) worklist_insert(head, item) -#define WORKLIST_REMOVE(item) worklist_remove(item) +#define WORKLIST_INSERT(head, item) worklist_insert(head, item, 1) +#define WORKLIST_INSERT_UNLOCKED(head, item) worklist_insert(head, item, 0) +#define WORKLIST_REMOVE(item) worklist_remove(item, 1) +#define WORKLIST_REMOVE_UNLOCKED(item) worklist_remove(item, 0) static void -worklist_insert(head, item) +worklist_insert(head, item, locked) struct workhead *head; struct worklist *item; + int locked; { - mtx_assert(&lk, MA_OWNED); + if (locked) + mtx_assert(&lk, MA_OWNED); if (item->wk_state & ONWORKLIST) - panic("worklist_insert: already on list"); + panic("worklist_insert: %p %s(0x%X) already on list", + item, TYPENAME(item->wk_type), item->wk_state); item->wk_state |= ONWORKLIST; LIST_INSERT_HEAD(head, item, wk_list); } static void -worklist_remove(item) +worklist_remove(item, locked) struct worklist *item; + int locked; { - mtx_assert(&lk, MA_OWNED); + if (locked) + mtx_assert(&lk, MA_OWNED); if ((item->wk_state & ONWORKLIST) == 0) - panic("worklist_remove: not on list"); + panic("worklist_remove: %p %s(0x%X) not on list", + item, TYPENAME(item->wk_type), item->wk_state); item->wk_state &= ~ONWORKLIST; LIST_REMOVE(item, wk_list); } #endif /* DEBUG */ /* + * Merge two jsegdeps keeping only the oldest one as newer references + * can't be discarded until after older references. + */ +static inline struct jsegdep * +jsegdep_merge(struct jsegdep *one, struct jsegdep *two) +{ + struct jsegdep *swp; + + if (two == NULL) + return (one); + + if (one->jd_seg->js_seq > two->jd_seg->js_seq) { + swp = one; + one = two; + two = swp; + } + WORKLIST_REMOVE(&two->jd_list); + free_jsegdep(two); + + return (one); +} + +/* + * If two freedeps are compatible free one to reduce list size. + */ +static inline struct freedep * +freedep_merge(struct freedep *one, struct freedep *two) +{ + if (two == NULL) + return (one); + + if (one->fd_freework == two->fd_freework) { + WORKLIST_REMOVE(&two->fd_list); + free_freedep(two); + } + return (one); +} + +/* + * Move journal work from one list to another. Duplicate freedeps and + * jsegdeps are coalesced to keep the lists as small as possible. + */ +static void +jwork_move(dst, src) + struct workhead *dst; + struct workhead *src; +{ + struct freedep *freedep; + struct jsegdep *jsegdep; + struct worklist *wkn; + struct worklist *wk; + + KASSERT(dst != src, + ("jwork_move: dst == src")); + freedep = NULL; + jsegdep = NULL; + LIST_FOREACH_SAFE(wk, dst, wk_list, wkn) { + if (wk->wk_type == D_JSEGDEP) + jsegdep = jsegdep_merge(WK_JSEGDEP(wk), jsegdep); + if (wk->wk_type == D_FREEDEP) + freedep = freedep_merge(WK_FREEDEP(wk), freedep); + } + + mtx_assert(&lk, MA_OWNED); + while ((wk = LIST_FIRST(src)) != NULL) { + WORKLIST_REMOVE(wk); + WORKLIST_INSERT(dst, wk); + if (wk->wk_type == D_JSEGDEP) { + jsegdep = jsegdep_merge(WK_JSEGDEP(wk), jsegdep); + continue; + } + if (wk->wk_type == D_FREEDEP) + freedep = freedep_merge(WK_FREEDEP(wk), freedep); + } +} + +/* * Routines for tracking and managing workitems. */ static void workitem_free(struct worklist *, int); @@ -623,13 +841,16 @@ workitem_free(item, type) #ifdef DEBUG if (item->wk_state & ONWORKLIST) - panic("workitem_free: still on list"); + panic("workitem_free: %s(0x%X) still on list", + TYPENAME(item->wk_type), item->wk_state); if (item->wk_type != type) - panic("workitem_free: type mismatch"); + panic("workitem_free: type mismatch %s != %s", + TYPENAME(item->wk_type), TYPENAME(type)); #endif ump = VFSTOUFS(item->wk_mp); if (--ump->softdep_deps == 0 && ump->softdep_req) wakeup(&ump->softdep_deps); + dep_current[type]--; free(item, DtoM(type)); } @@ -643,6 +864,8 @@ workitem_alloc(item, type, mp) item->wk_mp = mp; item->wk_state = 0; ACQUIRE_LOCK(&lk); + dep_current[type]++; + dep_total[type]++; VFSTOUFS(mp)->softdep_deps++; VFSTOUFS(mp)->softdep_accdeps++; FREE_LOCK(&lk); @@ -696,6 +919,9 @@ SYSCTL_INT(_debug, OID_AUTO, dir_entry, CTLFLAG_RW SYSCTL_DECL(_vfs_ffs); +LIST_HEAD(bmsafemap_hashhead, bmsafemap) *bmsafemap_hashtbl; +static u_long bmsafemap_hash; /* size of hash table - 1 */ + static int compute_summary_at_mount = 0; /* Whether to recompute the summary at mount time */ SYSCTL_INT(_vfs_ffs, OID_AUTO, compute_summary_at_mount, CTLFLAG_RW, &compute_summary_at_mount, 0, "Recompute summary at mount"); @@ -779,7 +1005,7 @@ softdep_speedup(void) req_pending = 1; wakeup(&req_pending); } - + /* XXX Don't we really want to speedup the buf daemon? */ return speedup_syncer(); } @@ -799,7 +1025,8 @@ add_to_worklist(wk) mtx_assert(&lk, MA_OWNED); ump = VFSTOUFS(wk->wk_mp); if (wk->wk_state & ONWORKLIST) - panic("add_to_worklist: already on list"); + panic("add_to_worklist: %s(0x%X) already on list", + TYPENAME(wk->wk_type), wk->wk_state); wk->wk_state |= ONWORKLIST; if (LIST_EMPTY(&ump->softdep_workitem_pending)) LIST_INSERT_HEAD(&ump->softdep_workitem_pending, wk, wk_list); @@ -838,6 +1065,7 @@ softdep_process_worklist(mp, full) ACQUIRE_LOCK(&lk); loopcount = 1; starttime = time_second; + softdep_process_journal(mp, 0); while (ump->softdep_on_worklist > 0) { if ((cnt = process_worklist_item(mp, 0)) == -1) break; @@ -969,6 +1197,15 @@ process_worklist_item(mp, flags) handle_workitem_freefile(WK_FREEFILE(wk)); break; + case D_FREEWORK: + /* Final block in an indirect was freed. */ + handle_workitem_indirblk(WK_FREEWORK(wk)); + break; + + case D_INDIRDEP: + handle_workitem_indirdep(WK_INDIRDEP(wk)); + break; + default: panic("%s_process_worklist: Unknown type %s", "softdep", TYPENAME(wk->wk_type)); @@ -982,19 +1219,22 @@ process_worklist_item(mp, flags) /* * Move dependencies from one buffer to another. */ -void +int softdep_move_dependencies(oldbp, newbp) struct buf *oldbp; struct buf *newbp; { struct worklist *wk, *wktail; + int dirty; - if (!LIST_EMPTY(&newbp->b_dep)) - panic("softdep_move_dependencies: need merge code"); - wktail = 0; + dirty = 0; + wktail = NULL; ACQUIRE_LOCK(&lk); while ((wk = LIST_FIRST(&oldbp->b_dep)) != NULL) { LIST_REMOVE(wk, wk_list); + if (wk->wk_type == D_BMSAFEMAP && + bmsafemap_rollbacks(WK_BMSAFEMAP(wk))) + dirty = 1; if (wktail == 0) LIST_INSERT_HEAD(&newbp->b_dep, wk, wk_list); else @@ -1002,6 +1242,8 @@ softdep_move_dependencies(oldbp, newbp) wktail = wk; } FREE_LOCK(&lk); + + return (dirty); } /* @@ -1198,23 +1440,22 @@ pagedep_find(pagedephd, ino, lbn, mp, flags, paged * This routine must be called with splbio interrupts blocked. */ static int -pagedep_lookup(ip, lbn, flags, pagedeppp) - struct inode *ip; +pagedep_lookup(mp, ino, lbn, flags, pagedeppp) + struct mount *mp; + ino_t ino; ufs_lbn_t lbn; int flags; struct pagedep **pagedeppp; { struct pagedep *pagedep; struct pagedep_hashhead *pagedephd; - struct mount *mp; int ret; int i; mtx_assert(&lk, MA_OWNED); - mp = ITOV(ip)->v_mount; - pagedephd = PAGEDEP_HASH(mp, ip->i_number, lbn); + pagedephd = PAGEDEP_HASH(mp, ino, lbn); - ret = pagedep_find(pagedephd, ip->i_number, lbn, mp, flags, pagedeppp); + ret = pagedep_find(pagedephd, ino, lbn, mp, flags, pagedeppp); if (*pagedeppp || (flags & DEPALLOC) == 0) return (ret); FREE_LOCK(&lk); @@ -1222,12 +1463,12 @@ static int M_PAGEDEP, M_SOFTDEP_FLAGS|M_ZERO); workitem_alloc(&pagedep->pd_list, D_PAGEDEP, mp); ACQUIRE_LOCK(&lk); - ret = pagedep_find(pagedephd, ip->i_number, lbn, mp, flags, pagedeppp); + ret = pagedep_find(pagedephd, ino, lbn, mp, flags, pagedeppp); if (*pagedeppp) { WORKITEM_FREE(pagedep, D_PAGEDEP); return (ret); } - pagedep->pd_ino = ip->i_number; + pagedep->pd_ino = ino; pagedep->pd_lbn = lbn; LIST_INIT(&pagedep->pd_dirremhd); LIST_INIT(&pagedep->pd_pendinghd); @@ -1314,10 +1555,12 @@ inodedep_lookup(mp, inum, flags, inodedeppp) inodedep->id_savedino1 = NULL; inodedep->id_savedsize = -1; inodedep->id_savedextsize = -1; - inodedep->id_buf = NULL; + inodedep->id_bmsafemap = NULL; + inodedep->id_mkdiradd = NULL; LIST_INIT(&inodedep->id_pendinghd); LIST_INIT(&inodedep->id_inowait); LIST_INIT(&inodedep->id_bufwait); + LIST_INIT(&inodedep->id_jaddrefhd); TAILQ_INIT(&inodedep->id_inoupdt); TAILQ_INIT(&inodedep->id_newinoupdt); TAILQ_INIT(&inodedep->id_extupdt); @@ -1336,17 +1579,29 @@ u_long newblk_hash; /* size of hash table - 1 */ (&newblk_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & newblk_hash]) static int -newblk_find(newblkhd, fs, newblkno, newblkpp) +newblk_find(newblkhd, mp, newblkno, flags, newblkpp) struct newblk_hashhead *newblkhd; - struct fs *fs; + struct mount *mp; ufs2_daddr_t newblkno; + int flags; struct newblk **newblkpp; { struct newblk *newblk; - LIST_FOREACH(newblk, newblkhd, nb_hash) - if (newblkno == newblk->nb_newblkno && fs == newblk->nb_fs) - break; + LIST_FOREACH(newblk, newblkhd, nb_hash) { + if (newblkno != newblk->nb_newblkno) + continue; + if (mp != newblk->nb_list.wk_mp) + continue; + /* + * If we're creating a new dependency don't match those that + * have already been converted to allocdirects. This is for + * a frag extend. + */ + if ((flags & DEPALLOC) && newblk->nb_list.wk_type != D_NEWBLK) + continue; + break; + } if (newblk) { *newblkpp = newblk; return (1); @@ -1361,8 +1616,8 @@ static int * Found or allocated entry is returned in newblkpp. */ static int -newblk_lookup(fs, newblkno, flags, newblkpp) - struct fs *fs; +newblk_lookup(mp, newblkno, flags, newblkpp) + struct mount *mp; ufs2_daddr_t newblkno; int flags; struct newblk **newblkpp; @@ -1370,21 +1625,25 @@ static int struct newblk *newblk; struct newblk_hashhead *newblkhd; - newblkhd = NEWBLK_HASH(fs, newblkno); - if (newblk_find(newblkhd, fs, newblkno, newblkpp)) + newblkhd = NEWBLK_HASH(VFSTOUFS(mp)->um_fs, newblkno); + if (newblk_find(newblkhd, mp, newblkno, flags, newblkpp)) return (1); if ((flags & DEPALLOC) == 0) return (0); FREE_LOCK(&lk); - newblk = malloc(sizeof(struct newblk), - M_NEWBLK, M_SOFTDEP_FLAGS); + newblk = malloc(sizeof(union allblk), M_NEWBLK, + M_SOFTDEP_FLAGS | M_ZERO); + workitem_alloc(&newblk->nb_list, D_NEWBLK, mp); ACQUIRE_LOCK(&lk); - if (newblk_find(newblkhd, fs, newblkno, newblkpp)) { - free(newblk, M_NEWBLK); + if (newblk_find(newblkhd, mp, newblkno, flags, newblkpp)) { + WORKITEM_FREE(newblk, D_NEWBLK); return (1); } - newblk->nb_state = 0; - newblk->nb_fs = fs; + newblk->nb_freefrag = NULL; + LIST_INIT(&newblk->nb_indirdeps); + LIST_INIT(&newblk->nb_newdirblk); + LIST_INIT(&newblk->nb_jwork); + newblk->nb_state = ATTACHED; newblk->nb_newblkno = newblkno; LIST_INSERT_HEAD(newblkhd, newblk, nb_hash); *newblkpp = newblk; @@ -1401,10 +1660,10 @@ softdep_initialize() LIST_INIT(&mkdirlisthd); max_softdeps = desiredvnodes * 4; - pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, - &pagedep_hash); + pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, &pagedep_hash); inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, &inodedep_hash); - newblk_hashtbl = hashinit(64, M_NEWBLK, &newblk_hash); + newblk_hashtbl = hashinit(desiredvnodes / 5, M_NEWBLK, &newblk_hash); + bmsafemap_hashtbl = hashinit(1024, M_BMSAFEMAP, &bmsafemap_hash); /* initialise bioops hack */ bioops.io_start = softdep_disk_io_initiation; @@ -1428,6 +1687,7 @@ softdep_uninitialize() hashdestroy(pagedep_hashtbl, M_PAGEDEP, pagedep_hash); hashdestroy(inodedep_hashtbl, M_INODEDEP, inodedep_hash); hashdestroy(newblk_hashtbl, M_NEWBLK, newblk_hash); + hashdestroy(bmsafemap_hashtbl, M_BMSAFEMAP, bmsafemap_hash); } /* @@ -1457,9 +1717,14 @@ softdep_mount(devvp, mp, fs, cred) MNT_IUNLOCK(mp); ump = VFSTOUFS(mp); LIST_INIT(&ump->softdep_workitem_pending); + LIST_INIT(&ump->softdep_journal_pending); ump->softdep_worklist_tail = NULL; ump->softdep_on_worklist = 0; ump->softdep_deps = 0; + if ((error = journal_mount(mp, fs, cred)) != 0) { + printf("Failed to start journal: %d\n", error); + return (error); + } /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation @@ -1493,7 +1758,1527 @@ softdep_mount(devvp, mp, fs, cred) return (0); } +struct jblocks { + struct jseglst jb_segs; /* TAILQ of current segments. */ + struct jextent *jb_extent; /* Extent array. */ + uint64_t jb_nextseq; /* Next sequence number. */ + uint64_t jb_oldestseq; /* Oldest active sequence number. */ + int jb_avail; /* Available extents. */ + int jb_used; /* Last used extent. */ + int jb_head; /* Allocator head. */ + int jb_off; /* Allocator extent offset. */ + int jb_blocks; /* Total disk blocks covered. */ + int jb_free; /* Total disk blocks free. */ +}; +struct jextent { + ufs2_daddr_t je_daddr; /* Disk block address. */ + int je_blocks; /* Disk block count. */ +}; + +static struct jblocks * +jblocks_create(void) +{ + struct jblocks *jblocks; + + jblocks = malloc(sizeof(*jblocks), M_JBLOCKS, M_WAITOK | M_ZERO); + TAILQ_INIT(&jblocks->jb_segs); + jblocks->jb_avail = 10; + jblocks->jb_extent = malloc(sizeof(struct jextent) * jblocks->jb_avail, + M_JBLOCKS, M_WAITOK | M_ZERO); + + return (jblocks); +} + +static ufs2_daddr_t +jblocks_alloc(struct jblocks *jblocks, int bytes, int *actual) +{ + ufs2_daddr_t daddr; + struct jextent *jext; + int freecnt; + int blocks; + + blocks = bytes / DEV_BSIZE; + jext = &jblocks->jb_extent[jblocks->jb_head]; + freecnt = jext->je_blocks - jblocks->jb_off; + if (freecnt == 0) { + jblocks->jb_off = 0; + if (++jblocks->jb_head > jblocks->jb_used) + jblocks->jb_head = 0; + jext = &jblocks->jb_extent[jblocks->jb_head]; + freecnt = jext->je_blocks; + } + if (freecnt > blocks) + freecnt = blocks; + *actual = freecnt * DEV_BSIZE; + daddr = jext->je_daddr + jblocks->jb_off; + jblocks->jb_off += freecnt; + jblocks->jb_free -= freecnt; + + return (daddr); +} + +static void +jblocks_free(struct jblocks *jblocks, int bytes) +{ + + if (jblocks->jb_free == 0) + wakeup(jblocks); + jblocks->jb_free += bytes / DEV_BSIZE; +} + +static void +jblocks_destroy(struct jblocks *jblocks) +{ + + if (jblocks->jb_extent) + free(jblocks->jb_extent, M_JBLOCKS); + free(jblocks, M_JBLOCKS); +} + +static void +jblocks_add(struct jblocks *jblocks, ufs2_daddr_t daddr, int blocks) +{ + struct jextent *jext; + + jblocks->jb_blocks += blocks; + jblocks->jb_free += blocks; + jext = &jblocks->jb_extent[jblocks->jb_used]; + /* Adding the first block. */ + if (jext->je_daddr == 0) { + jext->je_daddr = daddr; + jext->je_blocks = blocks; + return; + } + /* Extending the last extent. */ + if (jext->je_daddr + jext->je_blocks == daddr) { + jext->je_blocks += blocks; + return; + } + /* Adding a new extent. */ + if (++jblocks->jb_used == jblocks->jb_avail) { + jblocks->jb_avail *= 2; + jext = malloc(sizeof(struct jextent) * jblocks->jb_avail, + M_JBLOCKS, M_WAITOK | M_ZERO); + memcpy(jext, jblocks->jb_extent, + sizeof(struct jextent) * jblocks->jb_used); + free(jblocks->jb_extent, M_JBLOCKS); + jblocks->jb_extent = jext; + } + jext = &jblocks->jb_extent[jblocks->jb_used]; + jext->je_daddr = daddr; + jext->je_blocks = blocks; + return; +} + +static int +journal_mount(mp, fs, cred) + struct mount *mp; + struct fs *fs; + struct ucred *cred; +{ + struct jblocks *jblocks; + struct vnode *vp; + struct inode *ip; + ufs2_daddr_t blkno; + int bcount; + int error; + int i; + + error = VFS_VGET(mp, fs->fs_sujournal, LK_EXCLUSIVE, &vp); + if (error) + return (error); + ip = VTOI(vp); + if (ip->i_size < SUJ_MIN) { + error = ENOSPC; + goto out; + } + bcount = lblkno(fs, ip->i_size); /* Only use whole blocks. */ + jblocks = jblocks_create(); + for (i = 0; i < bcount; i++) { + error = ufs_bmaparray(vp, i, &blkno, NULL, NULL, NULL); + if (error) + break; + jblocks_add(jblocks, blkno, fsbtodb(fs, fs->fs_frag)); + } + if (error) { + jblocks_destroy(jblocks); + goto out; + } + DIP_SET(ip, i_modrev, fs->fs_mtime); + ip->i_flags |= IN_MODIFIED; + ffs_update(vp, 1); + VFSTOUFS(mp)->softdep_jblocks = jblocks; +out: + vput(vp); + return (error); +} + /* + * Called when a journal record is ready to be written. Space is allocated + * and the journal entry is created when the journal is flushed to stable + * store. + */ +static void +add_to_journal(wk) + struct worklist *wk; +{ + struct ufsmount *ump; + + mtx_assert(&lk, MA_OWNED); + if ((wk->wk_state & DEPCOMPLETE) == 0) + panic("add_to_journal: Invalid wk state 0x%X", wk->wk_state); + ump = VFSTOUFS(wk->wk_mp); + if (wk->wk_state & ONWORKLIST) + panic("add_to_journal: %s(0x%X) already on list", + TYPENAME(wk->wk_type), wk->wk_state); + wk->wk_state |= ONWORKLIST; + if (LIST_EMPTY(&ump->softdep_journal_pending)) + LIST_INSERT_HEAD(&ump->softdep_journal_pending, wk, wk_list); + else + LIST_INSERT_AFTER(ump->softdep_journal_tail, wk, wk_list); + ump->softdep_journal_tail = wk; + ump->softdep_on_journal += 1; +} + +/* + * Remove an arbitrary item for the journal worklist maintain the tail + * pointer. This happens when a new operation obviates the need to + * journal an old operation. + */ +static void +remove_from_journal(wk) + struct worklist *wk; +{ + struct ufsmount *ump; + + mtx_assert(&lk, MA_OWNED); + ump = VFSTOUFS(wk->wk_mp); +#ifdef DEBUG /* XXX Expensive, temporary. */ + { + struct worklist *wkn; + + LIST_FOREACH(wkn, &ump->softdep_journal_pending, wk_list) + if (wkn == wk) + break; + if (wkn == NULL) + panic("remove_from_journal: %p is not in journal", wk); + } +#endif + /* + * We emulate a TAILQ to save space in most structures which do not + * require TAILQ semantics. Here we must update the tail position + * when removing the tail which is not the final entry. + */ + if (ump->softdep_journal_tail == wk) + ump->softdep_journal_tail = + (struct worklist *)wk->wk_list.le_prev; + + WORKLIST_REMOVE(wk); + ump->softdep_on_journal -= 1; +} + +static void +jseg_write(fs, jblocks, jseg, data) + struct fs *fs; + struct jblocks *jblocks; + struct jseg *jseg; + uint8_t *data; +{ + struct jsegrec *rec; + + rec = (struct jsegrec *)data; + rec->jsr_seq = jseg->js_seq; + rec->jsr_oldest = jblocks->jb_oldestseq; + rec->jsr_cnt = jseg->js_cnt; + rec->jsr_crc = 0; + rec->jsr_time = fs->fs_mtime; +} + +static void +jaddref_write(jaddref, data) + struct jaddref *jaddref; + uint8_t *data; +{ + struct jrefrec *rec; + + rec = (struct jrefrec *)data; + rec->jr_op = JOP_ADDREF; + rec->jr_ino = jaddref->ja_ino; + rec->jr_parent = jaddref->ja_parent; + rec->jr_nlink = jaddref->ja_nlink; + rec->jr_mode = jaddref->ja_mode; + rec->jr_diroff = jaddref->ja_diroff; +} + +static void +jremref_write(jremref, data) + struct jremref *jremref; + uint8_t *data; +{ + struct jrefrec *rec; + + rec = (struct jrefrec *)data; + rec->jr_op = JOP_REMREF; + rec->jr_ino = jremref->jr_ino; + rec->jr_parent = jremref->jr_parent; + rec->jr_nlink = jremref->jr_nlink; + rec->jr_mode = jremref->jr_mode; + rec->jr_diroff = jremref->jr_diroff; +} + +static void +jmvref_write(jmvref, data) + struct jmvref *jmvref; + uint8_t *data; +{ + struct jmvrec *rec; + + rec = (struct jmvrec *)data; + rec->jm_op = JOP_MVREF; + rec->jm_ino = jmvref->jm_ino; + rec->jm_parent = jmvref->jm_parent; + rec->jm_oldoff = jmvref->jm_oldoff; + rec->jm_newoff = jmvref->jm_newoff; +} + +static void +jnewblk_write(jnewblk, data) + struct jnewblk *jnewblk; + uint8_t *data; +{ + struct jblkrec *rec; + + rec = (struct jblkrec *)data; + rec->jb_op = JOP_NEWBLK; + rec->jb_ino = jnewblk->jn_ino; + rec->jb_blkno = jnewblk->jn_blkno; + rec->jb_lbn = jnewblk->jn_lbn; + rec->jb_frags = jnewblk->jn_frags; + rec->jb_oldfrags = jnewblk->jn_oldfrags; +} + +static void +jfreeblk_write(jfreeblk, data) + struct jfreeblk *jfreeblk; + uint8_t *data; +{ + struct jblkrec *rec; + + rec = (struct jblkrec *)data; + rec->jb_op = JOP_FREEBLK; + rec->jb_ino = jfreeblk->jf_ino; + rec->jb_blkno = jfreeblk->jf_blkno; + rec->jb_lbn = jfreeblk->jf_lbn; + rec->jb_frags = jfreeblk->jf_frags; + rec->jb_oldfrags = 0; +} + +static void +jfreefrag_write(jfreefrag, data) + struct jfreefrag *jfreefrag; + uint8_t *data; +{ + struct jblkrec *rec; + + rec = (struct jblkrec *)data; + rec->jb_op = JOP_FREEBLK; + rec->jb_ino = jfreefrag->fr_ino; + rec->jb_blkno = jfreefrag->fr_blkno; + rec->jb_lbn = jfreefrag->fr_lbn; + rec->jb_frags = jfreefrag->fr_frags; + rec->jb_oldfrags = 0; +} + +/* + * Flush some journal records to disk. + */ +static void +softdep_process_journal(mp, flags) + struct mount *mp; + int flags; +{ + struct jblocks *jblocks; + struct ufsmount *ump; + struct worklist *wk; + struct jseg *jseg; + struct buf *bp; + uint8_t *data; + struct fs *fs; + int segwritten; + int jrecpb; /* records per fs block. */ + int jrecpf; /* records per fs frag. */ + int size; + int cnt; + + ump = VFSTOUFS(mp); + fs = ump->um_fs; + jblocks = ump->softdep_jblocks; + jrecpb = fs->fs_bsize / JREC_SIZE; + jrecpf = fs->fs_fsize / JREC_SIZE; + segwritten = 0; + while ((cnt = ump->softdep_on_journal) != 0) { + /* + * Create a new segment to hold as many as 'cnt' journal + * entries and add them to the segment. Notice cnt is + * off by one to account for the space required by the + * jsegrec. If we don't have a full block to log skip it + * unless flags == MNT_WAIT and we haven't written anything. + */ +#if 0 + /* XXX Need some kind of timeout on this. */ + cnt++; + if (cnt < jrecpb && (flags != MNT_WAIT || segwritten != 0)) + return; +#endif + /* + * If there is no space try to clean up some entries. + */ + while (jblocks->jb_free == 0) { + if (flags != MNT_WAIT) + return; + /* + * Items in the worklist should release journal + * space when they free storage. Process them + * until we have enough space to proceed. If + * we can't process an item we need to flush more + * bufs and wait. + */ +#if 0 /* + * XXX Currently this deadlocks because bufs are + * held locked while waiting on journal writes in + * truncate and softdep_update_inodeblock(). + */ + printf("softdep: Out of journal space!\n"); + if (process_worklist_item(mp, LK_NOWAIT) != -1) + continue; +#endif + printf("softdep: Out of journal space, no progress."); + softdep_speedup(); + msleep(jblocks, &lk, PRIBIO, "jblocks", 0); + } + FREE_LOCK(&lk); + jseg = malloc(sizeof(*jseg), M_JSEG, M_SOFTDEP_FLAGS); + workitem_alloc(&jseg->js_list, D_JSEG, mp); + LIST_INIT(&jseg->js_entries); + jseg->js_refs = 1; /* Self reference. */ + jseg->js_jblocks = jblocks; + size = fragroundup(fs, cnt * JREC_SIZE); + bp = geteblk(fs->fs_bsize, 0); + ACQUIRE_LOCK(&lk); + /* + * If there was a race while we were allocating the block + * and jseg the entry we care about was likely written. + * We bail out in both the WAIT and NOWAIT case and assume + * the caller will loop if the entry it cares about is + * not written. + */ + if (ump->softdep_on_journal == 0 || jblocks->jb_free == 0) { + bp->b_flags |= B_INVAL | B_NOCACHE; + WORKITEM_FREE(jseg, D_JSEG); + FREE_LOCK(&lk); + brelse(bp); + ACQUIRE_LOCK(&lk); + return; + } + /* + * Calculate the disk block size required for the available + * records rounded to a frag size. + */ + cnt = ump->softdep_on_journal + 1; + if (cnt < jrecpb) + cnt = roundup2(cnt, jrecpf); + else + cnt = jrecpb; + size = cnt * JREC_SIZE; + /* + * Allocate a disk block for this journal data and account + * for truncation of the requested size if enough contiguous + * space was not available. + */ + bp->b_blkno = bp->b_lblkno = jblocks_alloc(jblocks, size, + &size); + bp->b_offset = bp->b_blkno * DEV_BSIZE; + bp->b_bcount = size; + bp->b_bufobj = &ump->um_devvp->v_bufobj; + bp->b_flags &= ~B_INVAL; + /* + * Initialize our jseg with as many as cnt - 1 records. + * Assign the next sequence number to it and link it + * in-order. + */ + cnt = MIN(ump->softdep_on_journal, (size / JREC_SIZE) - 1); + jseg->js_buf = bp; + jseg->js_cnt = cnt; + jseg->js_size = size; + jseg->js_seq = jblocks->jb_nextseq++; + if (TAILQ_EMPTY(&jblocks->jb_segs)) + jblocks->jb_oldestseq = jseg->js_seq; + TAILQ_INSERT_TAIL(&jblocks->jb_segs, jseg, js_next); + /* + * Start filling in records from the pending list. + */ + data = bp->b_data; + jseg_write(fs, jblocks, jseg, data); + data += JREC_SIZE; + while ((wk = LIST_FIRST(&ump->softdep_journal_pending)) + != NULL) { + remove_from_journal(wk); + wk->wk_state |= IOSTARTED; + WORKLIST_INSERT(&jseg->js_entries, wk); + switch (wk->wk_type) { + case D_JADDREF: + jaddref_write(WK_JADDREF(wk), data); + break; + case D_JREMREF: + jremref_write(WK_JREMREF(wk), data); + break; + case D_JMVREF: + jmvref_write(WK_JMVREF(wk), data); + break; + case D_JNEWBLK: + jnewblk_write(WK_JNEWBLK(wk), data); + break; + case D_JFREEBLK: + jfreeblk_write(WK_JFREEBLK(wk), data); + break; + case D_JFREEFRAG: + jfreefrag_write(WK_JFREEFRAG(wk), data); + break; + default: + panic("process_journal: Unknown type %s", + TYPENAME(wk->wk_type)); + /* NOTREACHED */ + } + data += JREC_SIZE; + if (--cnt == 0) + break; + } + /* + * Write this one buffer and continue. + */ +#if 1 + WORKLIST_INSERT(&bp->b_dep, &jseg->js_list); + FREE_LOCK(&lk); + BO_LOCK(bp->b_bufobj); + bgetvp(ump->um_devvp, bp); + BO_UNLOCK(bp->b_bufobj); + /* + * XXX bawrite? Completion ordering? We may permit writing + * the journal out of order but then we must complete + * those segments in order by delaying handle_written_jseg + * until all predecessors have completed. + */ + bwrite(bp); + ACQUIRE_LOCK(&lk); +#else + handle_written_jseg(jseg, bp); + FREE_LOCK(&lk); + brelse(bp); + ACQUIRE_LOCK(&lk); +#endif + segwritten++; + } +} + +/* + * Complete a jseg write, allowing all dependencies awaiting journal writes + * to proceed. Each journal dependency also attaches a jsegdep to dependent + * structures so that the journal segment can be freed to reclaim space. + */ +static void +handle_written_jseg(jseg, bp) + struct jseg *jseg; + struct buf *bp; +{ + struct worklist *wk; + struct jmvref *jmvref; + int waiting; + int i; + + if (jseg->js_refs == 0) + panic("handle_written_jseg: No self-reference on %p", jseg); + /* + * We'll never need this buffer again, set flags so it will be + * discarded. + */ + bp->b_flags |= B_INVAL | B_NOCACHE; + i = 0; + while ((wk = LIST_FIRST(&jseg->js_entries)) != NULL) { + WORKLIST_REMOVE(wk); + waiting = wk->wk_state & IOWAITING; + wk->wk_state &= ~(IOSTARTED | IOWAITING); + wk->wk_state |= COMPLETE; + KASSERT(i < jseg->js_cnt, + ("handle_written_jseg: overflow %d >= %d", + i, jseg->js_cnt)); + jseg->js_refs++; /* Ref goes to the jsegdep below. */ + switch (wk->wk_type) { + case D_JADDREF: + handle_written_jaddref(WK_JADDREF(wk), jseg); + break; + case D_JREMREF: + handle_written_jremref(WK_JREMREF(wk), jseg); + break; + case D_JMVREF: + jseg->js_refs--; /* No jsegdep here. */ + jmvref = WK_JMVREF(wk); + LIST_REMOVE(jmvref, jm_deps); + WORKITEM_FREE(jmvref, D_JMVREF); + break; + case D_JNEWBLK: + handle_written_jnewblk(WK_JNEWBLK(wk), jseg); + break; + case D_JFREEBLK: + handle_written_jfreeblk(WK_JFREEBLK(wk), jseg); + break; + case D_JFREEFRAG: + handle_written_jfreefrag(WK_JFREEFRAG(wk), jseg); + break; + default: + panic("handle_written_jseg: Unknown type %s", + TYPENAME(wk->wk_type)); + /* NOTREACHED */ + } + if (waiting) + wakeup(wk); + } + /* Release the self reference so the structure may be freed. */ + free_jseg(jseg); +} + +/* + * Called once a jremref has made it to stable store. The jremref is marked + * complete and we attempt to free it. Any pagedeps writes sleeping waiting + * for the jremref to complete will be awoken by free_jremref. + */ +static void +handle_written_jremref(jremref, jseg) + struct jremref *jremref; + struct jseg *jseg; +{ + struct jsegdep *jsegdep; + struct dirrem *dirrem; + + /* + * Attach the jsegdep to the jseg. + */ + jsegdep = jremref->jr_jsegdep; + jremref->jr_jsegdep = NULL; + jsegdep->jd_seg = jseg; + + /* + * Complete the dirrem. + */ + dirrem = jremref->jr_dirrem; + jremref->jr_dirrem = NULL; + LIST_REMOVE(jremref, jr_deps); + jsegdep->jd_state |= jremref->jr_state & MKDIR_PARENT; + WORKLIST_INSERT(&dirrem->dm_jwork, &jsegdep->jd_list); + if (LIST_EMPTY(&dirrem->dm_jremrefhd) && + (dirrem->dm_state & COMPLETE) != 0) + add_to_worklist(&dirrem->dm_list); + free_jremref(jremref); +} + +/* + * Called once a jaddref has made it to stable store. The dependency is + * marked complete and any dependent structures are added to the inode + * bufwait list to be completed as soon as it is written. If a bitmap + * write depends on this entry we move the inode into the inodedephd + * of the bmsafemap dependency and attempt to remove the jaddref from + * the bmsafemap. + */ +static void +handle_written_jaddref(jaddref, jseg) + struct jaddref *jaddref; + struct jseg *jseg; +{ + struct jsegdep *jsegdep; + struct inodedep *inodedep; + struct diradd *diradd; + struct mkdir *mkdir; + + /* + * Attach the jsegdep to the jseg. + */ + jsegdep = jaddref->ja_jsegdep; + jaddref->ja_jsegdep = NULL; + jsegdep->jd_seg = jseg; + mkdir = NULL; + diradd = NULL; + if (inodedep_lookup(jaddref->ja_list.wk_mp, jaddref->ja_ino, + 0, &inodedep) == 0) + panic("handle_written_jaddref: Lost inodedep."); + if (jaddref->ja_diradd == NULL) + panic("handle_written_jaddref: No dependency"); + if (jaddref->ja_diradd->da_list.wk_type == D_DIRADD) { + diradd = jaddref->ja_diradd; + WORKLIST_INSERT(&inodedep->id_bufwait, &diradd->da_list); + } else if (jaddref->ja_state & MKDIR_PARENT) { + mkdir = jaddref->ja_mkdir; + WORKLIST_INSERT(&inodedep->id_bufwait, &mkdir->md_list); + } else if (jaddref->ja_state & MKDIR_BODY) + mkdir = jaddref->ja_mkdir; + else + panic("handle_written_jaddref: Unknown dependency %p", + jaddref->ja_diradd); + jaddref->ja_diradd = NULL; /* also clears ja_mkdir */ + /* + * The mkdir may be waiting on the jaddref to clear before freeing. + */ + if (mkdir) { + KASSERT(mkdir->md_list.wk_type == D_MKDIR, + ("handle_written_jaddref: Incorrect type for mkdir %s", + TYPENAME(mkdir->md_list.wk_type))); + mkdir->md_jaddref = NULL; + diradd = mkdir->md_diradd; + mkdir->md_state |= DEPCOMPLETE; + complete_mkdir(mkdir); + } + WORKLIST_INSERT(&diradd->da_jwork, &jsegdep->jd_list); + if (jaddref->ja_state & NEWBLOCK) { + LIST_REMOVE(jaddref, ja_inodeps); + jaddref->ja_state &= ~ONDEPLIST; + inodedep->id_state |= ONDEPLIST; + LIST_INSERT_HEAD(&inodedep->id_bmsafemap->sm_inodedephd, + inodedep, id_deps); + } + free_jaddref(jaddref); +} + +/* + * Called once a jnewblk journal is written. The allocdirect or allocindir + * is placed in the bmsafemap to await notification of a written bitmap. + */ +static void +handle_written_jnewblk(jnewblk, jseg) + struct jnewblk *jnewblk; + struct jseg *jseg; +{ + struct bmsafemap *bmsafemap; + struct jsegdep *jsegdep; + struct newblk *newblk; + + /* + * Attach the jsegdep to the jseg. + */ + jsegdep = jnewblk->jn_jsegdep; + jnewblk->jn_jsegdep = NULL; + jsegdep->jd_seg = jseg; + /* + * Add the written block to the bmsafemap so it can be notified when + * the bitmap is on disk. + */ + newblk = jnewblk->jn_newblk; + jnewblk->jn_newblk = NULL; + if (newblk == NULL) + panic("handle_written_jnewblk: No dependency for the segdep."); + + newblk->nb_jnewblk = NULL; + bmsafemap = newblk->nb_bmsafemap; + WORKLIST_INSERT(&newblk->nb_jwork, &jsegdep->jd_list); + newblk->nb_state |= ONDEPLIST; + LIST_INSERT_HEAD(&bmsafemap->sm_newblkhd, newblk, nb_deps); + free_jnewblk(jnewblk); +} + +static void +cancel_jfreefrag(jfreefrag) + struct jfreefrag *jfreefrag; +{ + struct freefrag *freefrag; + + if (jfreefrag->fr_jsegdep) { + free_jsegdep(jfreefrag->fr_jsegdep); + jfreefrag->fr_jsegdep = NULL; + } + freefrag = jfreefrag->fr_freefrag; + jfreefrag->fr_freefrag = NULL; + freefrag->ff_jfreefrag = NULL; + free_jfreefrag(jfreefrag); + freefrag->ff_state |= DEPCOMPLETE; +} + +/* + * Free a jfreefrag when the parent freefrag is rendered obsolete. + */ +static void +free_jfreefrag(jfreefrag) + struct jfreefrag *jfreefrag; +{ + + if (jfreefrag->fr_state & IOSTARTED) + WORKLIST_REMOVE(&jfreefrag->fr_list); + else if (jfreefrag->fr_state & ONWORKLIST) + remove_from_journal(&jfreefrag->fr_list); + if (jfreefrag->fr_freefrag != NULL) + panic("free_jfreefrag: Still attached to a freefrag."); + WORKITEM_FREE(jfreefrag, D_JFREEFRAG); +} + +/* + * Called when the journal write for a jfreefrag completes. The parent + * freefrag is added to the worklist if this completes its dependencies. + */ +static void +handle_written_jfreefrag(jfreefrag, jseg) + struct jfreefrag *jfreefrag; + struct jseg *jseg; +{ + struct jsegdep *jsegdep; + struct freefrag *freefrag; + + /* + * Attach the jsegdep to the jseg. + */ + jsegdep = jfreefrag->fr_jsegdep; + jfreefrag->fr_jsegdep = NULL; + jsegdep->jd_seg = jseg; + freefrag = jfreefrag->fr_freefrag; + if (freefrag == NULL) + panic("handle_written_jfreefrag: No freefrag."); + freefrag->ff_state |= DEPCOMPLETE; + freefrag->ff_jfreefrag = NULL; + WORKLIST_INSERT(&freefrag->ff_jwork, &jsegdep->jd_list); + if ((freefrag->ff_state & ALLCOMPLETE) == ALLCOMPLETE) + add_to_worklist(&freefrag->ff_list); + jfreefrag->fr_freefrag = NULL; + free_jfreefrag(jfreefrag); +} + +/* + * Called when the journal write for a jfreeblk completes. The jfreeblk + * is removed from the freeblks list of pending journal writes and the + * jsegdep is moved to the freeblks jwork to be completed when all blocks + * have been reclaimed. + */ +static void +handle_written_jfreeblk(jfreeblk, jseg) + struct jfreeblk *jfreeblk; + struct jseg *jseg; +{ + struct freeblks *freeblks; + struct jsegdep *jsegdep; + + /* Attach the jsegdep to the jseg. */ + jsegdep = jfreeblk->jf_jsegdep; + jfreeblk->jf_jsegdep = NULL; + jsegdep->jd_seg = jseg; + freeblks = jfreeblk->jf_freeblks; + LIST_REMOVE(jfreeblk, jf_deps); + WORKLIST_INSERT(&freeblks->fb_jwork, &jsegdep->jd_list); + /* + * If the freeblks is all journaled, we can add it to the worklist. + */ + if (LIST_EMPTY(&freeblks->fb_jfreeblkhd) && + (freeblks->fb_state & ALLCOMPLETE) == ALLCOMPLETE) { + /* Remove from the b_dep that is waiting on this write. */ + if (freeblks->fb_state & ONWORKLIST) + WORKLIST_REMOVE(&freeblks->fb_list); + add_to_worklist(&freeblks->fb_list); + } + + free_jfreeblk(jfreeblk); +} + +static struct jsegdep * +newjsegdep(struct worklist *wk) +{ + struct jsegdep *jsegdep; + + jsegdep = malloc(sizeof(*jsegdep), M_JSEGDEP, M_SOFTDEP_FLAGS); + workitem_alloc(&jsegdep->jd_list, D_JSEGDEP, wk->wk_mp); + jsegdep->jd_seg = NULL; + + return (jsegdep); +} + +static struct jmvref * +newjmvref(dp, ino, oldoff, newoff) + struct inode *dp; + ino_t ino; + off_t oldoff; + off_t newoff; +{ + struct jmvref *jmvref; + + jmvref = malloc(sizeof(*jmvref), M_JMVREF, M_SOFTDEP_FLAGS); + workitem_alloc(&jmvref->jm_list, D_JMVREF, UFSTOVFS(dp->i_ump)); + jmvref->jm_list.wk_state = ATTACHED | DEPCOMPLETE; + jmvref->jm_parent = dp->i_number; + jmvref->jm_ino = ino; + jmvref->jm_oldoff = oldoff; + jmvref->jm_newoff = newoff; + + return (jmvref); +} + +/* + * Allocate a new jremref that tracks the removal of ip from dp with the + * directory entry offset of diroff. Mark the entry as ATTACHED and + * DEPCOMPLETE as we have all the information required for the journal write + * and the directory has already been removed from the buffer. The caller + * is responsible for linking the jremref into the pagedep and adding it + * to the journal to write. The MKDIR_PARENT flag is set if we're doing + * a DOTDOT addition so handle_workitem_remove() can properly assign + * the jsegdep when we're done. + */ +static struct jremref * +newjremref(dirrem, dp, ip, diroff) + struct dirrem *dirrem; + struct inode *dp; + struct inode *ip; + off_t diroff; +{ + struct jremref *jremref; + + jremref = malloc(sizeof(*jremref), M_JREMREF, M_SOFTDEP_FLAGS); + workitem_alloc(&jremref->jr_list, D_JREMREF, UFSTOVFS(dp->i_ump)); + jremref->jr_jsegdep = newjsegdep(&jremref->jr_list); + jremref->jr_state = ATTACHED | DEPCOMPLETE; + jremref->jr_dirrem = dirrem; + jremref->jr_diroff = diroff; + jremref->jr_ino = ip->i_number; + jremref->jr_parent = dp->i_number; + jremref->jr_mode = ip->i_mode; + jremref->jr_nlink = ip->i_nlink; + + return (jremref); +} + +/* + * Allocate a new jaddref to track the addition of ino to dp at diroff. The + * directory offset may not be known until later. The caller is responsible + * adding the entry to the journal when this information is available. nlink + * should be the link count prior to the addition and mode is only required + * to have the correct FMT. + */ +static struct jaddref * +newjaddref(dp, ino, diroff, nlink, mode) + struct inode *dp; + ino_t ino; + off_t diroff; + int16_t nlink; + uint16_t mode; +{ + struct jaddref *jaddref; + + jaddref = malloc(sizeof(*jaddref), M_JADDREF, M_SOFTDEP_FLAGS); + workitem_alloc(&jaddref->ja_list, D_JADDREF, UFSTOVFS(dp->i_ump)); + jaddref->ja_jsegdep = newjsegdep(&jaddref->ja_list); + jaddref->ja_mkdir = NULL; + jaddref->ja_state = ATTACHED | DEPCOMPLETE | ONDEPLIST; + jaddref->ja_diroff = diroff; + jaddref->ja_ino = ino; + jaddref->ja_parent = dp->i_number; + jaddref->ja_mode = mode; + jaddref->ja_nlink = nlink; + + return (jaddref); +} + +/* + * Create a new free dependency for a freework. The caller is responsible + * for adjusting the reference count when it has the lock held. The freedep + * will track an outstanding bitmap write that will ultimately clear the + * freework to continue. + */ +static struct freedep * +newfreedep(struct freework *freework) +{ + struct freedep *freedep; + + freedep = malloc(sizeof(*freedep), M_FREEDEP, M_SOFTDEP_FLAGS); + workitem_alloc(&freedep->fd_list, D_FREEDEP, freework->fw_list.wk_mp); + freedep->fd_freework = freework; + + return (freedep); +} + +/* + * Free a freedep structure once the buffer it is linked to is written. If + * this is the last reference to the freework schedule it for completion. + */ +static void +free_freedep(freedep) + struct freedep *freedep; +{ + + if (--freedep->fd_freework->fw_ref == 0) + add_to_worklist(&freedep->fd_freework->fw_list); + WORKITEM_FREE(freedep, D_FREEDEP); +} + +/* + * Allocate a new freework structure that may be a level in an indirect + * when parent is not NULL or a top level block when it is. The top level + * freework structures are allocated without lk held and before the freeblks + * is visible outside of softdep_setup_freeblocks(). + */ +static struct freework * +newfreework(freeblks, parent, lbn, nb, frags, journal) + struct freeblks *freeblks; + struct freework *parent; + ufs_lbn_t lbn; + ufs2_daddr_t nb; + int frags; + int journal; +{ + struct freework *freework; + + freework = malloc(sizeof(*freework), M_FREEWORK, M_SOFTDEP_FLAGS); + workitem_alloc(&freework->fw_list, D_FREEWORK, freeblks->fb_list.wk_mp); + freework->fw_freeblks = freeblks; + freework->fw_parent = parent; + freework->fw_lbn = lbn; + freework->fw_blkno = nb; + freework->fw_frags = frags; + freework->fw_ref = 0; + freework->fw_off = 0; + LIST_INIT(&freework->fw_jwork); + + if (parent == NULL) { + WORKLIST_INSERT_UNLOCKED(&freeblks->fb_freeworkhd, + &freework->fw_list); + freeblks->fb_ref++; + } + if (journal) + newjfreeblk(freeblks, lbn, nb, frags); + + return (freework); +} + +/* + * Allocate a new jfreeblk to journal top level block pointer when truncating + * a file. The caller must add this to the worklist when lk is held. + */ +static struct jfreeblk * +newjfreeblk(freeblks, lbn, blkno, frags) + struct freeblks *freeblks; + ufs_lbn_t lbn; + ufs2_daddr_t blkno; + int frags; +{ + struct jfreeblk *jfreeblk; + + jfreeblk = malloc(sizeof(*jfreeblk), M_JFREEBLK, M_SOFTDEP_FLAGS); + workitem_alloc(&jfreeblk->jf_list, D_JFREEBLK, freeblks->fb_list.wk_mp); + jfreeblk->jf_jsegdep = newjsegdep(&jfreeblk->jf_list); + jfreeblk->jf_state = ATTACHED | DEPCOMPLETE; + jfreeblk->jf_ino = freeblks->fb_previousinum; + jfreeblk->jf_lbn = lbn; + jfreeblk->jf_blkno = blkno; + jfreeblk->jf_frags = frags; + jfreeblk->jf_freeblks = freeblks; + LIST_INSERT_HEAD(&freeblks->fb_jfreeblkhd, jfreeblk, jf_deps); + + return (jfreeblk); +} + +/* + * Cancel a jaddref either before it has been written or while it is being + * written. This happens when a link is removed before the add reaches + * the disk. The jaddref dependency is kept linked into the bmsafemap + * and inode to prevent the link count or bitmap from reaching the disk + * until handle_workitem_remove() re-adjusts the counts and bitmaps as + * required. + */ +static void +cancel_jaddref(jaddref, inodedep, wkhd) + struct jaddref *jaddref; + struct inodedep *inodedep; + struct workhead *wkhd; +{ + struct jaddref *jaddrefn; + + if (jaddref->ja_jsegdep) { + free_jsegdep(jaddref->ja_jsegdep); + jaddref->ja_jsegdep = NULL; + } + /* + * If we're canceling a new bitmap we have to search for another ref + * to move into the bmsafemap dep. This might be better expressed + * with another structure. + */ + if (jaddref->ja_state & NEWBLOCK && inodedep != NULL) { + LIST_FOREACH(jaddrefn, &inodedep->id_jaddrefhd, ja_inodeps) { + if (jaddrefn == jaddref) + continue; + if ((jaddrefn->ja_state & GOINGAWAY) != 0) + continue; + jaddrefn->ja_state &= ~(ATTACHED | UNDONE); + jaddrefn->ja_state |= + jaddref->ja_state & (ATTACHED | UNDONE | NEWBLOCK); + jaddref->ja_state &= ~(ATTACHED | UNDONE | NEWBLOCK); + jaddref->ja_state |= ATTACHED; + LIST_REMOVE(jaddref, ja_bmdeps); + LIST_INSERT_HEAD(&inodedep->id_bmsafemap->sm_jaddrefhd, + jaddrefn, ja_bmdeps); + } + } + if (jaddref->ja_state & IOWAITING) { + jaddref->ja_state &= ~IOWAITING; + wakeup(&jaddref->ja_list); + } + jaddref->ja_state |= GOINGAWAY; + jaddref->ja_mkdir = NULL; + if (jaddref->ja_state & IOSTARTED) { + jaddref->ja_state &= ~IOSTARTED; + WORKLIST_REMOVE(&jaddref->ja_list); + } else + remove_from_journal(&jaddref->ja_list); + if (wkhd == NULL) + return; + /* + * Leave the head of the list for jsegdeps for fast merging. + */ + if (LIST_FIRST(wkhd) != NULL) { + jaddref->ja_state |= ONWORKLIST; + LIST_INSERT_AFTER(LIST_FIRST(wkhd), &jaddref->ja_list, wk_list); + } else + WORKLIST_INSERT(wkhd, &jaddref->ja_list); +} + +/* + * Attempt to free a jaddref structure when some work completes. This + * should only succeed once the entry is written and all dependencies have + * been notified. + */ +static void +free_jaddref(jaddref) + struct jaddref *jaddref; +{ + + if ((jaddref->ja_state & ALLCOMPLETE) != ALLCOMPLETE) + return; + if (jaddref->ja_state & NEWBLOCK) + LIST_REMOVE(jaddref, ja_bmdeps); + if (jaddref->ja_state & ONDEPLIST) + LIST_REMOVE(jaddref, ja_inodeps); + if (jaddref->ja_state & (IOSTARTED | ONWORKLIST)) + panic("free_jaddref: Bad state %p(0x%X)", + jaddref, jaddref->ja_state); + if (jaddref->ja_mkdir != NULL) + panic("free_jaddref: Work pending, 0x%X\n", jaddref->ja_state); + WORKITEM_FREE(jaddref, D_JADDREF); +} + +/* + * Free a jremref structure once it has been written or discarded. + */ +static void +free_jremref(jremref) + struct jremref *jremref; +{ + + if (jremref->jr_jsegdep) { + free_jsegdep(jremref->jr_jsegdep); + jremref->jr_jsegdep = NULL; + } + /* If we were never written remove ourselves from the worklist. */ + if (jremref->jr_state & IOSTARTED) + panic("free_jremref: IO still pending"); + WORKITEM_FREE(jremref, D_JREMREF); +} + +/* + * Free a jnewblk structure. + */ +static void +free_jnewblk(jnewblk) + struct jnewblk *jnewblk; +{ + + if ((jnewblk->jn_state & ALLCOMPLETE) != ALLCOMPLETE) + return; + LIST_REMOVE(jnewblk, jn_deps); + if (jnewblk->jn_newblk != NULL) + panic("free_jnewblk: Dependency still attached."); + WORKITEM_FREE(jnewblk, D_JNEWBLK); +} + +/* + * Cancel a jnewblk which has been superseded by a freeblk. The jnewblk + * is kept linked into the bmsafemap until the free completes, thus + * preventing the modified state from ever reaching disk. The free + * routine must pass this structure via ffs_blkfree() to + * softdep_setup_freeblks() so there is no race in releasing the space. + */ +static void +cancel_jnewblk(jnewblk, wkhd) + struct jnewblk *jnewblk; + struct workhead *wkhd; +{ + + if (jnewblk->jn_jsegdep) { + free_jsegdep(jnewblk->jn_jsegdep); + jnewblk->jn_jsegdep = NULL; + } + if (jnewblk->jn_state & IOWAITING) { + jnewblk->jn_state &= ~IOWAITING; + wakeup(&jnewblk->jn_list); + } + jnewblk->jn_newblk = NULL; + jnewblk->jn_state |= GOINGAWAY; + if (jnewblk->jn_state & IOSTARTED) { + jnewblk->jn_state &= ~IOSTARTED; + WORKLIST_REMOVE(&jnewblk->jn_list); + } else + remove_from_journal(&jnewblk->jn_list); + /* + * Leave the head of the list for jsegdeps for fast merging. + */ + if (LIST_FIRST(wkhd) != NULL) { + jnewblk->jn_state |= ONWORKLIST; + LIST_INSERT_AFTER(LIST_FIRST(wkhd), &jnewblk->jn_list, wk_list); + } else + WORKLIST_INSERT(wkhd, &jnewblk->jn_list); +} + +static void +free_jfreeblk(jfreeblk) + struct jfreeblk *jfreeblk; +{ + + WORKITEM_FREE(jfreeblk, D_JFREEBLK); +} + +/* + * Release one reference to a jseg and free it if the count reaches 0. This + * should eventually reclaim journal space as well. + */ +static void +free_jseg(jseg) + struct jseg *jseg; +{ + struct jblocks *jblocks; + + KASSERT(jseg->js_refs > 0, + ("free_jseg: Invalid refcnt %d", jseg->js_refs)); + if (--jseg->js_refs != 0) + return; + /* + * Free only those jsegs which have none allocated before them to + * preserve the journal space ordering. + */ + jblocks = jseg->js_jblocks; + while ((jseg = TAILQ_FIRST(&jblocks->jb_segs)) != NULL) { + jblocks->jb_oldestseq = jseg->js_seq; + if (jseg->js_refs != 0) + break; + TAILQ_REMOVE(&jblocks->jb_segs, jseg, js_next); + jblocks_free(jblocks, jseg->js_size); + KASSERT(LIST_EMPTY(&jseg->js_entries), + ("free_jseg: Freed jseg has valid entries.")); + WORKITEM_FREE(jseg, D_JSEG); + } +} + +/* + * Release a jsegdep and decrement the jseg count. + */ +static void +free_jsegdep(jsegdep) + struct jsegdep *jsegdep; +{ + + if (jsegdep->jd_seg) + free_jseg(jsegdep->jd_seg); + WORKITEM_FREE(jsegdep, D_JSEGDEP); +} + +/* + * Wait for a journal item to make it to disk. Initiate journal processing + * if required. + */ +static void +jwait(wk) + struct worklist *wk; +{ + + /* + * If IO has not started we process the journal. We can't mark the + * worklist item as IOWAITING because we drop the lock while + * processing the journal and the worklist entry may be freed after + * this point. The caller may call back in and re-issue the request. + */ + if ((wk->wk_state & IOSTARTED) == 0) { + softdep_process_journal(wk->wk_mp, MNT_WAIT); + return; + } + wk->wk_state |= IOWAITING; + msleep(wk, &lk, PRIBIO, "jwait", 0); +} + +/* + * Lookup an inodedep based on an inode pointer and set the nlinkdelta as + * appropriate. This is a convenience function to reduce duplicate code + * for the setup and revert functions below. + */ +static struct inodedep * +inodedep_lookup_ip(ip) + struct inode *ip; +{ + struct inodedep *inodedep; + + KASSERT(ip->i_nlink >= ip->i_effnlink, + ("inodedep_lookup_ip: bad delta")); + (void) inodedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, + DEPALLOC, &inodedep); + inodedep->id_nlinkdelta = ip->i_nlink - ip->i_effnlink; + + return (inodedep); +} + +/* + * Called prior to creating a new inode and linking it to a directory. The + * jaddref structure must already be allocated by softdep_setup_inomapdep + * and it is discovered here so we can initialize the mode and update + * nlinkdelta. + */ +void +softdep_setup_create(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + KASSERT(ip->i_nlink == 1, + ("softdep_setup_create: Invalid link count.")); + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(ip); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref != NULL && + jaddref->ja_parent == dp->i_number && jaddref->ja_nlink == 0, + ("softdep_setup_create: No addref structure present.")); + jaddref->ja_mode = ip->i_mode; + FREE_LOCK(&lk); +} + +/* + * Create a jaddref structure to track the addition of a DOTDOT link when + * we are reparenting an inode as part of a rename. This jaddref will be + * found by softdep_setup_directory_change. + */ +void +softdep_setup_dotdot_link(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + /* + * We don't set MKDIR_PARENT as this is not tied to a mkdir and + * is used as a normal link would be. + */ + jaddref = newjaddref(ip, dp->i_number, DOTDOT_OFFSET, dp->i_nlink - 1, + dp->i_mode); + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(dp); + LIST_INSERT_HEAD(&inodedep->id_jaddrefhd, jaddref, ja_inodeps); + FREE_LOCK(&lk); +} + +/* + * Create a jaddref structure to track a new link to an inode. The directory + * offset is not known until softdep_setup_directory_add or + * softdep_setup_directory_change. + */ +void +softdep_setup_link(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + jaddref = newjaddref(dp, ip->i_number, 0, ip->i_nlink - 1, ip->i_mode); + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(ip); + LIST_INSERT_HEAD(&inodedep->id_jaddrefhd, jaddref, ja_inodeps); + FREE_LOCK(&lk); +} + +/* + * Called to create the jaddref structures to track . and .. references as + * well as lookup and further initialize the incomplete jaddref created + * by softdep_setup_inomapdep when the inode was allocated.A + */ +void +softdep_setup_mkdir(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *dotdotaddref; + struct jaddref *dotaddref; + struct jaddref *jaddref; + + dotaddref = newjaddref(ip, ip->i_number, DOT_OFFSET, 1, ip->i_mode); + dotaddref->ja_state |= MKDIR_BODY; + dotdotaddref = newjaddref(ip, dp->i_number, DOTDOT_OFFSET, + dp->i_nlink - 1, dp->i_mode); + dotdotaddref->ja_state |= MKDIR_PARENT; + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(ip); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref != NULL, + ("softdep_setup_mkdir: No addref structure present.")); + KASSERT(jaddref->ja_parent == dp->i_number && jaddref->ja_nlink == 0, + ("softdep_setup_mkdir: bad parent/link %d/%d", + jaddref->ja_parent, jaddref->ja_nlink)); + jaddref->ja_mode = ip->i_mode; + LIST_INSERT_AFTER(jaddref, dotaddref, ja_inodeps); + inodedep = inodedep_lookup_ip(dp); + LIST_INSERT_HEAD(&inodedep->id_jaddrefhd, dotdotaddref, ja_inodeps); + FREE_LOCK(&lk); +} + +/* + * Called to track nlinkdelta of the inode and parent directories prior to + * unlinking a directory. + */ +void +softdep_setup_rmdir(dp, ip) + struct inode *dp; + struct inode *ip; +{ + + ACQUIRE_LOCK(&lk); + (void) inodedep_lookup_ip(ip); + (void) inodedep_lookup_ip(dp); + FREE_LOCK(&lk); +} + +/* + * Called to track nlinkdelta of the inode and parent directories prior to + * unlink. + */ +void +softdep_setup_unlink(dp, ip) + struct inode *dp; + struct inode *ip; +{ + + ACQUIRE_LOCK(&lk); + (void) inodedep_lookup_ip(ip); + (void) inodedep_lookup_ip(dp); + FREE_LOCK(&lk); +} + +/* + * Called to release the journal structures created by a failed non-directory + * creation. + */ +void +softdep_revert_create(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(ip); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == dp->i_number, + ("softdep_revert_create: addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + FREE_LOCK(&lk); +} + +/* + * Called to release the journal structures created by a failed dotdot link + * creation. + */ +void +softdep_revert_dotdot_link(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(dp); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == ip->i_number, + ("softdep_revert_dotdot_link: addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + FREE_LOCK(&lk); +} + +/* + * Called to release the journal structures created by a failed link + * addition. + */ +void +softdep_revert_link(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(ip); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == dp->i_number, + ("softdep_revert_link: addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + FREE_LOCK(&lk); +} + +/* + * Called to release the journal structures created by a failed mkdir + * attempt. + */ +void +softdep_revert_mkdir(dp, ip) + struct inode *dp; + struct inode *ip; +{ + struct inodedep *inodedep; + struct jaddref *jaddref; + + ACQUIRE_LOCK(&lk); + inodedep = inodedep_lookup_ip(dp); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == ip->i_number, + ("softdep_revert_mkdir: dotdot addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + inodedep = inodedep_lookup_ip(ip); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == dp->i_number, + ("softdep_revert_mkdir: addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref->ja_parent == ip->i_number, + ("softdep_revert_mkdir: dot addref parent mismatch")); + cancel_jaddref(jaddref, inodedep, &inodedep->id_inowait); + FREE_LOCK(&lk); +} + +/* + * Called to correct nlinkdelta after a failed rmdir. + */ +void +softdep_revert_rmdir(dp, ip) + struct inode *dp; + struct inode *ip; +{ + + ACQUIRE_LOCK(&lk); + (void) inodedep_lookup_ip(ip); + (void) inodedep_lookup_ip(dp); + FREE_LOCK(&lk); +} + +/* * Protecting the freemaps (or bitmaps). * * To eliminate the need to execute fsck before mounting a filesystem @@ -1536,8 +3321,16 @@ softdep_setup_inomapdep(bp, ip, newinum) { struct inodedep *inodedep; struct bmsafemap *bmsafemap; + struct jaddref *jaddref; /* + * Allocate the journal reference add structure so that the bitmap + * can be dependent on it. + */ + jaddref = newjaddref(ip, newinum, 0, 0, 0); + jaddref->ja_state |= NEWBLOCK; + + /* * Create a dependency for the newly allocated inode. * Panic if it already exists as something is seriously wrong. * Otherwise add it to the dependency list for the buffer holding @@ -1546,12 +3339,14 @@ softdep_setup_inomapdep(bp, ip, newinum) ACQUIRE_LOCK(&lk); if ((inodedep_lookup(UFSTOVFS(ip->i_ump), newinum, DEPALLOC|NODELAY, &inodedep))) - panic("softdep_setup_inomapdep: dependency for new inode " - "already exists"); - inodedep->id_buf = bp; + panic("softdep_setup_inomapdep: dependency %p for new" + "inode already exists", inodedep); + bmsafemap = bmsafemap_lookup(UFSTOVFS(ip->i_ump), bp, + ino_to_cg(ip->i_ump->um_fs, newinum)); + LIST_INSERT_HEAD(&bmsafemap->sm_jaddrefhd, jaddref, ja_bmdeps); + inodedep->id_bmsafemap = bmsafemap; inodedep->id_state &= ~DEPCOMPLETE; - bmsafemap = bmsafemap_lookup(inodedep->id_list.wk_mp, bp); - LIST_INSERT_HEAD(&bmsafemap->sm_inodedephd, inodedep, id_deps); + LIST_INSERT_HEAD(&inodedep->id_jaddrefhd, jaddref, ja_inodeps); FREE_LOCK(&lk); } @@ -1560,13 +3355,16 @@ softdep_setup_inomapdep(bp, ip, newinum) * allocate block or fragment. */ void -softdep_setup_blkmapdep(bp, mp, newblkno) +softdep_setup_blkmapdep(bp, mp, newblkno, frags, oldfrags) struct buf *bp; /* buffer for cylgroup block with block map */ struct mount *mp; /* filesystem doing allocation */ ufs2_daddr_t newblkno; /* number of newly allocated block */ + int frags; /* Number of fragments. */ + int oldfrags; /* Previous number of fragments for extend. */ { struct newblk *newblk; struct bmsafemap *bmsafemap; + struct jnewblk *jnewblk; struct fs *fs; fs = VFSTOUFS(mp)->um_fs; @@ -1575,14 +3373,71 @@ void * Add it to the dependency list for the buffer holding * the cylinder group map from which it was allocated. */ + jnewblk = malloc(sizeof(*jnewblk), M_JNEWBLK, M_SOFTDEP_FLAGS); + workitem_alloc(&jnewblk->jn_list, D_JNEWBLK, mp); + jnewblk->jn_jsegdep = newjsegdep(&jnewblk->jn_list); + jnewblk->jn_state = ATTACHED; + jnewblk->jn_blkno = newblkno; + jnewblk->jn_frags = frags; + jnewblk->jn_oldfrags = oldfrags; +#ifdef DEBUG + { + struct cg *cgp; + uint8_t *blksfree; + long bno; + int i; + + cgp = (struct cg *)bp->b_data; + blksfree = cg_blksfree(cgp); + bno = dtogd(fs, jnewblk->jn_blkno); + for (i = jnewblk->jn_oldfrags; i < jnewblk->jn_frags; i++) { + if (isset(blksfree, bno + i)) + panic("softdep_setup_blkmapdep: " + "free fragment %d from %d-%d " + "state 0x%X dep %p", i, + jnewblk->jn_oldfrags, + jnewblk->jn_frags, + jnewblk->jn_state, + jnewblk->jn_newblk); + } + } +#endif ACQUIRE_LOCK(&lk); - if (newblk_lookup(fs, newblkno, DEPALLOC, &newblk) != 0) + if (newblk_lookup(mp, newblkno, DEPALLOC, &newblk) != 0) panic("softdep_setup_blkmapdep: found block"); - newblk->nb_bmsafemap = bmsafemap = bmsafemap_lookup(mp, bp); - LIST_INSERT_HEAD(&bmsafemap->sm_newblkhd, newblk, nb_deps); + newblk->nb_bmsafemap = bmsafemap = bmsafemap_lookup(mp, bp, + dtog(fs, newblkno)); + jnewblk->jn_newblk = newblk; + newblk->nb_bmsafemap = bmsafemap; + newblk->nb_jnewblk = jnewblk; + LIST_INSERT_HEAD(&bmsafemap->sm_jnewblkhd, jnewblk, jn_deps); FREE_LOCK(&lk); } +#define BMSAFEMAP_HASH(fs, cg) \ + (&bmsafemap_hashtbl[((((register_t)(fs)) >> 13) + (cg)) & bmsafemap_hash]) + +static int +bmsafemap_find(bmsafemaphd, mp, cg, bmsafemapp) + struct bmsafemap_hashhead *bmsafemaphd; + struct mount *mp; + int cg; + struct bmsafemap **bmsafemapp; +{ + struct bmsafemap *bmsafemap; + + LIST_FOREACH(bmsafemap, bmsafemaphd, sm_hash) + if (bmsafemap->sm_list.wk_mp == mp && bmsafemap->sm_cg == cg) + break; + if (bmsafemap) { + *bmsafemapp = bmsafemap; + return (1); + } + *bmsafemapp = NULL; + + return (0); +} + /* * Find the bmsafemap associated with a cylinder group buffer. * If none exists, create one. The buffer must be locked when @@ -1590,27 +3445,43 @@ void * splbio interrupts blocked. */ static struct bmsafemap * -bmsafemap_lookup(mp, bp) +bmsafemap_lookup(mp, bp, cg) struct mount *mp; struct buf *bp; + int cg; { - struct bmsafemap *bmsafemap; + struct bmsafemap_hashhead *bmsafemaphd; + struct bmsafemap *bmsafemap, *collision; struct worklist *wk; + struct fs *fs; mtx_assert(&lk, MA_OWNED); - LIST_FOREACH(wk, &bp->b_dep, wk_list) - if (wk->wk_type == D_BMSAFEMAP) - return (WK_BMSAFEMAP(wk)); + if (bp) + LIST_FOREACH(wk, &bp->b_dep, wk_list) + if (wk->wk_type == D_BMSAFEMAP) + return (WK_BMSAFEMAP(wk)); + fs = VFSTOUFS(mp)->um_fs; + bmsafemaphd = BMSAFEMAP_HASH(fs, cg); + if (bmsafemap_find(bmsafemaphd, mp, cg, &bmsafemap) == 1) + return (bmsafemap); FREE_LOCK(&lk); bmsafemap = malloc(sizeof(struct bmsafemap), M_BMSAFEMAP, M_SOFTDEP_FLAGS); workitem_alloc(&bmsafemap->sm_list, D_BMSAFEMAP, mp); bmsafemap->sm_buf = bp; - LIST_INIT(&bmsafemap->sm_allocdirecthd); - LIST_INIT(&bmsafemap->sm_allocindirhd); LIST_INIT(&bmsafemap->sm_inodedephd); + LIST_INIT(&bmsafemap->sm_inodedepwr); LIST_INIT(&bmsafemap->sm_newblkhd); + LIST_INIT(&bmsafemap->sm_newblkwr); + LIST_INIT(&bmsafemap->sm_jaddrefhd); + LIST_INIT(&bmsafemap->sm_jnewblkhd); ACQUIRE_LOCK(&lk); + if (bmsafemap_find(bmsafemaphd, mp, cg, &collision) == 1) { + WORKITEM_FREE(bmsafemap, D_BMSAFEMAP); + return (collision); + } + bmsafemap->sm_cg = cg; + LIST_INSERT_HEAD(bmsafemaphd, bmsafemap, sm_hash); WORKLIST_INSERT(&bp->b_dep, &bmsafemap->sm_list); return (bmsafemap); } @@ -1645,8 +3516,10 @@ static struct bmsafemap * * unreferenced fragments. */ void -softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp) +softdep_setup_allocdirect(ip, off, lbn, newblkno, oldblkno, newsize, oldsize, + bp) struct inode *ip; /* inode to which block is being added */ + int off; /* Offset from start of di_db. */ ufs_lbn_t lbn; /* block pointer within inode */ ufs2_daddr_t newblkno; /* disk block number being added */ ufs2_daddr_t oldblkno; /* previous block number, 0 unless frag */ @@ -1656,30 +3529,21 @@ void { struct allocdirect *adp, *oldadp; struct allocdirectlst *adphead; - struct bmsafemap *bmsafemap; + struct freefrag *freefrag; struct inodedep *inodedep; struct pagedep *pagedep; + struct jnewblk *jnewblk; struct newblk *newblk; struct mount *mp; mp = UFSTOVFS(ip->i_ump); - adp = malloc(sizeof(struct allocdirect), - M_ALLOCDIRECT, M_SOFTDEP_FLAGS|M_ZERO); - workitem_alloc(&adp->ad_list, D_ALLOCDIRECT, mp); - adp->ad_lbn = lbn; - adp->ad_newblkno = newblkno; - adp->ad_oldblkno = oldblkno; - adp->ad_newsize = newsize; - adp->ad_oldsize = oldsize; - adp->ad_state = ATTACHED; - LIST_INIT(&adp->ad_newdirblk); - if (newblkno == oldblkno) - adp->ad_freefrag = NULL; + if (oldblkno && oldblkno != newblkno) + freefrag = newfreefrag(ip, oldblkno, oldsize, lbn); else - adp->ad_freefrag = newfreefrag(ip, oldblkno, oldsize); + freefrag = NULL; ACQUIRE_LOCK(&lk); - if (lbn >= NDADDR) { + if (off >= NDADDR) { /* allocating an indirect block */ if (oldblkno != 0) panic("softdep_setup_allocdirect: non-zero indir"); @@ -1692,26 +3556,38 @@ void * deletions. */ if ((ip->i_mode & IFMT) == IFDIR && - pagedep_lookup(ip, lbn, DEPALLOC, &pagedep) == 0) + pagedep_lookup(mp, ip->i_number, off, DEPALLOC, + &pagedep) == 0) WORKLIST_INSERT(&bp->b_dep, &pagedep->pd_list); } - if (newblk_lookup(ip->i_fs, newblkno, 0, &newblk) == 0) + if (newblk_lookup(mp, newblkno, 0, &newblk) == 0) panic("softdep_setup_allocdirect: lost block"); - if (newblk->nb_state == DEPCOMPLETE) { - adp->ad_state |= DEPCOMPLETE; - adp->ad_buf = NULL; - } else { - bmsafemap = newblk->nb_bmsafemap; - adp->ad_buf = bmsafemap->sm_buf; - LIST_REMOVE(newblk, nb_deps); - LIST_INSERT_HEAD(&bmsafemap->sm_allocdirecthd, adp, ad_deps); + /* + * Convert the newblk to an allocdirect. + */ + newblk->nb_list.wk_type = D_ALLOCDIRECT; + newblk->nb_freefrag = freefrag; + adp = (struct allocdirect *)newblk; + adp->ad_offset = off; + adp->ad_oldblkno = oldblkno; + adp->ad_newsize = newsize; + adp->ad_oldsize = oldsize; + + /* + * Finish initializing the journal. + */ + if ((jnewblk = newblk->nb_jnewblk) != NULL) { + jnewblk->jn_ino = ip->i_number; + jnewblk->jn_lbn = lbn; + jnewblk->jn_state |= DEPCOMPLETE; + add_to_journal(&jnewblk->jn_list); } - LIST_REMOVE(newblk, nb_hash); - free(newblk, M_NEWBLK); - + if (freefrag && freefrag->ff_jfreefrag != NULL) + add_to_journal(&freefrag->ff_jfreefrag->fr_list); inodedep_lookup(mp, ip->i_number, DEPALLOC | NODELAY, &inodedep); adp->ad_inodedep = inodedep; - WORKLIST_INSERT(&bp->b_dep, &adp->ad_list); + + WORKLIST_INSERT(&bp->b_dep, &newblk->nb_list); /* * The list of allocdirects must be kept in sorted and ascending * order so that the rollback routines can quickly determine the @@ -1726,24 +3602,25 @@ void */ adphead = &inodedep->id_newinoupdt; oldadp = TAILQ_LAST(adphead, allocdirectlst); - if (oldadp == NULL || oldadp->ad_lbn <= lbn) { + if (oldadp == NULL || oldadp->ad_offset <= off) { /* insert at end of list */ TAILQ_INSERT_TAIL(adphead, adp, ad_next); - if (oldadp != NULL && oldadp->ad_lbn == lbn) + if (oldadp != NULL && oldadp->ad_offset == off) allocdirect_merge(adphead, adp, oldadp); FREE_LOCK(&lk); return; } TAILQ_FOREACH(oldadp, adphead, ad_next) { - if (oldadp->ad_lbn >= lbn) + if (oldadp->ad_offset >= off) break; } if (oldadp == NULL) panic("softdep_setup_allocdirect: lost entry"); /* insert in middle of list */ TAILQ_INSERT_BEFORE(oldadp, adp, ad_next); - if (oldadp->ad_lbn == lbn) + if (oldadp->ad_offset == off) allocdirect_merge(adphead, adp, oldadp); + FREE_LOCK(&lk); } @@ -1761,10 +3638,11 @@ allocdirect_merge(adphead, newadp, oldadp) struct freefrag *freefrag; struct newdirblk *newdirblk; + freefrag = NULL; mtx_assert(&lk, MA_OWNED); if (newadp->ad_oldblkno != oldadp->ad_newblkno || newadp->ad_oldsize != oldadp->ad_newsize || - newadp->ad_lbn >= NDADDR) + newadp->ad_offset >= NDADDR) panic("%s %jd != new %jd || old size %ld != new %ld", "allocdirect_merge: old blkno", (intmax_t)newadp->ad_oldblkno, @@ -1779,7 +3657,7 @@ allocdirect_merge(adphead, newadp, oldadp) * This action is done by swapping the freefrag dependencies. * The new dependency gains the old one's freefrag, and the * old one gets the new one and then immediately puts it on - * the worklist when it is freed by free_allocdirect. It is + * the worklist when it is freed by free_newblk. It is * not possible to do this swap when the old dependency had a * non-zero size but no previous fragment to free. This condition * arises when the new block is an extension of the old block. @@ -1788,8 +3666,8 @@ allocdirect_merge(adphead, newadp, oldadp) * the old dependency, so cannot legitimately be freed until the * conditions for the new dependency are fulfilled. */ + freefrag = newadp->ad_freefrag; if (oldadp->ad_freefrag != NULL || oldadp->ad_oldblkno == 0) { - freefrag = newadp->ad_freefrag; newadp->ad_freefrag = oldadp->ad_freefrag; oldadp->ad_freefrag = freefrag; } @@ -1804,32 +3682,110 @@ allocdirect_merge(adphead, newadp, oldadp) panic("allocdirect_merge: extra newdirblk"); WORKLIST_INSERT(&newadp->ad_newdirblk, &newdirblk->db_list); } - free_allocdirect(adphead, oldadp, 0); + TAILQ_REMOVE(adphead, oldadp, ad_next); + /* + * We need to move any journal dependencies over to the freefrag + * that releases this block if it exists. Otherwise we are + * extending an existing block and we'll wait until that is + * complete to release the journal space and extend the + * new journal to cover this old space as well. + */ + if (freefrag == NULL) { + struct jnewblk *jnewblk; + struct jnewblk *njnewblk; + + if (oldadp->ad_newblkno != newadp->ad_newblkno) + panic("allocdirect_merge: %jd != %jd", + oldadp->ad_newblkno, newadp->ad_newblkno); + jnewblk = oldadp->ad_block.nb_jnewblk; + cancel_newblk(&oldadp->ad_block, &newadp->ad_block.nb_jwork); + /* + * We have an unwritten jnewblk, we need to merge the + * frag bits with our own. The newer adp's journal can not + * be written prior to the old one so no need to check for + * it here. + */ + if (jnewblk) { + njnewblk = newadp->ad_block.nb_jnewblk; + if (jnewblk->jn_state & UNDONE) { + njnewblk->jn_state |= UNDONE | NEWBLOCK; + njnewblk->jn_state &= ~ATTACHED; + jnewblk->jn_state &= ~UNDONE; + } + njnewblk->jn_oldfrags = jnewblk->jn_oldfrags; + WORKLIST_REMOVE(&jnewblk->jn_list); + jnewblk->jn_state |= ATTACHED | COMPLETE; + free_jnewblk(jnewblk); + } + } else { + /* + * We can skip journaling for this freefrag and just complete + * any pending journal work for the allocdirect that is being + * removed after the freefrag completes. + */ + if (freefrag->ff_jfreefrag) + cancel_jfreefrag(freefrag->ff_jfreefrag); + cancel_newblk(&oldadp->ad_block, &freefrag->ff_jwork); + } + free_newblk(&oldadp->ad_block); } - + /* - * Allocate a new freefrag structure if needed. + * Allocate a jfreefrag structure to journal a single block free. */ +static struct jfreefrag * +newjfreefrag(freefrag, ip, blkno, size, lbn) + struct freefrag *freefrag; + struct inode *ip; + ufs2_daddr_t blkno; + long size; + ufs_lbn_t lbn; +{ + struct jfreefrag *jfreefrag; + struct fs *fs; + + fs = ip->i_fs; + jfreefrag = malloc(sizeof(struct jfreefrag), M_JFREEFRAG, + M_SOFTDEP_FLAGS); + workitem_alloc(&jfreefrag->fr_list, D_JFREEFRAG, UFSTOVFS(ip->i_ump)); + jfreefrag->fr_jsegdep = newjsegdep(&jfreefrag->fr_list); + jfreefrag->fr_state = ATTACHED | DEPCOMPLETE; + jfreefrag->fr_ino = ip->i_number; + jfreefrag->fr_lbn = lbn; + jfreefrag->fr_blkno = blkno; + jfreefrag->fr_frags = numfrags(fs, size); + jfreefrag->fr_freefrag = freefrag; + + return (jfreefrag); +} + +/* + * Allocate a new freefrag structure. + */ static struct freefrag * -newfreefrag(ip, blkno, size) +newfreefrag(ip, blkno, size, lbn) struct inode *ip; ufs2_daddr_t blkno; long size; + ufs_lbn_t lbn; { struct freefrag *freefrag; struct fs *fs; - if (blkno == 0) - return (NULL); fs = ip->i_fs; if (fragnum(fs, blkno) + numfrags(fs, size) > fs->fs_frag) panic("newfreefrag: frag size"); freefrag = malloc(sizeof(struct freefrag), - M_FREEFRAG, M_SOFTDEP_FLAGS); + M_FREEFRAG, M_SOFTDEP_FLAGS); workitem_alloc(&freefrag->ff_list, D_FREEFRAG, UFSTOVFS(ip->i_ump)); + freefrag->ff_state = ATTACHED; + LIST_INIT(&freefrag->ff_jwork); freefrag->ff_inum = ip->i_number; freefrag->ff_blkno = blkno; freefrag->ff_fragsize = size; + + freefrag->ff_jfreefrag = newjfreefrag(freefrag, ip, blkno, size, lbn); + return (freefrag); } @@ -1842,9 +3798,17 @@ handle_workitem_freefrag(freefrag) struct freefrag *freefrag; { struct ufsmount *ump = VFSTOUFS(freefrag->ff_list.wk_mp); + struct workhead wkhd; + /* + * It would be illegal to add new completion items to the + * freefrag after it was schedule to be done so it must be + * safe to modify the list head here. + */ + LIST_INIT(&wkhd); + LIST_SWAP(&freefrag->ff_jwork, &wkhd, worklist, wk_list); ffs_blkfree(ump, ump->um_fs, ump->um_devvp, freefrag->ff_blkno, - freefrag->ff_fragsize, freefrag->ff_inum); + freefrag->ff_fragsize, freefrag->ff_inum, &wkhd); ACQUIRE_LOCK(&lk); WORKITEM_FREE(freefrag, D_FREEFRAG); FREE_LOCK(&lk); @@ -1867,50 +3831,52 @@ softdep_setup_allocext(ip, lbn, newblkno, oldblkno { struct allocdirect *adp, *oldadp; struct allocdirectlst *adphead; - struct bmsafemap *bmsafemap; + struct freefrag *freefrag; struct inodedep *inodedep; + struct jnewblk *jnewblk; struct newblk *newblk; struct mount *mp; + if (lbn >= NXADDR) + panic("softdep_setup_allocext: lbn %lld > NXADDR", + (long long)lbn); + mp = UFSTOVFS(ip->i_ump); - adp = malloc(sizeof(struct allocdirect), - M_ALLOCDIRECT, M_SOFTDEP_FLAGS|M_ZERO); - workitem_alloc(&adp->ad_list, D_ALLOCDIRECT, mp); - adp->ad_lbn = lbn; - adp->ad_newblkno = newblkno; - adp->ad_oldblkno = oldblkno; - adp->ad_newsize = newsize; - adp->ad_oldsize = oldsize; - adp->ad_state = ATTACHED | EXTDATA; - LIST_INIT(&adp->ad_newdirblk); - if (newblkno == oldblkno) - adp->ad_freefrag = NULL; + if (oldblkno && oldblkno != newblkno) + freefrag = newfreefrag(ip, oldblkno, oldsize, lbn); else - adp->ad_freefrag = newfreefrag(ip, oldblkno, oldsize); + freefrag = NULL; ACQUIRE_LOCK(&lk); - if (newblk_lookup(ip->i_fs, newblkno, 0, &newblk) == 0) + if (newblk_lookup(mp, newblkno, 0, &newblk) == 0) panic("softdep_setup_allocext: lost block"); + /* + * Convert the newblk to an allocdirect. + */ + newblk->nb_list.wk_type = D_ALLOCDIRECT; + newblk->nb_freefrag = freefrag; + adp = (struct allocdirect *)newblk; + adp->ad_offset = lbn; + adp->ad_oldblkno = oldblkno; + adp->ad_newsize = newsize; + adp->ad_oldsize = oldsize; + adp->ad_state |= EXTDATA; + /* + * Finish initializing the journal. + */ + if ((jnewblk = newblk->nb_jnewblk) != NULL) { + jnewblk->jn_ino = ip->i_number; + jnewblk->jn_lbn = -1 - lbn; /* Negative lbns for ext. */ + jnewblk->jn_state |= DEPCOMPLETE; + add_to_journal(&jnewblk->jn_list); + } + if (freefrag && freefrag->ff_jfreefrag != NULL) + add_to_journal(&freefrag->ff_jfreefrag->fr_list); inodedep_lookup(mp, ip->i_number, DEPALLOC | NODELAY, &inodedep); adp->ad_inodedep = inodedep; - if (newblk->nb_state == DEPCOMPLETE) { - adp->ad_state |= DEPCOMPLETE; - adp->ad_buf = NULL; - } else { - bmsafemap = newblk->nb_bmsafemap; - adp->ad_buf = bmsafemap->sm_buf; - LIST_REMOVE(newblk, nb_deps); - LIST_INSERT_HEAD(&bmsafemap->sm_allocdirecthd, adp, ad_deps); - } - LIST_REMOVE(newblk, nb_hash); - free(newblk, M_NEWBLK); - - WORKLIST_INSERT(&bp->b_dep, &adp->ad_list); - if (lbn >= NXADDR) - panic("softdep_setup_allocext: lbn %lld > NXADDR", - (long long)lbn); + WORKLIST_INSERT(&bp->b_dep, &newblk->nb_list); /* * The list of allocdirects must be kept in sorted and ascending * order so that the rollback routines can quickly determine the @@ -1925,23 +3891,23 @@ softdep_setup_allocext(ip, lbn, newblkno, oldblkno */ adphead = &inodedep->id_newextupdt; oldadp = TAILQ_LAST(adphead, allocdirectlst); - if (oldadp == NULL || oldadp->ad_lbn <= lbn) { + if (oldadp == NULL || oldadp->ad_offset <= lbn) { /* insert at end of list */ TAILQ_INSERT_TAIL(adphead, adp, ad_next); - if (oldadp != NULL && oldadp->ad_lbn == lbn) + if (oldadp != NULL && oldadp->ad_offset == lbn) allocdirect_merge(adphead, adp, oldadp); FREE_LOCK(&lk); return; } TAILQ_FOREACH(oldadp, adphead, ad_next) { - if (oldadp->ad_lbn >= lbn) + if (oldadp->ad_offset >= lbn) break; } if (oldadp == NULL) panic("softdep_setup_allocext: lost entry"); /* insert in middle of list */ TAILQ_INSERT_BEFORE(oldadp, adp, ad_next); - if (oldadp->ad_lbn == lbn) + if (oldadp->ad_offset == lbn) allocdirect_merge(adphead, adp, oldadp); FREE_LOCK(&lk); } @@ -1975,22 +3941,41 @@ softdep_setup_allocext(ip, lbn, newblkno, oldblkno * Allocate a new allocindir structure. */ static struct allocindir * -newallocindir(ip, ptrno, newblkno, oldblkno) +newallocindir(ip, ptrno, newblkno, oldblkno, lbn) struct inode *ip; /* inode for file being extended */ int ptrno; /* offset of pointer in indirect block */ ufs2_daddr_t newblkno; /* disk block number being added */ ufs2_daddr_t oldblkno; /* previous block number, 0 if none */ + ufs_lbn_t lbn; { + struct newblk *newblk; struct allocindir *aip; + struct freefrag *freefrag; + struct jnewblk *jnewblk; - aip = malloc(sizeof(struct allocindir), - M_ALLOCINDIR, M_SOFTDEP_FLAGS|M_ZERO); - workitem_alloc(&aip->ai_list, D_ALLOCINDIR, UFSTOVFS(ip->i_ump)); - aip->ai_state = ATTACHED; + if (oldblkno) + freefrag = newfreefrag(ip, oldblkno, ip->i_fs->fs_bsize, lbn); + else + freefrag = NULL; + ACQUIRE_LOCK(&lk); + if (newblk_lookup(UFSTOVFS(ip->i_ump), newblkno, 0, &newblk) == 0) + panic("new_allocindir: lost block"); + KASSERT(newblk->nb_list.wk_type == D_NEWBLK, + ("newallocindir: Unexpected newblk state %d", + newblk->nb_list.wk_type)); + newblk->nb_list.wk_type = D_ALLOCINDIR; + newblk->nb_freefrag = freefrag; + aip = (struct allocindir *)newblk; aip->ai_offset = ptrno; - aip->ai_newblkno = newblkno; aip->ai_oldblkno = oldblkno; - aip->ai_freefrag = newfreefrag(ip, oldblkno, ip->i_fs->fs_bsize); + if ((jnewblk = newblk->nb_jnewblk) != NULL) { + jnewblk->jn_ino = ip->i_number; + jnewblk->jn_lbn = lbn; + jnewblk->jn_state |= DEPCOMPLETE; + add_to_journal(&jnewblk->jn_list); + } + if (freefrag && freefrag->ff_jfreefrag != NULL) + add_to_journal(&freefrag->ff_jfreefrag->fr_list); return (aip); } @@ -1999,31 +3984,35 @@ static struct allocindir * * to a newly allocated file page. */ void -softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp) +softdep_setup_allocindir_page(ip, bp, indir, lvl, lbn, newblkno, oldblkno, nbp) struct inode *ip; /* inode for file being extended */ - ufs_lbn_t lbn; /* allocated block number within file */ struct buf *bp; /* buffer with indirect blk referencing page */ - int ptrno; /* offset of pointer in indirect block */ + struct indir *indir; /* Indirect block path. */ + int lvl; /* Indirect block level for parent. */ + ufs_lbn_t lbn; /* Logical block number of this block. */ ufs2_daddr_t newblkno; /* disk block number being added */ ufs2_daddr_t oldblkno; /* previous block number, 0 if none */ struct buf *nbp; /* buffer holding allocated page */ { + struct inodedep *inodedep; struct allocindir *aip; struct pagedep *pagedep; + struct mount *mp; ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_page"); - aip = newallocindir(ip, ptrno, newblkno, oldblkno); - ACQUIRE_LOCK(&lk); + mp = UFSTOVFS(ip->i_ump); + aip = newallocindir(ip, indir[lvl].in_off, newblkno, oldblkno, lbn); + (void) inodedep_lookup(mp, ip->i_number, DEPALLOC, &inodedep); /* * If we are allocating a directory page, then we must * allocate an associated pagedep to track additions and * deletions. */ if ((ip->i_mode & IFMT) == IFDIR && - pagedep_lookup(ip, lbn, DEPALLOC, &pagedep) == 0) + pagedep_lookup(mp, ip->i_number, lbn, DEPALLOC, &pagedep) == 0) WORKLIST_INSERT(&nbp->b_dep, &pagedep->pd_list); - WORKLIST_INSERT(&nbp->b_dep, &aip->ai_list); - setup_allocindir_phase2(bp, ip, aip); + WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list); + setup_allocindir_phase2(bp, ip, inodedep, aip, lbn); FREE_LOCK(&lk); } @@ -2032,45 +4021,92 @@ void * newly allocated indirect block. */ void -softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno) +softdep_setup_allocindir_meta(nbp, ip, bp, indir, lvl, newblkno) struct buf *nbp; /* newly allocated indirect block */ struct inode *ip; /* inode for file being extended */ struct buf *bp; /* indirect block referencing allocated block */ - int ptrno; /* offset of pointer in indirect block */ + struct indir *indir; /* Indirect block path. */ + int lvl; /* Indirect block level this block. */ ufs2_daddr_t newblkno; /* disk block number being added */ { + struct inodedep *inodedep; struct allocindir *aip; + ufs_lbn_t lbn; + lbn = indir[lvl].in_lbn; ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_meta"); - aip = newallocindir(ip, ptrno, newblkno, 0); + aip = newallocindir(ip, indir[lvl - 1].in_off, newblkno, 0, lbn); + (void) inodedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, DEPALLOC, + &inodedep); + WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list); + setup_allocindir_phase2(bp, ip, inodedep, aip, lbn); + FREE_LOCK(&lk); +} + +static void +handle_workitem_indirdep(indirdep) + struct indirdep *indirdep; +{ + struct buf *sbp; + + sbp = indirdep->ir_savebp; ACQUIRE_LOCK(&lk); - WORKLIST_INSERT(&nbp->b_dep, &aip->ai_list); - setup_allocindir_phase2(bp, ip, aip); + free_indirdep(indirdep); FREE_LOCK(&lk); + sbp->b_flags |= B_INVAL | B_NOCACHE; + brelse(sbp); } +static void +indirdep_complete(indirdep) + struct indirdep *indirdep; +{ + struct allocindir *aip; + + LIST_REMOVE(indirdep, ir_next); + indirdep->ir_state &= ~ONDEPLIST; + + while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL) { + LIST_REMOVE(aip, ai_next); + free_newblk(&aip->ai_block); + } + if ((indirdep->ir_state & ATTACHED) && + LIST_EMPTY(&indirdep->ir_deplisthd) && + LIST_EMPTY(&indirdep->ir_donehd) && + LIST_EMPTY(&indirdep->ir_writehd)) { + if (indirdep->ir_state & ONWORKLIST) + WORKLIST_REMOVE(&indirdep->ir_list); + add_to_worklist(&indirdep->ir_list); + } +} + /* * Called to finish the allocation of the "aip" allocated * by one of the two routines above. */ static void -setup_allocindir_phase2(bp, ip, aip) +setup_allocindir_phase2(bp, ip, inodedep, aip, lbn) struct buf *bp; /* in-memory copy of the indirect block */ struct inode *ip; /* inode for file being extended */ + struct inodedep *inodedep; /* Inodedep for ip */ struct allocindir *aip; /* allocindir allocated by the above routines */ + ufs_lbn_t lbn; /* Logical block number for this block. */ { struct worklist *wk; + struct fs *fs; + struct newblk *newblk; struct indirdep *indirdep, *newindirdep; - struct bmsafemap *bmsafemap; struct allocindir *oldaip; struct freefrag *freefrag; - struct newblk *newblk; + struct mount *mp; ufs2_daddr_t blkno; + mp = UFSTOVFS(ip->i_ump); + fs = ip->i_fs; mtx_assert(&lk, MA_OWNED); if (bp->b_lblkno >= 0) panic("setup_allocindir_phase2: not indir blk"); - for (indirdep = NULL, newindirdep = NULL; ; ) { + for (freefrag = NULL, indirdep = NULL, newindirdep = NULL; ; ) { LIST_FOREACH(wk, &bp->b_dep, wk_list) { if (wk->wk_type != D_INDIRDEP) continue; @@ -2079,30 +4115,23 @@ static void } if (indirdep == NULL && newindirdep) { indirdep = newindirdep; + newindirdep = NULL; WORKLIST_INSERT(&bp->b_dep, &indirdep->ir_list); - newindirdep = NULL; + if (newblk_lookup(mp, dbtofsb(fs, bp->b_blkno), 0, + &newblk)) { + indirdep->ir_state |= ONDEPLIST; + LIST_INSERT_HEAD(&newblk->nb_indirdeps, + indirdep, ir_next); + } else + indirdep->ir_state |= DEPCOMPLETE; } if (indirdep) { - if (newblk_lookup(ip->i_fs, aip->ai_newblkno, 0, - &newblk) == 0) - panic("setup_allocindir: lost block"); - if (newblk->nb_state == DEPCOMPLETE) { - aip->ai_state |= DEPCOMPLETE; - aip->ai_buf = NULL; - } else { - bmsafemap = newblk->nb_bmsafemap; - aip->ai_buf = bmsafemap->sm_buf; - LIST_REMOVE(newblk, nb_deps); - LIST_INSERT_HEAD(&bmsafemap->sm_allocindirhd, - aip, ai_deps); - } - LIST_REMOVE(newblk, nb_hash); - free(newblk, M_NEWBLK); aip->ai_indirdep = indirdep; /* * Check to see if there is an existing dependency * for this block. If there is, merge the old - * dependency into the new one. + * dependency into the new one. This happens + * as a result of reallocblk only. */ if (aip->ai_oldblkno == 0) oldaip = NULL; @@ -2111,17 +4140,15 @@ static void LIST_FOREACH(oldaip, &indirdep->ir_deplisthd, ai_next) if (oldaip->ai_offset == aip->ai_offset) break; - freefrag = NULL; - if (oldaip != NULL) { - if (oldaip->ai_newblkno != aip->ai_oldblkno) - panic("setup_allocindir_phase2: blkno"); - aip->ai_oldblkno = oldaip->ai_oldblkno; - freefrag = aip->ai_freefrag; - aip->ai_freefrag = oldaip->ai_freefrag; - oldaip->ai_freefrag = NULL; - free_allocindir(oldaip, NULL); - } + if (oldaip != NULL) + freefrag = allocindir_merge(aip, oldaip); LIST_INSERT_HEAD(&indirdep->ir_deplisthd, aip, ai_next); + KASSERT(aip->ai_offset >= 0 && + aip->ai_offset < NINDIR(ip->i_ump->um_fs), + ("setup_allocindir_phase2: Bad offset %d", + aip->ai_offset)); + KASSERT(indirdep->ir_savebp != NULL, + ("setup_allocindir_phase2 NULL ir_savebp")); if (ip->i_ump->um_fstype == UFS1) ((ufs1_daddr_t *)indirdep->ir_savebp->b_data) [aip->ai_offset] = aip->ai_oldblkno; @@ -2148,13 +4175,16 @@ static void } newindirdep = malloc(sizeof(struct indirdep), M_INDIRDEP, M_SOFTDEP_FLAGS); - workitem_alloc(&newindirdep->ir_list, D_INDIRDEP, - UFSTOVFS(ip->i_ump)); + workitem_alloc(&newindirdep->ir_list, D_INDIRDEP, mp); newindirdep->ir_state = ATTACHED; if (ip->i_ump->um_fstype == UFS1) newindirdep->ir_state |= UFS1FMT; + newindirdep->ir_saveddata = NULL; LIST_INIT(&newindirdep->ir_deplisthd); LIST_INIT(&newindirdep->ir_donehd); + LIST_INIT(&newindirdep->ir_writehd); + LIST_INIT(&newindirdep->ir_completehd); + LIST_INIT(&newindirdep->ir_jwork); if (bp->b_blkno == bp->b_lblkno) { ufs_bmaparray(bp->b_vp, bp->b_lblkno, &blkno, bp, NULL, NULL); @@ -2168,6 +4198,33 @@ static void } } +static struct freefrag * +allocindir_merge(aip, oldaip) + struct allocindir *aip; + struct allocindir *oldaip; +{ + struct freefrag *freefrag; + + if (oldaip->ai_newblkno != aip->ai_oldblkno) + panic("allocindir_merge: blkno"); + aip->ai_oldblkno = oldaip->ai_oldblkno; + freefrag = aip->ai_freefrag; + aip->ai_freefrag = oldaip->ai_freefrag; + oldaip->ai_freefrag = NULL; + KASSERT(freefrag != NULL, ("setup_allocindir_phase2: No freefrag")); + /* + * We can skip journaling for this freefrag and just complete + * any pending journal work for the allocindir that is being + * removed after the freefrag completes. + */ + cancel_jfreefrag(freefrag->ff_jfreefrag); + cancel_newblk(&oldaip->ai_block, &freefrag->ff_jwork); + LIST_REMOVE(oldaip, ai_next); + free_newblk(&oldaip->ai_block); + + return (freefrag); +} + /* * Block de-allocation dependencies. * @@ -2206,6 +4263,7 @@ softdep_setup_freeblocks(ip, length, flags) struct freeblks *freeblks; struct inodedep *inodedep; struct allocdirect *adp; + struct jfreeblk *jfreeblk; struct bufobj *bo; struct vnode *vp; struct buf *bp; @@ -2213,6 +4271,13 @@ softdep_setup_freeblocks(ip, length, flags) ufs2_daddr_t extblocks, datablocks; struct mount *mp; int i, delay, error; + ufs2_daddr_t blkno; + ufs_lbn_t tmpval; + ufs_lbn_t lbn; + long oldextsize; + long oldsize; + int frags; + int needj; fs = ip->i_fs; mp = UFSTOVFS(ip->i_ump); @@ -2221,32 +4286,52 @@ softdep_setup_freeblocks(ip, length, flags) freeblks = malloc(sizeof(struct freeblks), M_FREEBLKS, M_SOFTDEP_FLAGS|M_ZERO); workitem_alloc(&freeblks->fb_list, D_FREEBLKS, mp); + LIST_INIT(&freeblks->fb_jfreeblkhd); + LIST_INIT(&freeblks->fb_jwork); freeblks->fb_state = ATTACHED; freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + freeblks->fb_chkcnt = 0; ACQUIRE_LOCK(&lk); + /* + * If we're truncating a removed file that will never be written + * we don't need to journal the block frees. The canceled journals + * for the allocations will suffice. + */ + (void) inodedep_lookup(mp, ip->i_number, DEPALLOC, &inodedep); + if ((inodedep->id_state & DEPCOMPLETE) == 0 && ip->i_nlink == 0) + needj = 0; + else + needj = 1; num_freeblkdep++; FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); datablocks = DIP(ip, i_blocks) - extblocks; - if ((flags & IO_NORMAL) == 0) { - freeblks->fb_oldsize = 0; - freeblks->fb_chkcnt = 0; - } else { - freeblks->fb_oldsize = ip->i_size; + if ((flags & IO_NORMAL) != 0) { + oldsize = ip->i_size; ip->i_size = 0; DIP_SET(ip, i_size, 0); freeblks->fb_chkcnt = datablocks; for (i = 0; i < NDADDR; i++) { - freeblks->fb_dblks[i] = DIP(ip, i_db[i]); + blkno = DIP(ip, i_db[i]); DIP_SET(ip, i_db[i], 0); + if (blkno == 0) + continue; + frags = sblksize(fs, oldsize, i); + frags = numfrags(fs, frags); + newfreework(freeblks, NULL, i, blkno, frags, needj); } - for (i = 0; i < NIADDR; i++) { - freeblks->fb_iblks[i] = DIP(ip, i_ib[i]); + for (i = 0, tmpval = NINDIR(fs), lbn = NDADDR; i < NIADDR; + i++, tmpval *= NINDIR(fs)) { + blkno = DIP(ip, i_ib[i]); DIP_SET(ip, i_ib[i], 0); + if (blkno) + newfreework(freeblks, NULL, -lbn - i, blkno, + fs->fs_frag, needj); + lbn += tmpval; } /* * If the file was removed, then the space being freed was @@ -2259,17 +4344,23 @@ softdep_setup_freeblocks(ip, length, flags) UFS_UNLOCK(ip->i_ump); } } - if ((flags & IO_EXT) == 0) { - freeblks->fb_oldextsize = 0; - } else { - freeblks->fb_oldextsize = ip->i_din2->di_extsize; + if ((flags & IO_EXT) != 0) { + oldextsize = ip->i_din2->di_extsize; ip->i_din2->di_extsize = 0; freeblks->fb_chkcnt += extblocks; for (i = 0; i < NXADDR; i++) { - freeblks->fb_eblks[i] = ip->i_din2->di_extb[i]; + blkno = ip->i_din2->di_extb[i]; ip->i_din2->di_extb[i] = 0; + if (blkno == 0) + continue; + frags = sblksize(fs, oldextsize, i); + frags = numfrags(fs, frags); + newfreework(freeblks, NULL, -1 - i, blkno, frags, + needj); } } + if (LIST_EMPTY(&freeblks->fb_jfreeblkhd)) + needj = 0; DIP_SET(ip, i_blocks, DIP(ip, i_blocks) - freeblks->fb_chkcnt); /* * Push the zero'ed inode to to its disk buffer so that we are free @@ -2304,7 +4395,9 @@ softdep_setup_freeblocks(ip, length, flags) */ delay = (inodedep->id_state & DEPCOMPLETE); if (delay) - WORKLIST_INSERT(&inodedep->id_bufwait, &freeblks->fb_list); + WORKLIST_INSERT(&bp->b_dep, &freeblks->fb_list); + else if (needj) + freeblks->fb_state |= DEPCOMPLETE | COMPLETE; /* * Because the file length has been truncated to zero, any * pending block allocation dependency structures associated @@ -2318,14 +4411,19 @@ softdep_setup_freeblocks(ip, length, flags) merge_inode_lists(&inodedep->id_newinoupdt, &inodedep->id_inoupdt); while ((adp = TAILQ_FIRST(&inodedep->id_inoupdt)) != 0) - free_allocdirect(&inodedep->id_inoupdt, adp, delay); + cancel_allocdirect(&inodedep->id_inoupdt, adp, + freeblks, delay); } if (flags & IO_EXT) { merge_inode_lists(&inodedep->id_newextupdt, &inodedep->id_extupdt); while ((adp = TAILQ_FIRST(&inodedep->id_extupdt)) != 0) - free_allocdirect(&inodedep->id_extupdt, adp, delay); + cancel_allocdirect(&inodedep->id_extupdt, adp, + freeblks, delay); } + LIST_FOREACH(jfreeblk, &freeblks->fb_jfreeblkhd, jf_deps) + add_to_journal(&jfreeblk->jf_list); + FREE_LOCK(&lk); bdwrite(bp); /* @@ -2349,9 +4447,9 @@ restart: BO_UNLOCK(bo); ACQUIRE_LOCK(&lk); (void) inodedep_lookup(mp, ip->i_number, 0, &inodedep); - deallocate_dependencies(bp, inodedep); + if (deallocate_dependencies(bp, inodedep, freeblks)) + bp->b_flags |= B_INVAL | B_NOCACHE; FREE_LOCK(&lk); - bp->b_flags |= B_INVAL | B_NOCACHE; brelse(bp); BO_LOCK(bo); goto restart; @@ -2361,7 +4459,7 @@ restart: if (inodedep_lookup(mp, ip->i_number, 0, &inodedep) != 0) (void) free_inodedep(inodedep); - if(delay) { + if (delay) { freeblks->fb_state |= DEPCOMPLETE; /* * If the inode with zeroed block pointers is now on disk @@ -2376,11 +4474,11 @@ restart: FREE_LOCK(&lk); /* - * If the inode has never been written to disk (delay == 0), - * then we can process the freeblks now that we have deleted - * the dependencies. + * If the inode has never been written to disk (delay == 0) and + * we're not waiting on any journal writes, then we can process the + * freeblks now that we have deleted the dependencies. */ - if (!delay) + if (!delay && !needj) handle_workitem_freeblocks(freeblks, 0); } @@ -2389,19 +4487,22 @@ restart: * be reallocated to a new vnode. The buffer must be locked, thus, * no I/O completion operations can occur while we are manipulating * its associated dependencies. The mutex is held so that other I/O's - * associated with related dependencies do not occur. + * associated with related dependencies do not occur. Returns 1 if + * all dependencies were cleared, 0 otherwise. */ -static void -deallocate_dependencies(bp, inodedep) +static int +deallocate_dependencies(bp, inodedep, freeblks) struct buf *bp; struct inodedep *inodedep; + struct freeblks *freeblks; { struct worklist *wk; struct indirdep *indirdep; + struct newdirblk *newdirblk; struct allocindir *aip; struct pagedep *pagedep; + struct jremref *jremref; struct dirrem *dirrem; - struct diradd *dap; int i; mtx_assert(&lk, MA_OWNED); @@ -2424,15 +4525,15 @@ restart: * copy, allowing the safe copy to be freed and holding * on to the real copy for later use in indir_trunc. */ + if (bp->b_lblkno >= 0 || + bp->b_blkno != indirdep->ir_savebp->b_lblkno) + panic("deallocate_dependencies: not indir"); if (indirdep->ir_state & GOINGAWAY) panic("deallocate_dependencies: already gone"); indirdep->ir_state |= GOINGAWAY; VFSTOUFS(bp->b_vp->v_mount)->um_numindirdeps += 1; while ((aip = LIST_FIRST(&indirdep->ir_deplisthd)) != 0) - free_allocindir(aip, inodedep); - if (bp->b_lblkno >= 0 || - bp->b_blkno != indirdep->ir_savebp->b_lblkno) - panic("deallocate_dependencies: not indir"); + cancel_allocindir(aip, inodedep, freeblks); bcopy(bp->b_data, indirdep->ir_savebp->b_data, bp->b_bcount); WORKLIST_REMOVE(wk); @@ -2442,15 +4543,15 @@ restart: case D_PAGEDEP: pagedep = WK_PAGEDEP(wk); /* - * None of the directory additions will ever be - * visible, so they can simply be tossed. + * There should be no directory add dependencies present + * as the directory could not be truncated until all + * children were removed. */ + KASSERT(LIST_FIRST(&pagedep->pd_pendinghd) == NULL, + ("deallocate_dependencies: pendinghd != NULL")); for (i = 0; i < DAHASHSZ; i++) - while ((dap = - LIST_FIRST(&pagedep->pd_diraddhd[i]))) - free_diradd(dap); - while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != 0) - free_diradd(dap); + KASSERT(LIST_FIRST(&pagedep->pd_diraddhd[i]) == NULL, + ("deallocate_dependencies: diraddhd != NULL")); /* * Copy any directory remove dependencies to the list * to be processed after the zero'ed inode is written. @@ -2458,28 +4559,33 @@ restart: * can be dumped directly onto the work list. */ LIST_FOREACH(dirrem, &pagedep->pd_dirremhd, dm_next) { + /* + * If there are any dirrems we wait for + * the journal write to complete and + * then restart the buf scan as the lock + * has been dropped. + */ + while ((jremref = + LIST_FIRST(&dirrem->dm_jremrefhd)) + != NULL) { + jwait(&jremref->jr_list); + return (0); + } LIST_REMOVE(dirrem, dm_next); dirrem->dm_dirinum = pagedep->pd_ino; if (inodedep == NULL || (inodedep->id_state & ALLCOMPLETE) == - ALLCOMPLETE) + ALLCOMPLETE) { + dirrem->dm_state |= COMPLETE; add_to_worklist(&dirrem->dm_list); - else + } else WORKLIST_INSERT(&inodedep->id_bufwait, &dirrem->dm_list); } if ((pagedep->pd_state & NEWBLOCK) != 0) { - LIST_FOREACH(wk, &inodedep->id_bufwait, wk_list) - if (wk->wk_type == D_NEWDIRBLK && - WK_NEWDIRBLK(wk)->db_pagedep == - pagedep) - break; - if (wk != NULL) { - WORKLIST_REMOVE(wk); - free_newdirblk(WK_NEWDIRBLK(wk)); - } else - panic("deallocate_dependencies: " - "lost pagedep"); + newdirblk = pagedep->pd_newdirblk; + WORKLIST_REMOVE(&newdirblk->db_list); + free_newdirblk(newdirblk); } WORKLIST_REMOVE(&pagedep->pd_list); LIST_REMOVE(pagedep, pd_hash); @@ -2487,7 +4593,8 @@ restart: continue; case D_ALLOCINDIR: - free_allocindir(WK_ALLOCINDIR(wk), inodedep); + aip = WK_ALLOCINDIR(wk); + cancel_allocindir(aip, inodedep, freeblks); continue; case D_ALLOCDIRECT: @@ -2502,46 +4609,136 @@ restart: /* NOTREACHED */ } } + + return (1); } /* - * Free an allocdirect. Generate a new freefrag work request if appropriate. - * This routine must be called with splbio interrupts blocked. + * An allocdirect is being canceled due to a truncate. We must make sure + * the journal entry is released in concert with the blkfree that releases + * the storage. Completed journal entries must not be released until the + * space is no longer pointed to by the inode or in the bitmap. */ static void -free_allocdirect(adphead, adp, delay) +cancel_allocdirect(adphead, adp, freeblks, delay) struct allocdirectlst *adphead; struct allocdirect *adp; + struct freeblks *freeblks; int delay; { + struct freework *freework; + struct newblk *newblk; + struct worklist *wk; + ufs_lbn_t lbn; + + TAILQ_REMOVE(adphead, adp, ad_next); + newblk = (struct newblk *)adp; + if (newblk->nb_state & ONWORKLIST) + WORKLIST_REMOVE(&newblk->nb_list); + /* + * If the journal hasn't been written the jnewblk must be passed + * to the call to ffs_freeblk that reclaims the space. We accomplish + * this by linking the journal dependency into the freework to be + * freed when freework_freeblock() is called. If the journal has + * been written we can simply reclaim the journal space when the + * freeblks work is complete. + */ + if (newblk->nb_jnewblk == NULL) { + cancel_newblk(newblk, &freeblks->fb_jwork); + goto found; + } + lbn = newblk->nb_jnewblk->jn_lbn; + /* + * Find the correct freework structure so it releases the canceled + * journal when the bitmap is cleared. This preserves rollback + * until the allocation is reverted. + */ + LIST_FOREACH(wk, &freeblks->fb_freeworkhd, wk_list) { + freework = WK_FREEWORK(wk); + if (freework->fw_lbn != lbn) + continue; + cancel_newblk(newblk, &freework->fw_jwork); + goto found; + } + panic("cancel_allocdirect: Freework not found for lbn %jd\n", lbn); +found: + if (delay) + WORKLIST_INSERT(&adp->ad_inodedep->id_bufwait, + &newblk->nb_list); + else + free_newblk(newblk); + return; +} + + +static void +cancel_newblk(newblk, wkhd) + struct newblk *newblk; + struct workhead *wkhd; +{ + struct indirdep *indirdep; + + while ((indirdep = LIST_FIRST(&newblk->nb_indirdeps)) != NULL) { + indirdep->ir_state &= ~ONDEPLIST; + LIST_REMOVE(indirdep, ir_next); + } + if (newblk->nb_state & ONDEPLIST) { + newblk->nb_state &= ~ONDEPLIST; + LIST_REMOVE(newblk, nb_deps); + } + /* + * If the journal entry hasn't been written we hold onto the dep + * until it is safe to free along with the other journal work. + */ + if (newblk->nb_jnewblk != NULL) { + cancel_jnewblk(newblk->nb_jnewblk, wkhd); + newblk->nb_jnewblk = NULL; + } + if (!LIST_EMPTY(&newblk->nb_jwork)) + jwork_move(wkhd, &newblk->nb_jwork); +} + +/* + * Free a newblk. Generate a new freefrag work request if appropriate. + * This must be called after the inode pointer and any direct block pointers + * are valid or fully removed via truncate or frag extension. + */ +static void +free_newblk(newblk) + struct newblk *newblk; +{ + struct indirdep *indirdep; struct newdirblk *newdirblk; + struct freefrag *freefrag; struct worklist *wk; mtx_assert(&lk, MA_OWNED); - if ((adp->ad_state & DEPCOMPLETE) == 0) - LIST_REMOVE(adp, ad_deps); - TAILQ_REMOVE(adphead, adp, ad_next); - if ((adp->ad_state & COMPLETE) == 0) - WORKLIST_REMOVE(&adp->ad_list); - if (adp->ad_freefrag != NULL) { - if (delay) - WORKLIST_INSERT(&adp->ad_inodedep->id_bufwait, - &adp->ad_freefrag->ff_list); - else - add_to_worklist(&adp->ad_freefrag->ff_list); + if (newblk->nb_state & ONDEPLIST) + LIST_REMOVE(newblk, nb_deps); + if (newblk->nb_state & ONWORKLIST) + WORKLIST_REMOVE(&newblk->nb_list); + LIST_REMOVE(newblk, nb_hash); + if ((freefrag = newblk->nb_freefrag) != NULL) { + freefrag->ff_state |= COMPLETE; + if ((freefrag->ff_state & ALLCOMPLETE) == ALLCOMPLETE) + add_to_worklist(&freefrag->ff_list); } - if ((wk = LIST_FIRST(&adp->ad_newdirblk)) != NULL) { + if ((wk = LIST_FIRST(&newblk->nb_newdirblk)) != NULL) { newdirblk = WK_NEWDIRBLK(wk); WORKLIST_REMOVE(&newdirblk->db_list); - if (!LIST_EMPTY(&adp->ad_newdirblk)) - panic("free_allocdirect: extra newdirblk"); - if (delay) - WORKLIST_INSERT(&adp->ad_inodedep->id_bufwait, - &newdirblk->db_list); - else - free_newdirblk(newdirblk); + if (!LIST_EMPTY(&newblk->nb_newdirblk)) + panic("free_newblk: extra newdirblk"); + free_newdirblk(newdirblk); } - WORKITEM_FREE(adp, D_ALLOCDIRECT); + while ((indirdep = LIST_FIRST(&newblk->nb_indirdeps)) != NULL) { + indirdep->ir_state |= DEPCOMPLETE; + indirdep_complete(indirdep); + } + KASSERT(newblk->nb_jnewblk == NULL, + ("free_newblk; jnewblk %p still attached", newblk->nb_jnewblk)); + handle_jwork(&newblk->nb_jwork); + newblk->nb_list.wk_type = D_NEWBLK; + WORKITEM_FREE(newblk, D_NEWBLK); } /* @@ -2554,6 +4751,7 @@ free_newdirblk(newdirblk) { struct pagedep *pagedep; struct diradd *dap; + struct worklist *wk; int i; mtx_assert(&lk, MA_OWNED); @@ -2571,7 +4769,7 @@ free_newdirblk(newdirblk) pagedep->pd_state &= ~NEWBLOCK; if ((pagedep->pd_state & ONWORKLIST) == 0) while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != NULL) - free_diradd(dap); + free_diradd(dap, NULL); /* * If no dependencies remain, the pagedep will be freed. */ @@ -2579,9 +4777,16 @@ free_newdirblk(newdirblk) if (!LIST_EMPTY(&pagedep->pd_diraddhd[i])) break; if (i == DAHASHSZ && (pagedep->pd_state & ONWORKLIST) == 0) { + KASSERT(LIST_FIRST(&pagedep->pd_dirremhd) == NULL, + ("free_newdirblk: Freeing non-free pagedep %p", pagedep)); LIST_REMOVE(pagedep, pd_hash); WORKITEM_FREE(pagedep, D_PAGEDEP); } + /* Should only ever be one item in the list. */ + while ((wk = LIST_FIRST(&newdirblk->db_mkdir)) != NULL) { + WORKLIST_REMOVE(wk); + handle_written_mkdir(WK_MKDIR(wk), MKDIR_BODY); + } WORKITEM_FREE(newdirblk, D_NEWDIRBLK); } @@ -2608,6 +4813,7 @@ softdep_freefile(pvp, ino, mode) freefile->fx_mode = mode; freefile->fx_oldinum = ino; freefile->fx_devvp = ip->i_devvp; + LIST_INIT(&freefile->fx_jwork); if ((ip->i_flag & IN_SPACECOUNTED) == 0) { UFS_LOCK(ip->i_ump); ip->i_fs->fs_pendinginodes += 1; @@ -2618,15 +4824,24 @@ softdep_freefile(pvp, ino, mode) * If the inodedep does not exist, then the zero'ed inode has * been written to disk. If the allocated inode has never been * written to disk, then the on-disk inode is zero'ed. In either - * case we can free the file immediately. + * case we can free the file immediately. If the journal was + * canceled before being written the inode will never make it to + * disk and we must send the canceled journal entrys to + * ffs_freefile() to be cleared in conjunction with the bitmap. + * Any blocks waiting on the inode to write can be safely freed + * here as it will never been written. */ ACQUIRE_LOCK(&lk); - if (inodedep_lookup(pvp->v_mount, ino, 0, &inodedep) == 0 || - check_inode_unwritten(inodedep)) { + inodedep_lookup(pvp->v_mount, ino, 0, &inodedep); + if (inodedep && (inodedep->id_state & DEPCOMPLETE) == 0 && + !LIST_EMPTY(&inodedep->id_jaddrefhd)) + handle_bufwait(inodedep, &freefile->fx_jwork); + if (inodedep == NULL || check_inode_unwritten(inodedep)) { FREE_LOCK(&lk); handle_workitem_freefile(freefile); return; } + inodedep->id_state |= GOINGAWAY; WORKLIST_INSERT(&inodedep->id_inowait, &freefile->fx_list); FREE_LOCK(&lk); if (ip->i_number == ino) @@ -2654,6 +4869,19 @@ check_inode_unwritten(inodedep) { mtx_assert(&lk, MA_OWNED); + /* + * The inode is unwritten but we have some canceled jaddrefs still, + * the inode will never be written but it is not yet safe to be + * freed either. Return 1 so callers don't place items on the + * bufwait/inowait lists that will never be written. + * + * XXX This breaks if the jaddrefhd is not canceled but is UNDONE + * and complete. + */ + if ((inodedep->id_state & DEPCOMPLETE) == 0 && + !LIST_EMPTY(&inodedep->id_jaddrefhd)) + return (1); + if ((inodedep->id_state & DEPCOMPLETE) != 0 || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || @@ -2662,9 +4890,9 @@ check_inode_unwritten(inodedep) !TAILQ_EMPTY(&inodedep->id_newinoupdt) || !TAILQ_EMPTY(&inodedep->id_extupdt) || !TAILQ_EMPTY(&inodedep->id_newextupdt) || + inodedep->id_mkdiradd != NULL || inodedep->id_nlinkdelta != 0) return (0); - /* * Another process might be in initiate_write_inodeblock_ufs[12] * trying to allocate memory without holding "Softdep Lock". @@ -2673,9 +4901,11 @@ check_inode_unwritten(inodedep) inodedep->id_savedino1 == NULL) return (0); + if (inodedep->id_state & ONDEPLIST) + LIST_REMOVE(inodedep, id_deps); + inodedep->id_state &= ~ONDEPLIST; inodedep->id_state |= ALLCOMPLETE; - LIST_REMOVE(inodedep, id_deps); - inodedep->id_buf = NULL; + inodedep->id_bmsafemap = NULL; if (inodedep->id_state & ONWORKLIST) WORKLIST_REMOVE(&inodedep->id_list); if (inodedep->id_savedino1 != NULL) { @@ -2701,12 +4931,17 @@ free_inodedep(inodedep) !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || !LIST_EMPTY(&inodedep->id_inowait) || + !LIST_EMPTY(&inodedep->id_jaddrefhd) || !TAILQ_EMPTY(&inodedep->id_inoupdt) || !TAILQ_EMPTY(&inodedep->id_newinoupdt) || !TAILQ_EMPTY(&inodedep->id_extupdt) || !TAILQ_EMPTY(&inodedep->id_newextupdt) || - inodedep->id_nlinkdelta != 0 || inodedep->id_savedino1 != NULL) + inodedep->id_mkdiradd != NULL || + inodedep->id_nlinkdelta != 0 || + inodedep->id_savedino1 != NULL) return (0); + if (inodedep->id_state & ONDEPLIST) + LIST_REMOVE(inodedep, id_deps); LIST_REMOVE(inodedep, id_hash); WORKITEM_FREE(inodedep, D_INODEDEP); num_inodedep -= 1; @@ -2714,6 +4949,119 @@ free_inodedep(inodedep) } /* + * Free the block referenced by a freework structure. The parent freeblks + * structure is released and completed when the final cg bitmap reaches + * the disk. This routine may be freeing a jnewblk which never made it to + * disk in which case we do not have to wait as the operation is undone + * in memory immediately. + */ +static void +freework_freeblock(freework) + struct freework *freework; +{ + struct freeblks *freeblks; + struct ufsmount *ump; + struct workhead wkhd; + struct fs *fs; + int complete; + int pending; + int bsize; + + freeblks = freework->fw_freeblks; + ump = VFSTOUFS(freeblks->fb_list.wk_mp); + fs = ump->um_fs; + complete = 0; + LIST_INIT(&wkhd); + /* + * If we are canceling an existing jnewblk pass it to the free + * routine, otherwise pass the freeblk which will ultimately + * release the freeblks + */ + if (!LIST_EMPTY(&freework->fw_jwork)) { + LIST_SWAP(&wkhd, &freework->fw_jwork, worklist, wk_list); + complete = 1; + } else + WORKLIST_INSERT_UNLOCKED(&wkhd, &freework->fw_list); + bsize = lfragtosize(fs, freework->fw_frags); + pending = btodb(bsize); + ACQUIRE_LOCK(&lk); + freeblks->fb_chkcnt -= pending; + FREE_LOCK(&lk); + /* + * extattr blocks don't show up in pending blocks. XXX why? + */ + if (freework->fw_lbn >= 0 || freework->fw_lbn <= -NDADDR) { + UFS_LOCK(ump); + fs->fs_pendingblocks -= pending; + UFS_UNLOCK(ump); + } + ffs_blkfree(ump, fs, freeblks->fb_devvp, freework->fw_blkno, + bsize, freeblks->fb_previousinum, &wkhd); + if (complete == 0) + return; + /* + * The jnewblk will be discarded and the bits in the map never + * made it to disk. We can immediately free the freeblk. + */ + ACQUIRE_LOCK(&lk); + handle_written_freework(freework); + FREE_LOCK(&lk); +} + +/* + * Start, continue, or finish the process of freeing an indirect block tree. + * The free operation may be paused at any point with fw_off containing the + * offset to restart from. This enables us to implement some flow control + * for large truncates which may fan out and generate a huge number of + * dependencies. + */ +static void +handle_workitem_indirblk(freework) + struct freework *freework; +{ + struct freeblks *freeblks; + struct ufsmount *ump; + struct fs *fs; + + + freeblks = freework->fw_freeblks; + ump = VFSTOUFS(freeblks->fb_list.wk_mp); + fs = ump->um_fs; + if (freework->fw_off == NINDIR(fs)) + freework_freeblock(freework); + else + indir_trunc(freework, fsbtodb(fs, freework->fw_blkno), + freework->fw_lbn); +} + +/* + * Called when a freework structure attached to a cg buf is written. The + * ref on either the parent or the freeblks structure is released and + * either may be added to the worklist if it is the final ref. + */ +static void +handle_written_freework(freework) + struct freework *freework; +{ + struct freeblks *freeblks; + struct freework *parent; + + freeblks = freework->fw_freeblks; + parent = freework->fw_parent; + if (parent) { + if (--parent->fw_ref != 0) + parent = NULL; + freeblks = NULL; + } else if (--freeblks->fb_ref != 0) + freeblks = NULL; + WORKITEM_FREE(freework, D_FREEWORK); + if (freeblks) + add_to_worklist(&freeblks->fb_list); + if (parent) + add_to_worklist(&parent->fw_list); +} + +/* * This workitem routine performs the block de-allocation. * The workitem is added to the pending list after the updated * inode block has been written to disk. As mentioned above, @@ -2726,99 +5074,79 @@ handle_workitem_freeblocks(freeblks, flags) struct freeblks *freeblks; int flags; { + struct freework *freework; + struct worklist *wk; + + KASSERT(LIST_EMPTY(&freeblks->fb_jfreeblkhd), + ("handle_workitem_freeblocks: Journal entries not written.")); + if (LIST_EMPTY(&freeblks->fb_freeworkhd)) { + handle_complete_freeblocks(freeblks); + return; + } + freeblks->fb_ref++; + while ((wk = LIST_FIRST(&freeblks->fb_freeworkhd)) != NULL) { + KASSERT(wk->wk_type == D_FREEWORK, + ("handle_workitem_freeblocks: Unknown type %s", + TYPENAME(wk->wk_type))); + WORKLIST_REMOVE_UNLOCKED(wk); + freework = WK_FREEWORK(wk); + if (freework->fw_lbn <= -NDADDR) + handle_workitem_indirblk(freework); + else + freework_freeblock(freework); + } + ACQUIRE_LOCK(&lk); + if (--freeblks->fb_ref != 0) + freeblks = NULL; + FREE_LOCK(&lk); + if (freeblks) + handle_complete_freeblocks(freeblks); +} + +/* + * Once all of the freework workitems are complete we can retire the + * freeblocks dependency and any journal work awaiting completion. This + * can not be called until all other dependencies are stable on disk. + */ +static void +handle_complete_freeblocks(freeblks) + struct freeblks *freeblks; +{ struct inode *ip; struct vnode *vp; struct fs *fs; struct ufsmount *ump; - int i, nblocks, level, bsize; - ufs2_daddr_t bn, blocksreleased = 0; - int error, allerror = 0; - ufs_lbn_t baselbns[NIADDR], tmpval; - int fs_pendingblocks; + int flags; ump = VFSTOUFS(freeblks->fb_list.wk_mp); fs = ump->um_fs; - fs_pendingblocks = 0; - tmpval = 1; - baselbns[0] = NDADDR; - for (i = 1; i < NIADDR; i++) { - tmpval *= NINDIR(fs); - baselbns[i] = baselbns[i - 1] + tmpval; - } - nblocks = btodb(fs->fs_bsize); - blocksreleased = 0; + flags = LK_NOWAIT; + /* - * Release all extended attribute blocks or frags. - */ - if (freeblks->fb_oldextsize > 0) { - for (i = (NXADDR - 1); i >= 0; i--) { - if ((bn = freeblks->fb_eblks[i]) == 0) - continue; - bsize = sblksize(fs, freeblks->fb_oldextsize, i); - ffs_blkfree(ump, fs, freeblks->fb_devvp, bn, bsize, - freeblks->fb_previousinum); - blocksreleased += btodb(bsize); - } - } - /* - * Release all data blocks or frags. - */ - if (freeblks->fb_oldsize > 0) { - /* - * Indirect blocks first. - */ - for (level = (NIADDR - 1); level >= 0; level--) { - if ((bn = freeblks->fb_iblks[level]) == 0) - continue; - if ((error = indir_trunc(freeblks, fsbtodb(fs, bn), - level, baselbns[level], &blocksreleased)) != 0) - allerror = error; - ffs_blkfree(ump, fs, freeblks->fb_devvp, bn, - fs->fs_bsize, freeblks->fb_previousinum); - fs_pendingblocks += nblocks; - blocksreleased += nblocks; - } - /* - * All direct blocks or frags. - */ - for (i = (NDADDR - 1); i >= 0; i--) { - if ((bn = freeblks->fb_dblks[i]) == 0) - continue; - bsize = sblksize(fs, freeblks->fb_oldsize, i); - ffs_blkfree(ump, fs, freeblks->fb_devvp, bn, bsize, - freeblks->fb_previousinum); - fs_pendingblocks += btodb(bsize); - blocksreleased += btodb(bsize); - } - } - UFS_LOCK(ump); - fs->fs_pendingblocks -= fs_pendingblocks; - UFS_UNLOCK(ump); - /* * If we still have not finished background cleanup, then check * to see if the block count needs to be adjusted. */ - if (freeblks->fb_chkcnt != blocksreleased && - (fs->fs_flags & FS_UNCLEAN) != 0 && + if (freeblks->fb_chkcnt != 0 && (fs->fs_flags & FS_UNCLEAN) != 0 && ffs_vgetf(freeblks->fb_list.wk_mp, freeblks->fb_previousinum, - (flags & LK_NOWAIT) | LK_EXCLUSIVE, &vp, FFSV_FORCEINSMQ) - == 0) { + (flags & LK_NOWAIT) | LK_EXCLUSIVE, &vp, FFSV_FORCEINSMQ) == 0) { ip = VTOI(vp); - DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + \ - freeblks->fb_chkcnt - blocksreleased); + DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + freeblks->fb_chkcnt); ip->i_flag |= IN_CHANGE; vput(vp); } #ifdef INVARIANTS - if (freeblks->fb_chkcnt != blocksreleased && + if (freeblks->fb_chkcnt != 0 && ((fs->fs_flags & FS_UNCLEAN) == 0 || (flags & LK_NOWAIT) != 0)) printf("handle_workitem_freeblocks: block count\n"); - if (allerror) - softdep_error("handle_workitem_freeblks", allerror); #endif /* INVARIANTS */ ACQUIRE_LOCK(&lk); + /* + * All of the freeblock deps must be complete prior to this call + * so it's now safe to complete earlier outstanding journal entries. + */ + handle_jwork(&freeblks->fb_jwork); WORKITEM_FREE(freeblks, D_FREEBLKS); num_freeblkdep--; FREE_LOCK(&lk); @@ -2830,29 +5158,39 @@ handle_workitem_freeblocks(freeblks, flags) * and recursive calls to indirtrunc must be used to cleanse other indirect * blocks. */ -static int -indir_trunc(freeblks, dbn, level, lbn, countp) - struct freeblks *freeblks; +static void +indir_trunc(freework, dbn, lbn) + struct freework *freework; ufs2_daddr_t dbn; - int level; ufs_lbn_t lbn; - ufs2_daddr_t *countp; { + struct workhead wkhd; + struct jnewblk *jnewblk; + struct freeblks *freeblks; struct buf *bp; struct fs *fs; + struct worklist *wkn; struct worklist *wk; struct indirdep *indirdep; struct ufsmount *ump; ufs1_daddr_t *bap1 = 0; - ufs2_daddr_t nb, *bap2 = 0; + ufs2_daddr_t nb, nnb, *bap2 = 0; ufs_lbn_t lbnadd; int i, nblocks, ufs1fmt; - int error, allerror = 0; int fs_pendingblocks; + int freedeps; + int level; + int cnt; + LIST_INIT(&wkhd); + level = lbn_level(lbn); + if (level == -1) + panic("indir_trunc: Invalid lbn %jd\n", lbn); + freeblks = freework->fw_freeblks; ump = VFSTOUFS(freeblks->fb_list.wk_mp); fs = ump->um_fs; fs_pendingblocks = 0; + freedeps = 0; lbnadd = 1; for (i = level; i > 0; i--) lbnadd *= NINDIR(fs); @@ -2880,23 +5218,34 @@ handle_workitem_freeblocks(freeblks, flags) (indirdep = WK_INDIRDEP(wk))->ir_savebp != bp || (indirdep->ir_state & GOINGAWAY) == 0) panic("indir_trunc: lost indirdep"); - WORKLIST_REMOVE(wk); - WORKITEM_FREE(indirdep, D_INDIRDEP); + LIST_SWAP(&wkhd, &indirdep->ir_jwork, worklist, wk_list); + free_indirdep(indirdep); if (!LIST_EMPTY(&bp->b_dep)) panic("indir_trunc: dangling dep"); ump->um_numindirdeps -= 1; FREE_LOCK(&lk); } else { + /* + * If the bp exists we will deadlock against it below. Wait + * for handle_workitem_indirdep() to run and release it. We + * have no way of finding the indirdep to cancel the workitem + * for now. This operation will simply restart at the end + * of the list after the indirdep has been released. + */ + if (bp) { + add_to_worklist(&freework->fw_list); + FREE_LOCK(&lk); + return; + } #ifdef notyet if (bp) brelse(bp); #endif FREE_LOCK(&lk); - error = bread(freeblks->fb_devvp, dbn, (int)fs->fs_bsize, - NOCRED, &bp); - if (error) { + if (bread(freeblks->fb_devvp, dbn, (int)fs->fs_bsize, + NOCRED, &bp) != 0) { brelse(bp); - return (error); + return; } } /* @@ -2909,57 +5258,147 @@ handle_workitem_freeblocks(freeblks, flags) ufs1fmt = 0; bap2 = (ufs2_daddr_t *)bp->b_data; } - nblocks = btodb(fs->fs_bsize); - for (i = NINDIR(fs) - 1; i >= 0; i--) { - if (ufs1fmt) + /* + * Reclaim indirect blocks which never made it to disk. + */ + cnt = 0; + LIST_FOREACH_SAFE(wk, &wkhd, wk_list, wkn) { + struct workhead freewk; + if (wk->wk_type != D_JNEWBLK) + continue; + WORKLIST_REMOVE_UNLOCKED(wk); + LIST_INIT(&freewk); + WORKLIST_INSERT_UNLOCKED(&freewk, wk); + jnewblk = WK_JNEWBLK(wk); + if (jnewblk->jn_lbn > 0) + i = (jnewblk->jn_lbn - -lbn) / lbnadd; + else + i = (jnewblk->jn_lbn - lbn) / lbnadd; + KASSERT(i >= 0 && i < NINDIR(fs), + ("indir_trunc: Index out of range %d parent %jd lbn %jd", + i, lbn, jnewblk->jn_lbn)); + /* Clear the pointer so it isn't found below. */ + if (ufs1fmt) { nb = bap1[i]; - else + bap1[i] = 0; + } else { nb = bap2[i]; + bap2[i] = 0; + } + KASSERT(nb == jnewblk->jn_blkno, + ("indir_trunc: Block mismatch %jd != %jd", + nb, jnewblk->jn_blkno)); + ffs_blkfree(ump, fs, freeblks->fb_devvp, jnewblk->jn_blkno, + fs->fs_bsize, freeblks->fb_previousinum, &freewk); + cnt++; + } + ACQUIRE_LOCK(&lk); + freework->fw_ref += NINDIR(fs) + 1; + /* Any remaining journal work can be completed with freeblks. */ + jwork_move(&freeblks->fb_jwork, &wkhd); + FREE_LOCK(&lk); + nblocks = btodb(fs->fs_bsize); + if (ufs1fmt) + nb = bap1[0]; + else + nb = bap2[0]; + /* + * Reclaim on disk blocks. + */ + for (i = freework->fw_off; i < NINDIR(fs); i++, nb = nnb) { + if (i != NINDIR(fs) - 1) { + if (ufs1fmt) + nnb = bap1[i+1]; + else + nnb = bap2[i+1]; + } else + nnb = 0; if (nb == 0) continue; + cnt++; if (level != 0) { - if ((error = indir_trunc(freeblks, fsbtodb(fs, nb), - level - 1, lbn + (i * lbnadd), countp)) != 0) - allerror = error; + struct freework *nfreework; + ufs_lbn_t nlbn; + + nlbn = (lbn + 1) - (i * lbnadd); + nfreework = newfreework(freeblks, freework, nlbn, nb, + fs->fs_frag, 0); + freedeps++; + indir_trunc(nfreework, fsbtodb(fs, nb), nlbn); + } else { + struct freedep *freedep; + + /* + * Attempt to aggregate freedep dependencies for + * all blocks being released to the same CG. + */ + LIST_INIT(&wkhd); + if (nnb == 0 || (dtog(fs, nb) != dtog(fs, nnb))) { + freedep = newfreedep(freework); + WORKLIST_INSERT_UNLOCKED(&wkhd, + &freedep->fd_list); + freedeps++; + } + ffs_blkfree(ump, fs, freeblks->fb_devvp, nb, + fs->fs_bsize, freeblks->fb_previousinum, &wkhd); + fs_pendingblocks += nblocks; } - ffs_blkfree(ump, fs, freeblks->fb_devvp, nb, fs->fs_bsize, - freeblks->fb_previousinum); - fs_pendingblocks += nblocks; - *countp += nblocks; } - UFS_LOCK(ump); - fs->fs_pendingblocks -= fs_pendingblocks; - UFS_UNLOCK(ump); + ACQUIRE_LOCK(&lk); + freework->fw_off = i; + if (level == 0) + fs_pendingblocks = (nblocks * cnt); + freework->fw_ref += freedeps; + freework->fw_ref -= NINDIR(fs) + 1; + if (freework->fw_ref != 0) + freework = NULL; + FREE_LOCK(&lk); + if (fs_pendingblocks) { + ACQUIRE_LOCK(&lk); + freeblks->fb_chkcnt -= fs_pendingblocks; + FREE_LOCK(&lk); + UFS_LOCK(ump); + fs->fs_pendingblocks -= fs_pendingblocks; + UFS_UNLOCK(ump); + } bp->b_flags |= B_INVAL | B_NOCACHE; brelse(bp); - return (allerror); + if (freework) + handle_workitem_indirblk(freework); + return; } /* - * Free an allocindir. - * This routine must be called with splbio interrupts blocked. + * Cancel an allocindir when it is removed via truncation. */ static void -free_allocindir(aip, inodedep) +cancel_allocindir(aip, inodedep, freeblks) struct allocindir *aip; struct inodedep *inodedep; + struct freeblks *freeblks; { - struct freefrag *freefrag; + struct newblk *newblk; - mtx_assert(&lk, MA_OWNED); - if ((aip->ai_state & DEPCOMPLETE) == 0) - LIST_REMOVE(aip, ai_deps); - if (aip->ai_state & ONWORKLIST) - WORKLIST_REMOVE(&aip->ai_list); + /* + * If the journal hasn't been written the jnewblk must be passed + * to the call to ffs_freeblk that reclaims the space. We accomplish + * this by linking the journal dependency into the indirdep to be + * freed when indir_trunc() is called. If the journal has already + * been written we can simply reclaim the journal space when the + * freeblks work is complete. + */ LIST_REMOVE(aip, ai_next); - if ((freefrag = aip->ai_freefrag) != NULL) { - if (inodedep == NULL) - add_to_worklist(&freefrag->ff_list); - else - WORKLIST_INSERT(&inodedep->id_bufwait, - &freefrag->ff_list); - } - WORKITEM_FREE(aip, D_ALLOCINDIR); + newblk = (struct newblk *)aip; + if (newblk->nb_state & ONWORKLIST) + WORKLIST_REMOVE(&newblk->nb_list); + if (newblk->nb_jnewblk == NULL) + cancel_newblk(newblk, &freeblks->fb_jwork); + else + cancel_newblk(newblk, &aip->ai_indirdep->ir_jwork); + if (inodedep->id_state & DEPCOMPLETE) + WORKLIST_INSERT(&inodedep->id_bufwait, &newblk->nb_list); + else + free_newblk(newblk); } /* @@ -2998,11 +5437,14 @@ softdep_setup_directory_add(bp, dp, diroffset, new ufs_lbn_t lbn; /* block in directory containing new entry */ struct fs *fs; struct diradd *dap; - struct allocdirect *adp; + struct newblk *newblk; struct pagedep *pagedep; struct inodedep *inodedep; struct newdirblk *newdirblk = 0; + struct newdirblk *mknewdirblk = 0; struct mkdir *mkdir1, *mkdir2; + struct worklist *wk; + struct jaddref *jaddref; struct mount *mp; /* @@ -3013,6 +5455,7 @@ softdep_setup_directory_add(bp, dp, diroffset, new bdwrite(newdirbp); return (0); } + mkdir1 = NULL; mp = UFSTOVFS(dp->i_ump); fs = dp->i_fs; lbn = lblkno(fs, diroffset); @@ -3023,25 +5466,31 @@ softdep_setup_directory_add(bp, dp, diroffset, new dap->da_offset = offset; dap->da_newinum = newinum; dap->da_state = ATTACHED; - if (isnewblk && lbn < NDADDR && fragoff(fs, diroffset) == 0) { + LIST_INIT(&dap->da_jwork); + if (isnewblk && fragoff(fs, diroffset) == 0) { newdirblk = malloc(sizeof(struct newdirblk), M_NEWDIRBLK, M_SOFTDEP_FLAGS); workitem_alloc(&newdirblk->db_list, D_NEWDIRBLK, mp); + LIST_INIT(&newdirblk->db_mkdir); } if (newdirbp == NULL) { dap->da_state |= DEPCOMPLETE; ACQUIRE_LOCK(&lk); } else { + mknewdirblk = malloc(sizeof(struct newdirblk), + M_NEWDIRBLK, M_SOFTDEP_FLAGS); + workitem_alloc(&mknewdirblk->db_list, D_NEWDIRBLK, mp); + LIST_INIT(&mknewdirblk->db_mkdir); dap->da_state |= MKDIR_BODY | MKDIR_PARENT; mkdir1 = malloc(sizeof(struct mkdir), M_MKDIR, M_SOFTDEP_FLAGS); workitem_alloc(&mkdir1->md_list, D_MKDIR, mp); - mkdir1->md_state = MKDIR_BODY; + mkdir1->md_state = ATTACHED | MKDIR_BODY; mkdir1->md_diradd = dap; mkdir2 = malloc(sizeof(struct mkdir), M_MKDIR, M_SOFTDEP_FLAGS); workitem_alloc(&mkdir2->md_list, D_MKDIR, mp); - mkdir2->md_state = MKDIR_PARENT; + mkdir2->md_state = ATTACHED | MKDIR_PARENT; mkdir2->md_diradd = dap; /* * Dependency on "." and ".." being written to disk. @@ -3049,85 +5498,116 @@ softdep_setup_directory_add(bp, dp, diroffset, new mkdir1->md_buf = newdirbp; ACQUIRE_LOCK(&lk); LIST_INSERT_HEAD(&mkdirlisthd, mkdir1, md_mkdirs); - WORKLIST_INSERT(&newdirbp->b_dep, &mkdir1->md_list); - FREE_LOCK(&lk); - bdwrite(newdirbp); /* - * Dependency on link count increase for parent directory + * We must link the pagedep, allocdirect, and newdirblk for + * the initial file page so the pointer to the new directory + * is not written until the directory contents are live and + * any subsequent additions are not marked live until the + * block is reachable via the inode. */ - ACQUIRE_LOCK(&lk); - if (inodedep_lookup(mp, dp->i_number, 0, &inodedep) == 0 - || (inodedep->id_state & ALLCOMPLETE) == ALLCOMPLETE) { - dap->da_state &= ~MKDIR_PARENT; - WORKITEM_FREE(mkdir2, D_MKDIR); - } else { - LIST_INSERT_HEAD(&mkdirlisthd, mkdir2, md_mkdirs); - WORKLIST_INSERT(&inodedep->id_bufwait,&mkdir2->md_list); - } + if (pagedep_lookup(mp, newinum, 0, 0, &pagedep) == 0) + panic("softdep_setup_directory_add: " + "lost mkdir pagedep"); + LIST_FOREACH(wk, &newdirbp->b_dep, wk_list) + if (wk->wk_type == D_ALLOCDIRECT) + break; + if (wk == NULL) + panic("softdep_setup_directory_add: lost mkdir adp"); + newblk = WK_NEWBLK(wk); + pagedep->pd_state |= NEWBLOCK; + pagedep->pd_newdirblk = mknewdirblk; + mknewdirblk->db_pagedep = pagedep; + WORKLIST_INSERT(&newblk->nb_newdirblk, &mknewdirblk->db_list); + WORKLIST_INSERT(&mknewdirblk->db_mkdir, &mkdir1->md_list); + /* + * Look up the inodedep for the parent directory so that we + * can link mkdir2 into the pending dotdot jaddref or + * the inode write if there is none. If the inode is + * ALLCOMPLETE and no jaddref is present all dependencies have + * been satisfied and mkdir2 can be freed. + */ + if (inodedep_lookup(mp, dp->i_number, 0, &inodedep) == 0) + panic("softdep_setup_directory_add: lost parent"); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref != NULL && jaddref->ja_parent == newinum && + (jaddref->ja_state & MKDIR_PARENT), + ("softdep_setup_directory_add: bad dotdot jaddref %p", + jaddref)); + LIST_INSERT_HEAD(&mkdirlisthd, mkdir2, md_mkdirs); + mkdir2->md_jaddref = jaddref; + jaddref->ja_mkdir = mkdir2; + /* + * It is important that this journal entry is added prior + * to the dot entry since it writes both the dot and dotdot + * links. This entry must be visible to the recovery + * operation for it to correctly adjust the parent's link. + */ + add_to_journal(&jaddref->ja_list); } /* * Link into parent directory pagedep to await its being written. */ - if (pagedep_lookup(dp, lbn, DEPALLOC, &pagedep) == 0) + if (pagedep_lookup(mp, dp->i_number, lbn, DEPALLOC, &pagedep) == 0) WORKLIST_INSERT(&bp->b_dep, &pagedep->pd_list); + dap->da_pagedep = pagedep; LIST_INSERT_HEAD(&pagedep->pd_diraddhd[DIRADDHASH(offset)], dap, da_pdlist); /* - * Link into its inodedep. Put it on the id_bufwait list if the inode - * is not yet written. If it is written, do the post-inode write - * processing to put it on the id_pendinghd list. + * Link the diradd into the jaddref so it may be completed after + * the journal entry is written. The directory offset was not + * known until now so it must still exist as the first element + * of the jaddrefhd queue. */ - (void) inodedep_lookup(mp, newinum, DEPALLOC, &inodedep); - if ((inodedep->id_state & ALLCOMPLETE) == ALLCOMPLETE) - diradd_inode_written(dap, inodedep); - else - WORKLIST_INSERT(&inodedep->id_bufwait, &dap->da_list); - if (isnewblk) { + if (inodedep_lookup(mp, newinum, 0, &inodedep) == 0) + panic("softdep_setup_directory_add: Lost inodedep"); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref != NULL && jaddref->ja_parent == dp->i_number, + ("softdep_setup_directory_add: bad jaddref %p", jaddref)); + jaddref->ja_diroff = diroffset; + jaddref->ja_diradd = dap; + add_to_journal(&jaddref->ja_list); + /* + * If we are adding a new directory remember this diradd so that if + * we rename it we can keep the dot and dotdot dependencies. If + * we are adding a new name for an inode that has a mkdiradd we + * must be in rename and we have to move the dot and dotdot + * dependencies to this new name. The old name is being orphaned + * soon. + */ + if (mkdir1 != NULL) { + if (inodedep->id_mkdiradd != NULL) + panic("softdep_setup_directory_add: Existing mkdir"); + inodedep->id_mkdiradd = dap; + jaddref = LIST_NEXT(jaddref, ja_inodeps); + KASSERT(jaddref != NULL && + jaddref->ja_ino == jaddref->ja_parent && + (jaddref->ja_state & MKDIR_BODY), + ("softdep_setup_directory_add: bad dot jaddref %p", + jaddref)); + mkdir1->md_jaddref = jaddref; + jaddref->ja_mkdir = mkdir1; + add_to_journal(&jaddref->ja_list); + } else if (inodedep->id_mkdiradd) + merge_diradd(inodedep, dap); + if (newdirblk) { /* - * Directories growing into indirect blocks are rare - * enough and the frequency of new block allocation - * in those cases even more rare, that we choose not - * to bother tracking them. Rather we simply force the - * new directory entry to disk. + * There is nothing to do if we are already tracking + * this block. */ - if (lbn >= NDADDR) { - FREE_LOCK(&lk); - /* - * We only have a new allocation when at the - * beginning of a new block, not when we are - * expanding into an existing block. - */ - if (blkoff(fs, diroffset) == 0) - return (1); - return (0); - } - /* - * We only have a new allocation when at the beginning - * of a new fragment, not when we are expanding into an - * existing fragment. Also, there is nothing to do if we - * are already tracking this block. - */ - if (fragoff(fs, diroffset) != 0) { - FREE_LOCK(&lk); - return (0); - } if ((pagedep->pd_state & NEWBLOCK) != 0) { WORKITEM_FREE(newdirblk, D_NEWDIRBLK); FREE_LOCK(&lk); return (0); } - /* - * Find our associated allocdirect and have it track us. - */ - if (inodedep_lookup(mp, dp->i_number, 0, &inodedep) == 0) - panic("softdep_setup_directory_add: lost inodedep"); - adp = TAILQ_LAST(&inodedep->id_newinoupdt, allocdirectlst); - if (adp == NULL || adp->ad_lbn != lbn) - panic("softdep_setup_directory_add: lost entry"); + if (newblk_lookup(mp, dbtofsb(fs, bp->b_blkno), 0, &newblk) + == 0) + panic("softdep_setup_directory_add: lost entry %jd", + bp->b_blkno); + WORKLIST_INSERT(&newblk->nb_newdirblk, &newdirblk->db_list); pagedep->pd_state |= NEWBLOCK; + pagedep->pd_newdirblk = newdirblk; newdirblk->db_pagedep = pagedep; - WORKLIST_INSERT(&adp->ad_newdirblk, &newdirblk->db_list); } FREE_LOCK(&lk); return (0); @@ -3141,7 +5621,8 @@ softdep_setup_directory_add(bp, dp, diroffset, new * occur while the move is in progress. */ void -softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize) +softdep_change_directoryentry_offset(bp, dp, base, oldloc, newloc, entrysize) + struct buf *bp; /* Buffer holding directory block. */ struct inode *dp; /* inode for directory */ caddr_t base; /* address of dp->i_offset */ caddr_t oldloc; /* address of old directory location */ @@ -3150,18 +5631,27 @@ void { int offset, oldoffset, newoffset; struct pagedep *pagedep; + struct jmvref *jmvref; struct diradd *dap; + struct direct *de; ufs_lbn_t lbn; - ACQUIRE_LOCK(&lk); + de = (struct direct *)oldloc; + jmvref = newjmvref(dp, de->d_ino, dp->i_offset + (oldloc - base), + dp->i_offset + (newloc - base)); lbn = lblkno(dp->i_fs, dp->i_offset); offset = blkoff(dp->i_fs, dp->i_offset); - if (pagedep_lookup(dp, lbn, 0, &pagedep) == 0) - goto done; oldoffset = offset + (oldloc - base); newoffset = offset + (newloc - base); + ACQUIRE_LOCK(&lk); + if (pagedep_lookup(UFSTOVFS(dp->i_ump), + dp->i_number, lbn, DEPALLOC, &pagedep) == 0) { + WORKLIST_INSERT(&bp->b_dep, &pagedep->pd_list); + goto done; + } - LIST_FOREACH(dap, &pagedep->pd_diraddhd[DIRADDHASH(oldoffset)], da_pdlist) { + LIST_FOREACH(dap, &pagedep->pd_diraddhd[DIRADDHASH(oldoffset)], + da_pdlist) { if (dap->da_offset != oldoffset) continue; dap->da_offset = newoffset; @@ -3182,50 +5672,142 @@ void } } done: + LIST_INSERT_HEAD(&pagedep->pd_jmvrefhd, jmvref, jm_deps); + add_to_journal(&jmvref->jm_list); bcopy(oldloc, newloc, entrysize); FREE_LOCK(&lk); } /* + * Move the mkdir dependencies and journal work from one diradd to another + * when renaming a directory. The new name must depend on the mkdir deps + * completing as the old name did. Directories can only have one valid link + * at a time so one must be canonical. + */ +static void +merge_diradd(inodedep, newdap) + struct inodedep *inodedep; + struct diradd *newdap; +{ + struct diradd *olddap; + struct mkdir *mkdir, *nextmd; + short state; + + olddap = inodedep->id_mkdiradd; + inodedep->id_mkdiradd = newdap; + if ((olddap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) { + newdap->da_state &= ~DEPCOMPLETE; + for (mkdir = LIST_FIRST(&mkdirlisthd); mkdir; mkdir = nextmd) { + nextmd = LIST_NEXT(mkdir, md_mkdirs); + if (mkdir->md_diradd != olddap) + continue; + mkdir->md_diradd = newdap; + state = mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY); + newdap->da_state |= state; + olddap->da_state &= ~state; + if ((olddap->da_state & + (MKDIR_PARENT | MKDIR_BODY)) == 0) + break; + } + if ((olddap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) + panic("merge_diradd: unfound ref"); + } + /* + * Any mkdir related journal items are not safe to be freed until + * the new name is stable. + */ + jwork_move(&newdap->da_jwork, &olddap->da_jwork); + olddap->da_state |= DEPCOMPLETE; + complete_diradd(olddap); +} + +/* + * Move the diradd to the pending list when all diradd dependencies are + * complete. + */ +static void +complete_diradd(dap) + struct diradd *dap; +{ + struct pagedep *pagedep; + + if ((dap->da_state & ALLCOMPLETE) == ALLCOMPLETE) { + if (dap->da_state & DIRCHG) + pagedep = dap->da_previous->dm_pagedep; + else + pagedep = dap->da_pagedep; + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); + } +} + +/* * Free a diradd dependency structure. This routine must be called - * with splbio interrupts blocked. + * with splbio interrupts blocked. If wkhd is NULL we should not find + * any pending jaddrefs and only jsegdeps to be retired. */ static void -free_diradd(dap) +free_diradd(dap, wkhd) struct diradd *dap; + struct workhead *wkhd; { struct dirrem *dirrem; struct pagedep *pagedep; struct inodedep *inodedep; struct mkdir *mkdir, *nextmd; + struct jaddref *jaddref; mtx_assert(&lk, MA_OWNED); - WORKLIST_REMOVE(&dap->da_list); LIST_REMOVE(dap, da_pdlist); + if (dap->da_state & ONWORKLIST) + WORKLIST_REMOVE(&dap->da_list); if ((dap->da_state & DIRCHG) == 0) { pagedep = dap->da_pagedep; } else { dirrem = dap->da_previous; pagedep = dirrem->dm_pagedep; dirrem->dm_dirinum = pagedep->pd_ino; - add_to_worklist(&dirrem->dm_list); + dirrem->dm_state |= COMPLETE; + if (LIST_EMPTY(&dirrem->dm_jremrefhd)) + add_to_worklist(&dirrem->dm_list); } if (inodedep_lookup(pagedep->pd_list.wk_mp, dap->da_newinum, - 0, &inodedep) != 0) + 0, &inodedep) != 0) { + /* Abort the addref that reference this diradd. */ + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) + if (jaddref->ja_diradd == dap) { + cancel_jaddref(jaddref, inodedep, wkhd); + break; + } + if (inodedep->id_mkdiradd == dap) + inodedep->id_mkdiradd = NULL; (void) free_inodedep(inodedep); + } if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) { for (mkdir = LIST_FIRST(&mkdirlisthd); mkdir; mkdir = nextmd) { nextmd = LIST_NEXT(mkdir, md_mkdirs); if (mkdir->md_diradd != dap) continue; - dap->da_state &= ~mkdir->md_state; - WORKLIST_REMOVE(&mkdir->md_list); + dap->da_state &= + ~(mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)); LIST_REMOVE(mkdir, md_mkdirs); + if (mkdir->md_state & ONWORKLIST) + WORKLIST_REMOVE(&mkdir->md_list); + if ((jaddref = mkdir->md_jaddref) != NULL) + cancel_jaddref(jaddref, NULL, wkhd); WORKITEM_FREE(mkdir, D_MKDIR); + if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) == 0) + break; } if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) panic("free_diradd: unfound ref"); } + if (wkhd) + jwork_move(wkhd, &dap->da_jwork); + /* + * Free any journal segments waiting for the directory write. + */ + handle_jwork(&dap->da_jwork); WORKITEM_FREE(dap, D_DIRADD); } @@ -3254,11 +5836,14 @@ softdep_setup_remove(bp, dp, ip, isrmdir) int isrmdir; /* indicates if doing RMDIR */ { struct dirrem *dirrem, *prevdirrem; + int direct; /* - * Allocate a new dirrem if appropriate and ACQUIRE_LOCK. + * Allocate a new dirrem if appropriate and ACQUIRE_LOCK. We want + * newdirrem() to setup the full directory remove which requires + * isrmdir > 1. */ - dirrem = newdirrem(bp, dp, ip, isrmdir, &prevdirrem); + dirrem = newdirrem(bp, dp, ip, isrmdir?2:0, &prevdirrem); /* * If the COMPLETE flag is clear, then there were no active @@ -3280,12 +5865,64 @@ softdep_setup_remove(bp, dp, ip, isrmdir) LIST_INSERT_HEAD(&dirrem->dm_pagedep->pd_dirremhd, prevdirrem, dm_next); dirrem->dm_dirinum = dirrem->dm_pagedep->pd_ino; + direct = LIST_EMPTY(&dirrem->dm_jremrefhd); FREE_LOCK(&lk); - handle_workitem_remove(dirrem, NULL); + if (direct) + handle_workitem_remove(dirrem, NULL); } } /* + * Check for an entry matching 'offset' on both the pd_dirraddhd list and the + * pd_pendinghd list of a pagedep. + */ +static struct diradd * +diradd_lookup(pagedep, offset) + struct pagedep *pagedep; + int offset; +{ + struct diradd *dap; + + LIST_FOREACH(dap, &pagedep->pd_diraddhd[DIRADDHASH(offset)], da_pdlist) + if (dap->da_offset == offset) + return (dap); + LIST_FOREACH(dap, &pagedep->pd_pendinghd, da_pdlist) + if (dap->da_offset == offset) + return (dap); + return (NULL); +} + +/* + * Search for a .. diradd dependency in a directory that is being removed. + * If the directory was renamed to a new parent we have a diradd rather + * than a mkdir for the .. entry. We need to cancel it now before + * it is found in truncate(). + */ +static void +cancel_diradd_dotdot(ip, dirrem) + struct inode *ip; + struct dirrem *dirrem; +{ + struct pagedep *pagedep; + struct diradd *dap; + struct worklist *wk; + + if (pagedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, 0, 0, + &pagedep) == 0) + return; + dap = diradd_lookup(pagedep, DOTDOT_OFFSET); + if (dap == NULL) + return; + free_diradd(dap, &dirrem->dm_jwork); + /* + * Mark any journal work as belonging to the parent so it is freed + * with the .. reference. + */ + LIST_FOREACH(wk, &dirrem->dm_jwork, wk_list) + wk->wk_state |= MKDIR_PARENT; +} + +/* * Allocate a new dirrem if appropriate and return it along with * its associated pagedep. Called without a lock, returns with lock. */ @@ -3303,6 +5940,9 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) struct diradd *dap; struct dirrem *dirrem; struct pagedep *pagedep; + struct jremref *jremref; + struct jremref *dotremref; + struct jremref *dotdotremref; /* * Whiteouts have no deletion dependencies. @@ -3322,33 +5962,67 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) dirrem = malloc(sizeof(struct dirrem), M_DIRREM, M_SOFTDEP_FLAGS|M_ZERO); workitem_alloc(&dirrem->dm_list, D_DIRREM, ITOV(dp)->v_mount); + LIST_INIT(&dirrem->dm_jremrefhd); + LIST_INIT(&dirrem->dm_jwork); dirrem->dm_state = isrmdir ? RMDIR : 0; dirrem->dm_oldinum = ip->i_number; *prevdirremp = NULL; - + /* + * Allocate remove reference structures to track journal write + * dependencies. We will always have one for the link and + * when doing directories we will always have one more for dot. + * When renaming a directory we skip the dotdot link change so + * this is not needed. + */ + dotremref = dotdotremref = NULL; + jremref = newjremref(dirrem, dp, ip, dp->i_offset); + if (isrmdir) + dotremref = newjremref(dirrem, ip, ip, DOT_OFFSET); + if (isrmdir > 1) { + dotdotremref = newjremref(dirrem, ip, dp, DOTDOT_OFFSET); + dotdotremref->jr_state |= MKDIR_PARENT; + } ACQUIRE_LOCK(&lk); lbn = lblkno(dp->i_fs, dp->i_offset); offset = blkoff(dp->i_fs, dp->i_offset); - if (pagedep_lookup(dp, lbn, DEPALLOC, &pagedep) == 0) + if (pagedep_lookup(UFSTOVFS(dp->i_ump), dp->i_number, lbn, DEPALLOC, + &pagedep) == 0) WORKLIST_INSERT(&bp->b_dep, &pagedep->pd_list); dirrem->dm_pagedep = pagedep; /* + * If we're removing a .. link search for the dependency now and + * cancel it. Any pending journal work will be added to the dirrem + * to be completed when the workitem remove completes. + */ + if (isrmdir > 1) + cancel_diradd_dotdot(ip, dirrem); + /* * Check for a diradd dependency for the same directory entry. * If present, then both dependencies become obsolete and can - * be de-allocated. Check for an entry on both the pd_dirraddhd - * list and the pd_pendinghd list. + * be de-allocated. */ - - LIST_FOREACH(dap, &pagedep->pd_diraddhd[DIRADDHASH(offset)], da_pdlist) - if (dap->da_offset == offset) - break; + dap = diradd_lookup(pagedep, offset); if (dap == NULL) { - - LIST_FOREACH(dap, &pagedep->pd_pendinghd, da_pdlist) - if (dap->da_offset == offset) - break; - if (dap == NULL) - return (dirrem); + /* + * Link the jremref structures into the dirrem so they are + * written prior to the pagedep. + */ + if (jremref) { + LIST_INSERT_HEAD(&dirrem->dm_jremrefhd, jremref, + jr_deps); + add_to_journal(&jremref->jr_list); + if (dotremref) { + LIST_INSERT_HEAD(&dirrem->dm_jremrefhd, + dotremref, jr_deps); + add_to_journal(&dotremref->jr_list); + } + if (dotdotremref) { + LIST_INSERT_HEAD(&dirrem->dm_jremrefhd, + dotdotremref, jr_deps); + add_to_journal(&dotdotremref->jr_list); + } + } + return (dirrem); } /* * Must be ATTACHED at this point. @@ -3359,6 +6033,20 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) panic("newdirrem: inum %d should be %d", ip->i_number, dap->da_newinum); /* + * If we've found a diradd in memory it still has valid journal + * entries to complete. Rather than writing new journal entries + * we complete the segdeps only after the removal is complete. The + * recovery operation will simply find an incomplete add. If the + * addref journal is not written the jaddrefs will stay linked into + * the inodedep and bmsafemap preventing the writes of the new + * data until they are ultimately freed. + */ + free_jremref(jremref); + if (dotremref) + free_jremref(dotremref); + if (dotdotremref) + free_jremref(dotdotremref); + /* * If we are deleting a changed name that never made it to disk, * then return the dirrem describing the previous inode (which * represents the inode currently referenced from this entry on disk). @@ -3373,7 +6061,18 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) * Mark it COMPLETE so we can delete its inode immediately. */ dirrem->dm_state |= COMPLETE; - free_diradd(dap); + free_diradd(dap, &dirrem->dm_jwork); +#ifdef DEBUG + /* XXX Temporary. */ + if (isrmdir == 0) { + struct worklist *wk; + + LIST_FOREACH(wk, &dirrem->dm_jwork, wk_list) + if (wk->wk_state & (MKDIR_BODY | MKDIR_PARENT)) + panic("bad wk %p (0x%X)\n", wk, wk->wk_state); + } +#endif + return (dirrem); } @@ -3407,6 +6106,7 @@ softdep_setup_directory_change(bp, dp, ip, newinum struct dirrem *dirrem, *prevdirrem; struct pagedep *pagedep; struct inodedep *inodedep; + struct jaddref *jaddref; struct mount *mp; offset = blkoff(dp->i_fs, dp->i_offset); @@ -3422,6 +6122,7 @@ softdep_setup_directory_change(bp, dp, ip, newinum dap->da_state = DIRCHG | ATTACHED | DEPCOMPLETE; dap->da_offset = offset; dap->da_newinum = newinum; + LIST_INIT(&dap->da_jwork); } /* @@ -3454,7 +6155,8 @@ softdep_setup_directory_change(bp, dp, ip, newinum dm_next); } else { dirrem->dm_dirinum = pagedep->pd_ino; - add_to_worklist(&dirrem->dm_list); + if (LIST_EMPTY(&dirrem->dm_jremrefhd)) + add_to_worklist(&dirrem->dm_list); } FREE_LOCK(&lk); return; @@ -3483,23 +6185,30 @@ softdep_setup_directory_change(bp, dp, ip, newinum dap->da_pagedep = pagedep; } dirrem->dm_dirinum = pagedep->pd_ino; - add_to_worklist(&dirrem->dm_list); + if (LIST_EMPTY(&dirrem->dm_jremrefhd)) + add_to_worklist(&dirrem->dm_list); } /* - * Link into its inodedep. Put it on the id_bufwait list if the inode - * is not yet written. If it is written, do the post-inode write - * processing to put it on the id_pendinghd list. + * Lookup the jaddref for this journal entry. We must finish + * initializing it and make the diradd write dependent on it. */ - if (inodedep_lookup(mp, newinum, DEPALLOC, &inodedep) == 0 || - (inodedep->id_state & ALLCOMPLETE) == ALLCOMPLETE) { - dap->da_state |= COMPLETE; - LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); - WORKLIST_INSERT(&inodedep->id_pendinghd, &dap->da_list); - } else { - LIST_INSERT_HEAD(&pagedep->pd_diraddhd[DIRADDHASH(offset)], - dap, da_pdlist); - WORKLIST_INSERT(&inodedep->id_bufwait, &dap->da_list); - } + if (inodedep_lookup(mp, newinum, 0, &inodedep) == 0) + panic("softdep_setup_directory_change: Lost inodedep."); + jaddref = LIST_FIRST(&inodedep->id_jaddrefhd); + KASSERT(jaddref != NULL && jaddref->ja_parent == dp->i_number, + ("softdep_setup_directory_change: bad jaddref %p", jaddref)); + jaddref->ja_diroff = dp->i_offset; + jaddref->ja_diradd = dap; + LIST_INSERT_HEAD(&pagedep->pd_diraddhd[DIRADDHASH(offset)], dap, + da_pdlist); + add_to_journal(&jaddref->ja_list); + /* + * If we're making a new name for a directory that has not been + * committed when need to move the dot and dotdot references to + * this new name. + */ + if (inodedep->id_mkdiradd) + merge_diradd(inodedep, dap); FREE_LOCK(&lk); } @@ -3584,6 +6293,8 @@ handle_workitem_remove(dirrem, xp) { struct thread *td = curthread; struct inodedep *inodedep; + struct workhead dotdotwk; + struct worklist *wk; struct vnode *vp; struct inode *ip; ino_t oldinum; @@ -3600,7 +6311,27 @@ handle_workitem_remove(dirrem, xp) if ((inodedep_lookup(dirrem->dm_list.wk_mp, dirrem->dm_oldinum, 0, &inodedep)) == 0) panic("handle_workitem_remove: lost inodedep"); + KASSERT(LIST_EMPTY(&dirrem->dm_jremrefhd), + ("handle_workitem_remove: Journal entries not written.")); /* + * Move all dependencies waiting on the remove to complete + * from the dirrem to the inode inowait list to be completed + * after the inode has been updated and written to disk. Any + * marked MKDIR_PARENT are saved to be completed when the .. ref + * is removed. + */ + LIST_INIT(&dotdotwk); + while ((wk = LIST_FIRST(&dirrem->dm_jwork)) != NULL) { + WORKLIST_REMOVE(wk); + if (wk->wk_state & MKDIR_PARENT) { + wk->wk_state &= ~MKDIR_PARENT; + WORKLIST_INSERT(&dotdotwk, wk); + continue; + } + WORKLIST_INSERT(&inodedep->id_inowait, wk); + } + LIST_SWAP(&dirrem->dm_jwork, &dotdotwk, worklist, wk_list); + /* * Normal file deletion. */ if ((dirrem->dm_state & RMDIR) == 0) { @@ -3611,6 +6342,9 @@ handle_workitem_remove(dirrem, xp) panic("handle_workitem_remove: bad file delta"); inodedep->id_nlinkdelta = ip->i_nlink - ip->i_effnlink; num_dirrem -= 1; + KASSERT(LIST_EMPTY(&dirrem->dm_jwork), + ("handle_workitem_remove: worklist not empty. %s", + TYPENAME(LIST_FIRST(&dirrem->dm_jwork)->wk_type))); WORKITEM_FREE(dirrem, D_DIRREM); FREE_LOCK(&lk); vput(vp); @@ -3639,6 +6373,8 @@ handle_workitem_remove(dirrem, xp) * directory should not change. Thus we skip the followup dirrem. */ if (dirrem->dm_state & DIRCHG) { + KASSERT(LIST_EMPTY(&dirrem->dm_jwork), + ("handle_workitem_remove: DIRCHG and worklist not empty.")); num_dirrem -= 1; WORKITEM_FREE(dirrem, D_DIRREM); FREE_LOCK(&lk); @@ -3689,6 +6425,7 @@ static void handle_workitem_freefile(freefile) struct freefile *freefile; { + struct workhead wkhd; struct fs *fs; struct inodedep *idp; struct ufsmount *ump; @@ -3701,13 +6438,15 @@ handle_workitem_freefile(freefile) error = inodedep_lookup(UFSTOVFS(ump), freefile->fx_oldinum, 0, &idp); FREE_LOCK(&lk); if (error) - panic("handle_workitem_freefile: inodedep survived"); + panic("handle_workitem_freefile: inodedep %p survived", idp); #endif UFS_LOCK(ump); fs->fs_pendinginodes -= 1; UFS_UNLOCK(ump); + LIST_INIT(&wkhd); + LIST_SWAP(&freefile->fx_jwork, &wkhd, worklist, wk_list); if ((error = ffs_freefile(ump, fs, freefile->fx_devvp, - freefile->fx_oldinum, freefile->fx_mode)) != 0) + freefile->fx_oldinum, freefile->fx_mode, &wkhd)) != 0) softdep_error("handle_workitem_freefile", error); ACQUIRE_LOCK(&lk); WORKITEM_FREE(freefile, D_FREEFILE); @@ -3757,8 +6496,10 @@ softdep_disk_io_initiation(bp) { struct worklist *wk; struct worklist marker; - struct indirdep *indirdep; struct inodedep *inodedep; + struct freeblks *freeblks; + struct jfreeblk *jfreeblk; + struct newblk *newblk; /* * We only care about write operations. There should never @@ -3767,6 +6508,10 @@ softdep_disk_io_initiation(bp) if (bp->b_iocmd != BIO_WRITE) panic("softdep_disk_io_initiation: not write"); + if (bp->b_vflags & BV_BKGRDINPROG) + panic("softdep_disk_io_initiation: Writing buffer with " + "background write in progress: %p", bp); + marker.wk_type = D_LAST + 1; /* Not a normal workitem */ PHOLD(curproc); /* Don't swap out kernel stack */ @@ -3792,46 +6537,54 @@ softdep_disk_io_initiation(bp) continue; case D_INDIRDEP: - indirdep = WK_INDIRDEP(wk); - if (indirdep->ir_state & GOINGAWAY) - panic("disk_io_initiation: indirdep gone"); + initiate_write_indirdep(WK_INDIRDEP(wk), bp); + continue; + + case D_BMSAFEMAP: + initiate_write_bmsafemap(WK_BMSAFEMAP(wk), bp); + continue; + + case D_JSEG: + WK_JSEG(wk)->js_buf = NULL; + continue; + + case D_FREEBLKS: + freeblks = WK_FREEBLKS(wk); + jfreeblk = LIST_FIRST(&freeblks->fb_jfreeblkhd); /* - * If there are no remaining dependencies, this - * will be writing the real pointers, so the - * dependency can be freed. + * We have to wait for the jfreeblks to be journaled + * before we can write an inodeblock with updated + * pointers. Be careful to arrange the marker so + * we revisit the jfreeblk if it's not removed by + * the first jwait(). */ - if (LIST_EMPTY(&indirdep->ir_deplisthd)) { - struct buf *bp; - - bp = indirdep->ir_savebp; - bp->b_flags |= B_INVAL | B_NOCACHE; - /* inline expand WORKLIST_REMOVE(wk); */ - wk->wk_state &= ~ONWORKLIST; - LIST_REMOVE(wk, wk_list); - WORKITEM_FREE(indirdep, D_INDIRDEP); - FREE_LOCK(&lk); - brelse(bp); - ACQUIRE_LOCK(&lk); - continue; + if (jfreeblk != NULL) { + LIST_REMOVE(&marker, wk_list); + LIST_INSERT_BEFORE(wk, &marker, wk_list); + jwait(&jfreeblk->jf_list); } + continue; + case D_ALLOCDIRECT: + case D_ALLOCINDIR: /* - * Replace up-to-date version with safe version. + * We have to wait for the jnewblk to be journaled + * before we can write to a block otherwise the + * contents may be confused with an earlier file + * at recovery time. Handle the marker as described + * above. */ - FREE_LOCK(&lk); - indirdep->ir_saveddata = malloc(bp->b_bcount, - M_INDIRDEP, M_SOFTDEP_FLAGS); - ACQUIRE_LOCK(&lk); - indirdep->ir_state &= ~ATTACHED; - indirdep->ir_state |= UNDONE; - bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount); - bcopy(indirdep->ir_savebp->b_data, bp->b_data, - bp->b_bcount); + newblk = WK_NEWBLK(wk); + if (newblk->nb_jnewblk != NULL) { + LIST_REMOVE(&marker, wk_list); + LIST_INSERT_BEFORE(wk, &marker, wk_list); + jwait(&newblk->nb_jnewblk->jn_list); + } continue; case D_MKDIR: - case D_BMSAFEMAP: - case D_ALLOCDIRECT: - case D_ALLOCINDIR: + case D_FREEWORK: + case D_FREEDEP: + case D_JSEGDEP: continue; default: @@ -3855,6 +6608,9 @@ initiate_write_filepage(pagedep, bp) struct pagedep *pagedep; struct buf *bp; { + struct jremref *jremref; + struct jmvref *jmvref; + struct dirrem *dirrem; struct diradd *dap; struct direct *ep; int i; @@ -3869,6 +6625,18 @@ initiate_write_filepage(pagedep, bp) return; } pagedep->pd_state |= IOSTARTED; + /* + * Wait for all journal remove dependencies to hit the disk. + * We can not allow any potentially conflicting directory adds + * to be visible before removes and rollback is too difficult. + * lk may be dropped and re-acquired, however we hold the buf + * locked so the dependency can not go away. + */ + LIST_FOREACH(dirrem, &pagedep->pd_dirremhd, dm_next) + while ((jremref = LIST_FIRST(&dirrem->dm_jremrefhd)) != NULL) + jwait(&jremref->jr_list); + while ((jmvref = LIST_FIRST(&pagedep->pd_jmvrefhd)) != NULL) + jwait(&jmvref->jm_list); for (i = 0; i < DAHASHSZ; i++) { LIST_FOREACH(dap, &pagedep->pd_diraddhd[i], da_pdlist) { ep = (struct direct *) @@ -3905,6 +6673,7 @@ initiate_write_inodeblock_ufs1(inodedep, bp) struct allocdirect *adp, *lastadp; struct ufs1_dinode *dp; struct ufs1_dinode *sip; + struct jaddref *jaddref; struct fs *fs; ufs_lbn_t i; #ifdef INVARIANTS @@ -3940,32 +6709,41 @@ initiate_write_inodeblock_ufs1(inodedep, bp) */ inodedep->id_savedsize = dp->di_size; inodedep->id_savedextsize = 0; - if (TAILQ_EMPTY(&inodedep->id_inoupdt)) + if (TAILQ_EMPTY(&inodedep->id_inoupdt) && + LIST_EMPTY(&inodedep->id_jaddrefhd)) return; /* + * Revert the link count for every jaddref present. + */ + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) { + dp->di_nlink--; + jaddref->ja_state &= ~ATTACHED; + jaddref->ja_state |= UNDONE; + } + /* * Set the dependencies to busy. */ for (deplist = 0, adp = TAILQ_FIRST(&inodedep->id_inoupdt); adp; adp = TAILQ_NEXT(adp, ad_next)) { #ifdef INVARIANTS - if (deplist != 0 && prevlbn >= adp->ad_lbn) + if (deplist != 0 && prevlbn >= adp->ad_offset) panic("softdep_write_inodeblock: lbn order"); - prevlbn = adp->ad_lbn; - if (adp->ad_lbn < NDADDR && - dp->di_db[adp->ad_lbn] != adp->ad_newblkno) + prevlbn = adp->ad_offset; + if (adp->ad_offset < NDADDR && + dp->di_db[adp->ad_offset] != adp->ad_newblkno) panic("%s: direct pointer #%jd mismatch %d != %jd", "softdep_write_inodeblock", - (intmax_t)adp->ad_lbn, - dp->di_db[adp->ad_lbn], + (intmax_t)adp->ad_offset, + dp->di_db[adp->ad_offset], (intmax_t)adp->ad_newblkno); - if (adp->ad_lbn >= NDADDR && - dp->di_ib[adp->ad_lbn - NDADDR] != adp->ad_newblkno) + if (adp->ad_offset >= NDADDR && + dp->di_ib[adp->ad_offset - NDADDR] != adp->ad_newblkno) panic("%s: indirect pointer #%jd mismatch %d != %jd", "softdep_write_inodeblock", - (intmax_t)adp->ad_lbn - NDADDR, - dp->di_ib[adp->ad_lbn - NDADDR], + (intmax_t)adp->ad_offset - NDADDR, + dp->di_ib[adp->ad_offset - NDADDR], (intmax_t)adp->ad_newblkno); - deplist |= 1 << adp->ad_lbn; + deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) panic("softdep_write_inodeblock: Unknown state 0x%x", adp->ad_state); @@ -3981,14 +6759,14 @@ initiate_write_inodeblock_ufs1(inodedep, bp) */ for (lastadp = NULL, adp = TAILQ_FIRST(&inodedep->id_inoupdt); adp; lastadp = adp, adp = TAILQ_NEXT(adp, ad_next)) { - if (adp->ad_lbn >= NDADDR) + if (adp->ad_offset >= NDADDR) break; - dp->di_db[adp->ad_lbn] = adp->ad_oldblkno; + dp->di_db[adp->ad_offset] = adp->ad_oldblkno; /* keep going until hitting a rollback to a frag */ if (adp->ad_oldsize == 0 || adp->ad_oldsize == fs->fs_bsize) continue; - dp->di_size = fs->fs_bsize * adp->ad_lbn + adp->ad_oldsize; - for (i = adp->ad_lbn + 1; i < NDADDR; i++) { + dp->di_size = fs->fs_bsize * adp->ad_offset + adp->ad_oldsize; + for (i = adp->ad_offset + 1; i < NDADDR; i++) { #ifdef INVARIANTS if (dp->di_db[i] != 0 && (deplist & (1 << i)) == 0) panic("softdep_write_inodeblock: lost dep1"); @@ -4012,8 +6790,8 @@ initiate_write_inodeblock_ufs1(inodedep, bp) * we already checked for fragments in the loop above. */ if (lastadp != NULL && - dp->di_size <= (lastadp->ad_lbn + 1) * fs->fs_bsize) { - for (i = lastadp->ad_lbn; i >= 0; i--) + dp->di_size <= (lastadp->ad_offset + 1) * fs->fs_bsize) { + for (i = lastadp->ad_offset; i >= 0; i--) if (dp->di_db[i] != 0) break; dp->di_size = (i + 1) * fs->fs_bsize; @@ -4030,7 +6808,7 @@ initiate_write_inodeblock_ufs1(inodedep, bp) * postpone fsck, we are stuck with this argument. */ for (; adp; adp = TAILQ_NEXT(adp, ad_next)) - dp->di_ib[adp->ad_lbn - NDADDR] = 0; + dp->di_ib[adp->ad_offset - NDADDR] = 0; } /* @@ -4051,6 +6829,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp) struct allocdirect *adp, *lastadp; struct ufs2_dinode *dp; struct ufs2_dinode *sip; + struct jaddref *jaddref; struct fs *fs; ufs_lbn_t i; #ifdef INVARIANTS @@ -4087,24 +6866,33 @@ initiate_write_inodeblock_ufs2(inodedep, bp) inodedep->id_savedsize = dp->di_size; inodedep->id_savedextsize = dp->di_extsize; if (TAILQ_EMPTY(&inodedep->id_inoupdt) && - TAILQ_EMPTY(&inodedep->id_extupdt)) + TAILQ_EMPTY(&inodedep->id_extupdt) && + LIST_EMPTY(&inodedep->id_jaddrefhd)) return; /* + * Revert the link count for every jaddref present. + */ + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) { + dp->di_nlink--; + jaddref->ja_state &= ~ATTACHED; + jaddref->ja_state |= UNDONE; + } + /* * Set the ext data dependencies to busy. */ for (deplist = 0, adp = TAILQ_FIRST(&inodedep->id_extupdt); adp; adp = TAILQ_NEXT(adp, ad_next)) { #ifdef INVARIANTS - if (deplist != 0 && prevlbn >= adp->ad_lbn) + if (deplist != 0 && prevlbn >= adp->ad_offset) panic("softdep_write_inodeblock: lbn order"); - prevlbn = adp->ad_lbn; - if (dp->di_extb[adp->ad_lbn] != adp->ad_newblkno) + prevlbn = adp->ad_offset; + if (dp->di_extb[adp->ad_offset] != adp->ad_newblkno) panic("%s: direct pointer #%jd mismatch %jd != %jd", "softdep_write_inodeblock", - (intmax_t)adp->ad_lbn, - (intmax_t)dp->di_extb[adp->ad_lbn], + (intmax_t)adp->ad_offset, + (intmax_t)dp->di_extb[adp->ad_offset], (intmax_t)adp->ad_newblkno); - deplist |= 1 << adp->ad_lbn; + deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) panic("softdep_write_inodeblock: Unknown state 0x%x", adp->ad_state); @@ -4120,12 +6908,12 @@ initiate_write_inodeblock_ufs2(inodedep, bp) */ for (lastadp = NULL, adp = TAILQ_FIRST(&inodedep->id_extupdt); adp; lastadp = adp, adp = TAILQ_NEXT(adp, ad_next)) { - dp->di_extb[adp->ad_lbn] = adp->ad_oldblkno; + dp->di_extb[adp->ad_offset] = adp->ad_oldblkno; /* keep going until hitting a rollback to a frag */ if (adp->ad_oldsize == 0 || adp->ad_oldsize == fs->fs_bsize) continue; - dp->di_extsize = fs->fs_bsize * adp->ad_lbn + adp->ad_oldsize; - for (i = adp->ad_lbn + 1; i < NXADDR; i++) { + dp->di_extsize = fs->fs_bsize * adp->ad_offset + adp->ad_oldsize; + for (i = adp->ad_offset + 1; i < NXADDR; i++) { #ifdef INVARIANTS if (dp->di_extb[i] != 0 && (deplist & (1 << i)) == 0) panic("softdep_write_inodeblock: lost dep1"); @@ -4142,8 +6930,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp) * we already checked for fragments in the loop above. */ if (lastadp != NULL && - dp->di_extsize <= (lastadp->ad_lbn + 1) * fs->fs_bsize) { - for (i = lastadp->ad_lbn; i >= 0; i--) + dp->di_extsize <= (lastadp->ad_offset + 1) * fs->fs_bsize) { + for (i = lastadp->ad_offset; i >= 0; i--) if (dp->di_extb[i] != 0) break; dp->di_extsize = (i + 1) * fs->fs_bsize; @@ -4154,24 +6942,24 @@ initiate_write_inodeblock_ufs2(inodedep, bp) for (deplist = 0, adp = TAILQ_FIRST(&inodedep->id_inoupdt); adp; adp = TAILQ_NEXT(adp, ad_next)) { #ifdef INVARIANTS - if (deplist != 0 && prevlbn >= adp->ad_lbn) + if (deplist != 0 && prevlbn >= adp->ad_offset) panic("softdep_write_inodeblock: lbn order"); - prevlbn = adp->ad_lbn; - if (adp->ad_lbn < NDADDR && - dp->di_db[adp->ad_lbn] != adp->ad_newblkno) + prevlbn = adp->ad_offset; + if (adp->ad_offset < NDADDR && + dp->di_db[adp->ad_offset] != adp->ad_newblkno) panic("%s: direct pointer #%jd mismatch %jd != %jd", "softdep_write_inodeblock", - (intmax_t)adp->ad_lbn, - (intmax_t)dp->di_db[adp->ad_lbn], + (intmax_t)adp->ad_offset, + (intmax_t)dp->di_db[adp->ad_offset], (intmax_t)adp->ad_newblkno); - if (adp->ad_lbn >= NDADDR && - dp->di_ib[adp->ad_lbn - NDADDR] != adp->ad_newblkno) + if (adp->ad_offset >= NDADDR && + dp->di_ib[adp->ad_offset - NDADDR] != adp->ad_newblkno) panic("%s indirect pointer #%jd mismatch %jd != %jd", "softdep_write_inodeblock:", - (intmax_t)adp->ad_lbn - NDADDR, - (intmax_t)dp->di_ib[adp->ad_lbn - NDADDR], + (intmax_t)adp->ad_offset - NDADDR, + (intmax_t)dp->di_ib[adp->ad_offset - NDADDR], (intmax_t)adp->ad_newblkno); - deplist |= 1 << adp->ad_lbn; + deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) panic("softdep_write_inodeblock: Unknown state 0x%x", adp->ad_state); @@ -4187,14 +6975,14 @@ initiate_write_inodeblock_ufs2(inodedep, bp) */ for (lastadp = NULL, adp = TAILQ_FIRST(&inodedep->id_inoupdt); adp; lastadp = adp, adp = TAILQ_NEXT(adp, ad_next)) { - if (adp->ad_lbn >= NDADDR) + if (adp->ad_offset >= NDADDR) break; - dp->di_db[adp->ad_lbn] = adp->ad_oldblkno; + dp->di_db[adp->ad_offset] = adp->ad_oldblkno; /* keep going until hitting a rollback to a frag */ if (adp->ad_oldsize == 0 || adp->ad_oldsize == fs->fs_bsize) continue; - dp->di_size = fs->fs_bsize * adp->ad_lbn + adp->ad_oldsize; - for (i = adp->ad_lbn + 1; i < NDADDR; i++) { + dp->di_size = fs->fs_bsize * adp->ad_offset + adp->ad_oldsize; + for (i = adp->ad_offset + 1; i < NDADDR; i++) { #ifdef INVARIANTS if (dp->di_db[i] != 0 && (deplist & (1 << i)) == 0) panic("softdep_write_inodeblock: lost dep2"); @@ -4218,8 +7006,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp) * we already checked for fragments in the loop above. */ if (lastadp != NULL && - dp->di_size <= (lastadp->ad_lbn + 1) * fs->fs_bsize) { - for (i = lastadp->ad_lbn; i >= 0; i--) + dp->di_size <= (lastadp->ad_offset + 1) * fs->fs_bsize) { + for (i = lastadp->ad_offset; i >= 0; i--) if (dp->di_db[i] != 0) break; dp->di_size = (i + 1) * fs->fs_bsize; @@ -4236,16 +7024,285 @@ initiate_write_inodeblock_ufs2(inodedep, bp) * postpone fsck, we are stuck with this argument. */ for (; adp; adp = TAILQ_NEXT(adp, ad_next)) - dp->di_ib[adp->ad_lbn - NDADDR] = 0; + dp->di_ib[adp->ad_offset - NDADDR] = 0; } +static void +free_indirdep(indirdep) + struct indirdep *indirdep; +{ + + KASSERT(LIST_EMPTY(&indirdep->ir_jwork), + ("free_indirdep: Journal work not empty.")); + if (indirdep->ir_state & ONWORKLIST) + WORKLIST_REMOVE(&indirdep->ir_list); + WORKITEM_FREE(indirdep, D_INDIRDEP); +} + +static void +initiate_write_indirdep(indirdep, bp) + struct indirdep *indirdep; + struct buf *bp; +{ + + if (indirdep->ir_state & GOINGAWAY) + panic("disk_io_initiation: indirdep gone"); + + /* + * If there are no remaining dependencies, this will be writing + * the real pointers. + */ + if (LIST_EMPTY(&indirdep->ir_deplisthd)) + return; + /* + * Replace up-to-date version with safe version. + */ + FREE_LOCK(&lk); + indirdep->ir_saveddata = malloc(bp->b_bcount, M_INDIRDEP, + M_SOFTDEP_FLAGS); + ACQUIRE_LOCK(&lk); + indirdep->ir_state &= ~ATTACHED; + indirdep->ir_state |= UNDONE; + bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount); + bcopy(indirdep->ir_savebp->b_data, bp->b_data, + bp->b_bcount); +} + /* + * Called when an inode has been cleared in a cg bitmap. This finally + * eliminates any canceled jaddrefs + */ +void +softdep_setup_inofree(mp, bp, ino, wkhd) + struct mount *mp; + struct buf *bp; + ino_t ino; + struct workhead *wkhd; +{ + struct worklist *wk, *wkn; + struct bmsafemap *bmsafemap; + struct inodedep *inodedep; + uint8_t *inosused; + struct cg *cgp; + struct fs *fs; + + ACQUIRE_LOCK(&lk); + fs = VFSTOUFS(mp)->um_fs; + bmsafemap = bmsafemap_lookup(mp, bp, ino_to_cg(fs, ino)); + cgp = (struct cg *)bp->b_data; + inosused = cg_inosused(cgp); + if (isset(inosused, ino % fs->fs_ipg)) + panic("softdep_setup_inofree: inode %d not freed.", ino); + if (inodedep_lookup(mp, ino, 0, &inodedep)) + panic("softdep_setup_inofree: ino %d has existing inodedep %p", + ino, inodedep); + if (wkhd) { /* XXX Temporary. */ + LIST_FOREACH_SAFE(wk, wkhd, wk_list, wkn) { + if (wk->wk_type != D_JADDREF) + continue; + WORKLIST_REMOVE(wk); + /* + * We can free immediately even if the jaddref isn't attached + * in a background write as now the bitmaps are reconciled. + */ + wk->wk_state |= COMPLETE | ATTACHED; + free_jaddref(WK_JADDREF(wk)); + } + } + FREE_LOCK(&lk); +} + + +/* + * Called via ffs_blkfree() after a set of frags has been cleared from a cg + * map. Any dependencies waiting for the write to clear are added to the + * buf's list and any jnewblks that are being canceled are discarded + * immediately. + */ +void +softdep_setup_blkfree(mp, bp, blkno, frags, wkhd) + struct mount *mp; + struct buf *bp; + ufs2_daddr_t blkno; + int frags; + struct workhead *wkhd; +{ + struct bmsafemap *bmsafemap; + struct jnewblk *jnewblk; + struct worklist *wk, *wkn; + uint8_t *blksfree; + struct cg *cgp; + struct fs *fs; + ufs2_daddr_t jstart; + ufs2_daddr_t jend; + ufs2_daddr_t end; + long bno; + int i; + + ACQUIRE_LOCK(&lk); + fs = VFSTOUFS(mp)->um_fs; + bmsafemap = bmsafemap_lookup(mp, bp, dtog(fs, blkno)); + + /* + * Detach any jnewblks which have been canceled. They must linger + * until the bitmap is cleared again by ffs_blkfree() to prevent + * an unjournaled allocation from hitting the disk. + */ + if (wkhd) { /* XXX Should be temporary. */ + LIST_FOREACH_SAFE(wk, wkhd, wk_list, wkn) { + if (wk->wk_type != D_JNEWBLK) + continue; + jnewblk = WK_JNEWBLK(wk); + KASSERT(jnewblk->jn_state & GOINGAWAY, + ("softdep_setup_blkfree: Freed jnewblk not going away.")); + WORKLIST_REMOVE(wk); + /* + * Assert that this block is free in the bitmap before we + * discard the jnewblk. + */ + cgp = (struct cg *)bp->b_data; + blksfree = cg_blksfree(cgp); + bno = dtogd(fs, jnewblk->jn_blkno); + for (i = jnewblk->jn_oldfrags; i < jnewblk->jn_frags; i++) + if (isclr(blksfree, bno + i)) + panic("softdep_setup_blkfree: %jd - %jd(%jd) not free", + blkno, jnewblk->jn_blkno, jnewblk->jn_lbn); + /* + * Even if it's not attached we can free immediately as the + * new bitmap is correct. + */ + wk->wk_state |= COMPLETE | ATTACHED; + free_jnewblk(jnewblk); + } + /* + * The buf must be locked by the caller otherwise these could be + * added while it's being written and the write would complete + * them before they made it to disk. + */ + jwork_move(&bp->b_dep, wkhd); + } + /* + * Assert that we are not freeing a block which has an outstanding + * allocation dependency. + */ + fs = VFSTOUFS(bmsafemap->sm_list.wk_mp)->um_fs; + end = blkno + frags; + LIST_FOREACH(jnewblk, &bmsafemap->sm_jnewblkhd, jn_deps) { + /* + * Don't match against blocks that will be freed when the + * background write is done. + */ + if ((jnewblk->jn_state & (ATTACHED | COMPLETE | DEPCOMPLETE)) == + (COMPLETE | DEPCOMPLETE)) + continue; + jstart = jnewblk->jn_blkno + jnewblk->jn_oldfrags; + jend = jnewblk->jn_blkno + jnewblk->jn_frags; + if ((blkno >= jstart && blkno < jend) || + (end > jstart && end <= jend)) { + printf("state 0x%X %jd - %d %d dep %p\n", + jnewblk->jn_state, jnewblk->jn_blkno, + jnewblk->jn_oldfrags, jnewblk->jn_frags, + jnewblk->jn_newblk); + panic("softdep_setup_blkfree: " + "%jd-%jd(%d) overlaps with %jd-%jd", + blkno, end, frags, jstart, jend); + } + } + FREE_LOCK(&lk); +} + +static void +initiate_write_bmsafemap(bmsafemap, bp) + struct bmsafemap *bmsafemap; + struct buf *bp; /* The cg block. */ +{ + struct jaddref *jaddref; + struct jnewblk *jnewblk; + uint8_t *inosused; + uint8_t *blksfree; + struct cg *cgp; + struct fs *fs; + int cleared; + ino_t ino; + long bno; + int i; + + if (bmsafemap->sm_state & IOSTARTED) + panic("initiate_write_bmsafemap: Already started\n"); + bmsafemap->sm_state |= IOSTARTED; + /* + * Clear any inode allocations which are pending journal writes. + */ + if (LIST_FIRST(&bmsafemap->sm_jaddrefhd) != NULL) { + cgp = (struct cg *)bp->b_data; + fs = VFSTOUFS(bmsafemap->sm_list.wk_mp)->um_fs; + inosused = cg_inosused(cgp); + LIST_FOREACH(jaddref, &bmsafemap->sm_jaddrefhd, ja_bmdeps) { + ino = jaddref->ja_ino % fs->fs_ipg; + /* + * If this is a background copy the inode may not + * be marked used yet. + */ + if (isset(inosused, ino)) { + if ((jaddref->ja_mode & IFMT) == IFDIR) + cgp->cg_cs.cs_ndir--; + cgp->cg_cs.cs_nifree++; + clrbit(inosused, ino); + jaddref->ja_state &= ~ATTACHED; + jaddref->ja_state |= UNDONE; + } else if ((bp->b_xflags & BX_BKGRDMARKER) == 0) + panic("initiate_write_bmsafemap: inode %d " + "marked free", jaddref->ja_ino); + } + } + /* + * Clear any block allocations which are pending journal writes. + */ + if (LIST_FIRST(&bmsafemap->sm_jnewblkhd) != NULL) { + cgp = (struct cg *)bp->b_data; + fs = VFSTOUFS(bmsafemap->sm_list.wk_mp)->um_fs; + blksfree = cg_blksfree(cgp); + LIST_FOREACH(jnewblk, &bmsafemap->sm_jnewblkhd, jn_deps) { + bno = dtogd(fs, jnewblk->jn_blkno); + cleared = 0; + for (i = jnewblk->jn_oldfrags; i < jnewblk->jn_frags; + i++) { + if (isclr(blksfree, bno + i)) { + cleared = 1; + setbit(blksfree, bno + i); + } + } + /* + * We may not clear the block if it's a background + * copy. In that case there is no reason to detach + * it. + */ + if (cleared) { + jnewblk->jn_state &= ~ATTACHED; + jnewblk->jn_state |= UNDONE; + } else if ((bp->b_xflags & BX_BKGRDMARKER) == 0) + panic("initiate_write_bmsafemap: block %jd " + "marked free", jnewblk->jn_blkno); + } + } + /* + * Move allocation lists to the written lists so they can be + * cleared once the block write is complete. + */ + LIST_SWAP(&bmsafemap->sm_inodedephd, &bmsafemap->sm_inodedepwr, + inodedep, id_deps); + LIST_SWAP(&bmsafemap->sm_newblkhd, &bmsafemap->sm_newblkwr, + newblk, nb_deps); +} + +/* * This routine is called during the completion interrupt * service routine for a disk write (from the procedure called * by the device driver to inform the filesystem caches of * a request completion). It should be called early in this * procedure, before the block is made available to other * processes or other routines are called. + * */ static void softdep_disk_write_complete(bp) @@ -4254,12 +7311,7 @@ softdep_disk_write_complete(bp) struct worklist *wk; struct worklist *owk; struct workhead reattach; - struct newblk *newblk; - struct allocindir *aip; - struct allocdirect *adp; - struct indirdep *indirdep; - struct inodedep *inodedep; - struct bmsafemap *bmsafemap; + struct buf *sbp; /* * If an error occurred while doing the write, then the data @@ -4271,8 +7323,9 @@ softdep_disk_write_complete(bp) /* * This lock must not be released anywhere in this code segment. */ + sbp = NULL; + owk = NULL; ACQUIRE_LOCK(&lk); - owk = NULL; while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) { WORKLIST_REMOVE(wk); if (wk == owk) @@ -4291,33 +7344,8 @@ softdep_disk_write_complete(bp) continue; case D_BMSAFEMAP: - bmsafemap = WK_BMSAFEMAP(wk); - while ((newblk = LIST_FIRST(&bmsafemap->sm_newblkhd))) { - newblk->nb_state |= DEPCOMPLETE; - newblk->nb_bmsafemap = NULL; - LIST_REMOVE(newblk, nb_deps); - } - while ((adp = - LIST_FIRST(&bmsafemap->sm_allocdirecthd))) { - adp->ad_state |= DEPCOMPLETE; - adp->ad_buf = NULL; - LIST_REMOVE(adp, ad_deps); - handle_allocdirect_partdone(adp); - } - while ((aip = - LIST_FIRST(&bmsafemap->sm_allocindirhd))) { - aip->ai_state |= DEPCOMPLETE; - aip->ai_buf = NULL; - LIST_REMOVE(aip, ai_deps); - handle_allocindir_partdone(aip); - } - while ((inodedep = - LIST_FIRST(&bmsafemap->sm_inodedephd)) != NULL) { - inodedep->id_state |= DEPCOMPLETE; - LIST_REMOVE(inodedep, id_deps); - inodedep->id_buf = NULL; - } - WORKITEM_FREE(bmsafemap, D_BMSAFEMAP); + if (handle_written_bmsafemap(WK_BMSAFEMAP(wk), bp)) + WORKLIST_INSERT(&reattach, wk); continue; case D_MKDIR: @@ -4325,37 +7353,42 @@ softdep_disk_write_complete(bp) continue; case D_ALLOCDIRECT: - adp = WK_ALLOCDIRECT(wk); - adp->ad_state |= COMPLETE; - handle_allocdirect_partdone(adp); + wk->wk_state |= COMPLETE; + handle_allocdirect_partdone(WK_ALLOCDIRECT(wk), NULL); continue; case D_ALLOCINDIR: - aip = WK_ALLOCINDIR(wk); - aip->ai_state |= COMPLETE; - handle_allocindir_partdone(aip); + wk->wk_state |= COMPLETE; + handle_allocindir_partdone(WK_ALLOCINDIR(wk)); continue; case D_INDIRDEP: - indirdep = WK_INDIRDEP(wk); - if (indirdep->ir_state & GOINGAWAY) - panic("disk_write_complete: indirdep gone"); - bcopy(indirdep->ir_saveddata, bp->b_data, bp->b_bcount); - free(indirdep->ir_saveddata, M_INDIRDEP); - indirdep->ir_saveddata = 0; - indirdep->ir_state &= ~UNDONE; - indirdep->ir_state |= ATTACHED; - while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != 0) { - handle_allocindir_partdone(aip); - if (aip == LIST_FIRST(&indirdep->ir_donehd)) - panic("disk_write_complete: not gone"); - } - WORKLIST_INSERT(&reattach, wk); - if ((bp->b_flags & B_DELWRI) == 0) - stat_indir_blk_ptrs++; - bdirty(bp); + if (handle_written_indirdep(WK_INDIRDEP(wk), bp, &sbp)) + WORKLIST_INSERT(&reattach, wk); continue; + case D_FREEBLKS: + wk->wk_state |= COMPLETE; + if ((wk->wk_state & ALLCOMPLETE) == ALLCOMPLETE) + add_to_worklist(wk); + continue; + + case D_FREEWORK: + handle_written_freework(WK_FREEWORK(wk)); + break; + + case D_FREEDEP: + free_freedep(WK_FREEDEP(wk)); + continue; + + case D_JSEGDEP: + free_jsegdep(WK_JSEGDEP(wk)); + continue; + + case D_JSEG: + handle_written_jseg(WK_JSEG(wk), bp); + continue; + default: panic("handle_disk_write_complete: Unknown type %s", TYPENAME(wk->wk_type)); @@ -4370,6 +7403,8 @@ softdep_disk_write_complete(bp) WORKLIST_INSERT(&bp->b_dep, wk); } FREE_LOCK(&lk); + if (sbp) + brelse(sbp); } /* @@ -4378,18 +7413,17 @@ softdep_disk_write_complete(bp) * splbio interrupts blocked. */ static void -handle_allocdirect_partdone(adp) +handle_allocdirect_partdone(adp, wkhd) struct allocdirect *adp; /* the completed allocdirect */ + struct workhead *wkhd; /* Work to do when inode is writtne. */ { struct allocdirectlst *listhead; struct allocdirect *listadp; struct inodedep *inodedep; - long bsize, delay; + long bsize; if ((adp->ad_state & ALLCOMPLETE) != ALLCOMPLETE) return; - if (adp->ad_buf != NULL) - panic("handle_allocdirect_partdone: dangling dep"); /* * The on-disk inode cannot claim to be any larger than the last * fragment that has been written. Otherwise, the on-disk inode @@ -4441,23 +7475,27 @@ static void /* * If we have found the just finished dependency, then free * it along with anything that follows it that is complete. - * If the inode still has a bitmap dependency, then it has - * never been written to disk, hence the on-disk inode cannot - * reference the old fragment so we can free it without delay. + * If the inode is not ALLCOMPLETE the pointer may not yet + * be written. Place the allocdirect on the bufwait to + * be freed when we're sure it is reachable on disk. */ - delay = (inodedep->id_state & DEPCOMPLETE); + if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE) + wkhd = &inodedep->id_bufwait; for (; adp; adp = listadp) { listadp = TAILQ_NEXT(adp, ad_next); if ((adp->ad_state & ALLCOMPLETE) != ALLCOMPLETE) return; - free_allocdirect(listhead, adp, delay); + TAILQ_REMOVE(listhead, adp, ad_next); + if (wkhd) + WORKLIST_INSERT(wkhd, &adp->ad_block.nb_list); + else + free_newblk(&adp->ad_block); } } /* - * Called from within softdep_disk_write_complete above. Note that - * this routine is always called from interrupt level with further - * splbio interrupts blocked. + * Called from within softdep_disk_write_complete above. This routine + * completes successfully written allocindirs. */ static void handle_allocindir_partdone(aip) @@ -4467,11 +7505,9 @@ handle_allocindir_partdone(aip) if ((aip->ai_state & ALLCOMPLETE) != ALLCOMPLETE) return; - if (aip->ai_buf != NULL) - panic("handle_allocindir_partdone: dangling dependency"); indirdep = aip->ai_indirdep; + LIST_REMOVE(aip, ai_next); if (indirdep->ir_state & UNDONE) { - LIST_REMOVE(aip, ai_next); LIST_INSERT_HEAD(&indirdep->ir_donehd, aip, ai_next); return; } @@ -4481,12 +7517,120 @@ handle_allocindir_partdone(aip) else ((ufs2_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = aip->ai_newblkno; - LIST_REMOVE(aip, ai_next); - if (aip->ai_freefrag != NULL) - add_to_worklist(&aip->ai_freefrag->ff_list); - WORKITEM_FREE(aip, D_ALLOCINDIR); + /* + * Await the pointer write before freeing the allocindir. + */ + LIST_INSERT_HEAD(&indirdep->ir_writehd, aip, ai_next); } +static void +handle_jwork(wkhd) + struct workhead *wkhd; +{ + struct worklist *wk; + + while ((wk = LIST_FIRST(wkhd)) != NULL) { + WORKLIST_REMOVE(wk); + switch (wk->wk_type) { + case D_JSEGDEP: + free_jsegdep(WK_JSEGDEP(wk)); + continue; + default: + panic("handle_jwork: Unknown type %s\n", + TYPENAME(wk->wk_type)); + } + } +} + +static struct freefile * +handle_bufwait(inodedep, refhd) + struct inodedep *inodedep; + struct workhead *refhd; +{ + struct jaddref *jaddref; + struct freefile *freefile; + struct worklist *wk; + + freefile = NULL; + while ((wk = LIST_FIRST(&inodedep->id_bufwait)) != NULL) { + WORKLIST_REMOVE(wk); + switch (wk->wk_type) { + case D_FREEFILE: + /* + * We defer adding freefile to the worklist + * until all other additions have been made to + * ensure that it will be done after all the + * old blocks have been freed. + */ + if (freefile != NULL) + panic("handle_bufwait: freefile"); + freefile = WK_FREEFILE(wk); + continue; + + case D_MKDIR: + handle_written_mkdir(WK_MKDIR(wk), MKDIR_PARENT); + continue; + + case D_DIRADD: + diradd_inode_written(WK_DIRADD(wk), inodedep); + continue; + + case D_FREEFRAG: + wk->wk_state |= COMPLETE; + if ((wk->wk_state & ALLCOMPLETE) != ALLCOMPLETE) + continue; + add_to_worklist(wk); + continue; + + case D_DIRREM: + wk->wk_state |= COMPLETE; + add_to_worklist(wk); + continue; + + case D_ALLOCDIRECT: + case D_ALLOCINDIR: + free_newblk(WK_NEWBLK(wk)); + continue; + + case D_JSEGDEP: + free_jsegdep(WK_JSEGDEP(wk)); + continue; + + case D_JADDREF: + jaddref = WK_JADDREF(wk); + /* + * We have to remove this journal entry from the + * inode's list as soon as it's written so the + * inodedep can be freed. + */ + if (jaddref->ja_state & ONDEPLIST) { + jaddref->ja_state &= ~ONDEPLIST; + LIST_REMOVE(jaddref, ja_inodeps); + } + /* + * Transfer any jaddrefs to the list to be freed with + * the bitmap if we're handling a removed file. + */ + if (refhd == NULL) { + wk->wk_state |= COMPLETE; + free_jaddref(jaddref); + } else + WORKLIST_INSERT(refhd, wk); + continue; + + case D_JNEWBLK: + wk->wk_state |= COMPLETE; + free_jnewblk(WK_JNEWBLK(wk)); + continue; + + default: + panic("handle_bufwait: Unknown type %p(%s)", + wk, TYPENAME(wk->wk_type)); + /* NOTREACHED */ + } + } + return (freefile); +} /* * Called from within softdep_disk_write_complete above to restore * in-memory inode block contents to their most up-to-date state. Note @@ -4498,12 +7642,16 @@ handle_written_inodeblock(inodedep, bp) struct inodedep *inodedep; struct buf *bp; /* buffer containing the inode block */ { - struct worklist *wk, *filefree; + struct freefile *freefile; struct allocdirect *adp, *nextadp; struct ufs1_dinode *dp1 = NULL; struct ufs2_dinode *dp2 = NULL; + struct jaddref *jaddref, *tmp; + struct workhead wkhd; int hadchanges, fstype; + LIST_INIT(&wkhd); + hadchanges = 0; if ((inodedep->id_state & IOSTARTED) == 0) panic("handle_written_inodeblock: not started"); inodedep->id_state &= ~IOSTARTED; @@ -4524,6 +7672,7 @@ handle_written_inodeblock(inodedep, bp) * corresponding updates written to disk. */ if (inodedep->id_savedino1 != NULL) { + hadchanges = 1; if (fstype == UFS1) *dp1 = *inodedep->id_savedino1; else @@ -4533,6 +7682,17 @@ handle_written_inodeblock(inodedep, bp) if ((bp->b_flags & B_DELWRI) == 0) stat_inode_bitmap++; bdirty(bp); + /* + * If the inode is clear here and GOINGAWAY it will never + * be written. Process the bufwait to find the freefile + * and add it to the worklist. The state is altered so + * free_inodedep() will succeed. The DEPCOMPLETE is + * otherwise never visible. + */ + if (inodedep->id_state & GOINGAWAY) { + inodedep->id_state |= COMPLETE | DEPCOMPLETE; + goto bufwait; + } return (1); } inodedep->id_state |= COMPLETE; @@ -4540,50 +7700,64 @@ handle_written_inodeblock(inodedep, bp) * Roll forward anything that had to be rolled back before * the inode could be updated. */ - hadchanges = 0; + /* + * Restore the link count for every jaddref present. + */ + LIST_FOREACH_SAFE(jaddref, &inodedep->id_jaddrefhd, ja_inodeps, tmp) { + hadchanges = 1; + if ((jaddref->ja_state & UNDONE) == 0) + continue; + if (fstype == UFS1) + dp1->di_nlink++; + else + dp2->di_nlink++; + jaddref->ja_state &= ~UNDONE; + jaddref->ja_state |= ATTACHED; + free_jaddref(jaddref); + } for (adp = TAILQ_FIRST(&inodedep->id_inoupdt); adp; adp = nextadp) { nextadp = TAILQ_NEXT(adp, ad_next); if (adp->ad_state & ATTACHED) panic("handle_written_inodeblock: new entry"); if (fstype == UFS1) { - if (adp->ad_lbn < NDADDR) { - if (dp1->di_db[adp->ad_lbn]!=adp->ad_oldblkno) + if (adp->ad_offset < NDADDR) { + if (dp1->di_db[adp->ad_offset]!=adp->ad_oldblkno) panic("%s %s #%jd mismatch %d != %jd", "handle_written_inodeblock:", "direct pointer", - (intmax_t)adp->ad_lbn, - dp1->di_db[adp->ad_lbn], + (intmax_t)adp->ad_offset, + dp1->di_db[adp->ad_offset], (intmax_t)adp->ad_oldblkno); - dp1->di_db[adp->ad_lbn] = adp->ad_newblkno; + dp1->di_db[adp->ad_offset] = adp->ad_newblkno; } else { - if (dp1->di_ib[adp->ad_lbn - NDADDR] != 0) + if (dp1->di_ib[adp->ad_offset - NDADDR] != 0) panic("%s: %s #%jd allocated as %d", "handle_written_inodeblock", "indirect pointer", - (intmax_t)adp->ad_lbn - NDADDR, - dp1->di_ib[adp->ad_lbn - NDADDR]); - dp1->di_ib[adp->ad_lbn - NDADDR] = + (intmax_t)adp->ad_offset - NDADDR, + dp1->di_ib[adp->ad_offset - NDADDR]); + dp1->di_ib[adp->ad_offset - NDADDR] = adp->ad_newblkno; } } else { - if (adp->ad_lbn < NDADDR) { - if (dp2->di_db[adp->ad_lbn]!=adp->ad_oldblkno) + if (adp->ad_offset < NDADDR) { + if (dp2->di_db[adp->ad_offset]!=adp->ad_oldblkno) panic("%s: %s #%jd %s %jd != %jd", "handle_written_inodeblock", "direct pointer", - (intmax_t)adp->ad_lbn, "mismatch", - (intmax_t)dp2->di_db[adp->ad_lbn], + (intmax_t)adp->ad_offset, "mismatch", + (intmax_t)dp2->di_db[adp->ad_offset], (intmax_t)adp->ad_oldblkno); - dp2->di_db[adp->ad_lbn] = adp->ad_newblkno; + dp2->di_db[adp->ad_offset] = adp->ad_newblkno; } else { - if (dp2->di_ib[adp->ad_lbn - NDADDR] != 0) + if (dp2->di_ib[adp->ad_offset - NDADDR] != 0) panic("%s: %s #%jd allocated as %jd", "handle_written_inodeblock", "indirect pointer", - (intmax_t)adp->ad_lbn - NDADDR, + (intmax_t)adp->ad_offset - NDADDR, (intmax_t) - dp2->di_ib[adp->ad_lbn - NDADDR]); - dp2->di_ib[adp->ad_lbn - NDADDR] = + dp2->di_ib[adp->ad_offset - NDADDR]); + dp2->di_ib[adp->ad_offset - NDADDR] = adp->ad_newblkno; } } @@ -4595,13 +7769,13 @@ handle_written_inodeblock(inodedep, bp) nextadp = TAILQ_NEXT(adp, ad_next); if (adp->ad_state & ATTACHED) panic("handle_written_inodeblock: new entry"); - if (dp2->di_extb[adp->ad_lbn] != adp->ad_oldblkno) + if (dp2->di_extb[adp->ad_offset] != adp->ad_oldblkno) panic("%s: direct pointers #%jd %s %jd != %jd", "handle_written_inodeblock", - (intmax_t)adp->ad_lbn, "mismatch", - (intmax_t)dp2->di_extb[adp->ad_lbn], + (intmax_t)adp->ad_offset, "mismatch", + (intmax_t)dp2->di_extb[adp->ad_offset], (intmax_t)adp->ad_oldblkno); - dp2->di_extb[adp->ad_lbn] = adp->ad_newblkno; + dp2->di_extb[adp->ad_offset] = adp->ad_newblkno; adp->ad_state &= ~UNDONE; adp->ad_state |= ATTACHED; hadchanges = 1; @@ -4641,9 +7815,9 @@ handle_written_inodeblock(inodedep, bp) * Process any allocdirects that completed during the update. */ if ((adp = TAILQ_FIRST(&inodedep->id_inoupdt)) != NULL) - handle_allocdirect_partdone(adp); + handle_allocdirect_partdone(adp, &wkhd); if ((adp = TAILQ_FIRST(&inodedep->id_extupdt)) != NULL) - handle_allocdirect_partdone(adp); + handle_allocdirect_partdone(adp, &wkhd); /* * Process deallocations that were held pending until the * inode had been written to disk. Freeing of the inode @@ -4651,55 +7825,25 @@ handle_written_inodeblock(inodedep, bp) * avoid creation of new triples * before the old ones have been deleted. */ - filefree = NULL; - while ((wk = LIST_FIRST(&inodedep->id_bufwait)) != NULL) { - WORKLIST_REMOVE(wk); - switch (wk->wk_type) { +bufwait: + freefile = handle_bufwait(inodedep, NULL); + if (freefile && !LIST_EMPTY(&wkhd)) { + WORKLIST_INSERT(&wkhd, &freefile->fx_list); + freefile = NULL; + } + /* + * Move rolled forward dependency completions to the bufwait list + * now that those that were already written have been processed. + */ + if (!LIST_EMPTY(&wkhd) && hadchanges == 0) + panic("handle_written_inodeblock: bufwait but no changes"); + jwork_move(&inodedep->id_bufwait, &wkhd); - case D_FREEFILE: - /* - * We defer adding filefree to the worklist until - * all other additions have been made to ensure - * that it will be done after all the old blocks - * have been freed. - */ - if (filefree != NULL) - panic("handle_written_inodeblock: filefree"); - filefree = wk; - continue; - - case D_MKDIR: - handle_written_mkdir(WK_MKDIR(wk), MKDIR_PARENT); - continue; - - case D_DIRADD: - diradd_inode_written(WK_DIRADD(wk), inodedep); - continue; - - case D_FREEBLKS: - wk->wk_state |= COMPLETE; - if ((wk->wk_state & ALLCOMPLETE) != ALLCOMPLETE) - continue; - /* -- fall through -- */ - case D_FREEFRAG: - case D_DIRREM: - add_to_worklist(wk); - continue; - - case D_NEWDIRBLK: - free_newdirblk(WK_NEWDIRBLK(wk)); - continue; - - default: - panic("handle_written_inodeblock: Unknown type %s", - TYPENAME(wk->wk_type)); - /* NOTREACHED */ - } - } - if (filefree != NULL) { + if (freefile != NULL) { if (free_inodedep(inodedep) == 0) - panic("handle_written_inodeblock: live inodedep"); - add_to_worklist(filefree); + panic("handle_written_inodeblock: live inodedep %p", + inodedep); + add_to_worklist(&freefile->fx_list); return (0); } @@ -4707,12 +7851,85 @@ handle_written_inodeblock(inodedep, bp) * If no outstanding dependencies, free it. */ if (free_inodedep(inodedep) || - (TAILQ_FIRST(&inodedep->id_inoupdt) == 0 && - TAILQ_FIRST(&inodedep->id_extupdt) == 0)) + (LIST_FIRST(&inodedep->id_jaddrefhd) == 0 && + TAILQ_FIRST(&inodedep->id_inoupdt) == 0 && + TAILQ_FIRST(&inodedep->id_extupdt) == 0 && + LIST_FIRST(&inodedep->id_bufwait) == 0)) return (0); return (hadchanges); } +static int +handle_written_indirdep(indirdep, bp, bpp) + struct indirdep *indirdep; + struct buf *bp; + struct buf **bpp; +{ + struct allocindir *aip; + int chgs; + + if (indirdep->ir_state & GOINGAWAY) + panic("disk_write_complete: indirdep gone"); + chgs = 0; + /* + * If there were rollbacks revert them here. + */ + if (indirdep->ir_saveddata) { + bcopy(indirdep->ir_saveddata, bp->b_data, bp->b_bcount); + free(indirdep->ir_saveddata, M_INDIRDEP); + indirdep->ir_saveddata = 0; + chgs = 1; + } + indirdep->ir_state &= ~UNDONE; + indirdep->ir_state |= ATTACHED; + /* + * Move allocindirs with written pointers to the completehd if + * the the indirdep's pointer is not yet written. Otherwise + * free them here. + */ + while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != 0) { + LIST_REMOVE(aip, ai_next); + if ((indirdep->ir_state & DEPCOMPLETE) == 0) { + LIST_INSERT_HEAD(&indirdep->ir_completehd, aip, + ai_next); + continue; + } + free_newblk(&aip->ai_block); + } + /* + * Move allocindirs that have finished dependency processing from + * the done list to the write list after updating the pointers. + */ + while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != 0) { + handle_allocindir_partdone(aip); + if (aip == LIST_FIRST(&indirdep->ir_donehd)) + panic("disk_write_complete: not gone"); + chgs = 1; + } + if ((bp->b_flags & B_DELWRI) == 0) + stat_indir_blk_ptrs++; + if (chgs) + bdirty(bp); + /* + * If there are no fresh dependencies and none waiting on writes + * we can free the indirdep. The caller is responsble for + * releasing sbp when it is safe to do so. + */ + if ((indirdep->ir_state & DEPCOMPLETE) && + LIST_EMPTY(&indirdep->ir_deplisthd) && + LIST_EMPTY(&indirdep->ir_writehd)) { + struct buf *sbp; + sbp = indirdep->ir_savebp; + sbp->b_flags |= B_INVAL | B_NOCACHE; + if (indirdep->ir_state & ONDEPLIST) + LIST_REMOVE(indirdep, ir_next); + free_indirdep(indirdep); + *bpp = sbp; + return (0); + } + return (chgs); +} + /* * Process a diradd entry after its dependent inode has been written. * This routine must be called with splbio interrupts blocked. @@ -4722,50 +7939,179 @@ diradd_inode_written(dap, inodedep) struct diradd *dap; struct inodedep *inodedep; { - struct pagedep *pagedep; dap->da_state |= COMPLETE; - if ((dap->da_state & ALLCOMPLETE) == ALLCOMPLETE) { - if (dap->da_state & DIRCHG) - pagedep = dap->da_previous->dm_pagedep; - else - pagedep = dap->da_pagedep; - LIST_REMOVE(dap, da_pdlist); - LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); - } + complete_diradd(dap); WORKLIST_INSERT(&inodedep->id_pendinghd, &dap->da_list); } /* - * Handle the completion of a mkdir dependency. + * Returns true if the bmsafemap will have rollbacks when written. Must + * only be called with lk and the buf lock on the cg held. */ +static int +bmsafemap_rollbacks(bmsafemap) + struct bmsafemap *bmsafemap; +{ + + return (!LIST_EMPTY(&bmsafemap->sm_jaddrefhd) | + !LIST_EMPTY(&bmsafemap->sm_jnewblkhd)); +} + +/* + * Complete a write to a bmsafemap structure. Roll forward any bitmap + * changes if it's not a background write. Set all written dependencies + * to DEPCOMPLETE and free the structure if possible. + */ +static int +handle_written_bmsafemap(bmsafemap, bp) + struct bmsafemap *bmsafemap; + struct buf *bp; +{ + struct newblk *newblk; + struct inodedep *inodedep; + struct jaddref *jaddref, *jatmp; + struct jnewblk *jnewblk, *jntmp; + uint8_t *inosused; + uint8_t *blksfree; + struct cg *cgp; + struct fs *fs; + ino_t ino; + long bno; + int chgs; + int i; + + if ((bmsafemap->sm_state & IOSTARTED) == 0) + panic("initiate_write_bmsafemap: Not started\n"); + chgs = 0; + bmsafemap->sm_state &= ~IOSTARTED; + /* + * Restore unwritten inode allocation pending jaddref writes. + */ + if (!LIST_EMPTY(&bmsafemap->sm_jaddrefhd)) { + cgp = (struct cg *)bp->b_data; + fs = VFSTOUFS(bmsafemap->sm_list.wk_mp)->um_fs; + inosused = cg_inosused(cgp); + LIST_FOREACH_SAFE(jaddref, &bmsafemap->sm_jaddrefhd, + ja_bmdeps, jatmp) { + if ((jaddref->ja_state & UNDONE) == 0) + continue; + ino = jaddref->ja_ino % fs->fs_ipg; + if (isset(inosused, ino)) + panic("handle_written_bmsafemap: " + "re-allocated inode"); + if ((bp->b_xflags & BX_BKGRDMARKER) == 0) { + if ((jaddref->ja_mode & IFMT) == IFDIR) + cgp->cg_cs.cs_ndir++; + cgp->cg_cs.cs_nifree--; + setbit(inosused, ino); + chgs = 1; + } + jaddref->ja_state &= ~UNDONE; + jaddref->ja_state |= ATTACHED; + free_jaddref(jaddref); + } + } + /* + * Restore any block allocations which are pending journal writes. + */ + if (LIST_FIRST(&bmsafemap->sm_jnewblkhd) != NULL) { + cgp = (struct cg *)bp->b_data; + fs = VFSTOUFS(bmsafemap->sm_list.wk_mp)->um_fs; + blksfree = cg_blksfree(cgp); + LIST_FOREACH_SAFE(jnewblk, &bmsafemap->sm_jnewblkhd, jn_deps, + jntmp) { + if ((jnewblk->jn_state & UNDONE) == 0) + continue; + bno = dtogd(fs, jnewblk->jn_blkno); + for (i = jnewblk->jn_oldfrags; i < jnewblk->jn_frags; + i++) { + if (bp->b_xflags & BX_BKGRDMARKER) + break; + if ((jnewblk->jn_state & NEWBLOCK) == 0 && + isclr(blksfree, bno + i)) + panic("handle_written_bmsafemap: " + "re-allocated fragment"); + clrbit(blksfree, bno + i); + chgs = 1; + } + jnewblk->jn_state &= ~(UNDONE | NEWBLOCK); + jnewblk->jn_state |= ATTACHED; + free_jnewblk(jnewblk); + } + } + while ((newblk = LIST_FIRST(&bmsafemap->sm_newblkwr))) { + newblk->nb_state |= DEPCOMPLETE; + newblk->nb_state &= ~ONDEPLIST; + newblk->nb_bmsafemap = NULL; + LIST_REMOVE(newblk, nb_deps); + if (newblk->nb_list.wk_type == D_ALLOCDIRECT) + handle_allocdirect_partdone( + WK_ALLOCDIRECT(&newblk->nb_list), NULL); + else if (newblk->nb_list.wk_type == D_ALLOCINDIR) + handle_allocindir_partdone( + WK_ALLOCINDIR(&newblk->nb_list)); + else if (newblk->nb_list.wk_type != D_NEWBLK) + panic("handle_written_bmsafemap: Unexpected type: %s", + TYPENAME(newblk->nb_list.wk_type)); + } + while ((inodedep = LIST_FIRST(&bmsafemap->sm_inodedepwr)) != NULL) { + inodedep->id_state |= DEPCOMPLETE; + inodedep->id_state &= ~ONDEPLIST; + LIST_REMOVE(inodedep, id_deps); + inodedep->id_bmsafemap = NULL; + } + if (LIST_EMPTY(&bmsafemap->sm_jaddrefhd) && + LIST_EMPTY(&bmsafemap->sm_jnewblkhd) && + LIST_EMPTY(&bmsafemap->sm_newblkhd) && + LIST_EMPTY(&bmsafemap->sm_inodedephd)) { + if (chgs) + bdirty(bp); + LIST_REMOVE(bmsafemap, sm_hash); + WORKITEM_FREE(bmsafemap, D_BMSAFEMAP); + return (0); + } + bdirty(bp); + return (1); +} + +/* + * Try to free a mkdir dependency. + */ static void -handle_written_mkdir(mkdir, type) +complete_mkdir(mkdir) struct mkdir *mkdir; - int type; { struct diradd *dap; - struct pagedep *pagedep; - if (mkdir->md_state != type) - panic("handle_written_mkdir: bad type"); + if ((mkdir->md_state & ALLCOMPLETE) != ALLCOMPLETE) + return; + LIST_REMOVE(mkdir, md_mkdirs); dap = mkdir->md_diradd; - dap->da_state &= ~type; - if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) == 0) + dap->da_state &= ~(mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)); + if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) == 0) { dap->da_state |= DEPCOMPLETE; - if ((dap->da_state & ALLCOMPLETE) == ALLCOMPLETE) { - if (dap->da_state & DIRCHG) - pagedep = dap->da_previous->dm_pagedep; - else - pagedep = dap->da_pagedep; - LIST_REMOVE(dap, da_pdlist); - LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); + complete_diradd(dap); } - LIST_REMOVE(mkdir, md_mkdirs); WORKITEM_FREE(mkdir, D_MKDIR); } /* + * Handle the completion of a mkdir dependency. + */ +static void +handle_written_mkdir(mkdir, type) + struct mkdir *mkdir; + int type; +{ + + if ((mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)) != type) + panic("handle_written_mkdir: bad type"); + mkdir->md_state |= COMPLETE; + complete_mkdir(mkdir); +} + +/* * Called from within softdep_disk_write_complete above. * A write operation was just completed. Removed inodes can * now be freed and associated block pointers may be committed. @@ -4790,7 +8136,10 @@ handle_written_filepage(pagedep, bp) */ while ((dirrem = LIST_FIRST(&pagedep->pd_dirremhd)) != NULL) { LIST_REMOVE(dirrem, dm_next); + dirrem->dm_state |= COMPLETE; dirrem->dm_dirinum = pagedep->pd_ino; + KASSERT(LIST_EMPTY(&dirrem->dm_jremrefhd), + ("handle_written_filepage: Journal entries not written.")); add_to_worklist(&dirrem->dm_list); } /* @@ -4800,7 +8149,7 @@ handle_written_filepage(pagedep, bp) */ if ((pagedep->pd_state & NEWBLOCK) == 0) while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != NULL) - free_diradd(dap); + free_diradd(dap, NULL); /* * Uncommitted directory entries must be restored. */ @@ -4908,6 +8257,7 @@ softdep_update_inodeblock(ip, bp, waitfor) int waitfor; /* nonzero => update must be allowed */ { struct inodedep *inodedep; + struct jaddref *jaddref; struct worklist *wk; struct mount *mp; struct buf *ibp; @@ -4922,6 +8272,7 @@ softdep_update_inodeblock(ip, bp, waitfor) */ mp = UFSTOVFS(ip->i_ump); ACQUIRE_LOCK(&lk); +again: if (inodedep_lookup(mp, ip->i_number, 0, &inodedep) == 0) { FREE_LOCK(&lk); if (ip->i_effnlink != ip->i_nlink) @@ -4931,6 +8282,17 @@ softdep_update_inodeblock(ip, bp, waitfor) if (inodedep->id_nlinkdelta != ip->i_nlink - ip->i_effnlink) panic("softdep_update_inodeblock: bad delta"); /* + * If we're flushing all dependencies we must also move any waiting + * for journal writes onto the bufwait list prior to I/O. + */ + if (waitfor) + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) { + if (jaddref->ja_state & (GOINGAWAY | COMPLETE)) + continue; + jwait(&jaddref->ja_list); + goto again; + } + /* * Changes have been initiated. Anything depending on these * changes cannot occur until this inode has been written. */ @@ -4945,10 +8307,12 @@ softdep_update_inodeblock(ip, bp, waitfor) */ merge_inode_lists(&inodedep->id_newinoupdt, &inodedep->id_inoupdt); if (!TAILQ_EMPTY(&inodedep->id_inoupdt)) - handle_allocdirect_partdone(TAILQ_FIRST(&inodedep->id_inoupdt)); + handle_allocdirect_partdone(TAILQ_FIRST(&inodedep->id_inoupdt), + NULL); merge_inode_lists(&inodedep->id_newextupdt, &inodedep->id_extupdt); if (!TAILQ_EMPTY(&inodedep->id_extupdt)) - handle_allocdirect_partdone(TAILQ_FIRST(&inodedep->id_extupdt)); + handle_allocdirect_partdone(TAILQ_FIRST(&inodedep->id_extupdt), + NULL); /* * Now that the inode has been pushed into the buffer, the * operations dependent on the inode being written to disk @@ -4975,7 +8339,7 @@ retry: FREE_LOCK(&lk); return; } - ibp = inodedep->id_buf; + ibp = inodedep->id_bmsafemap->sm_buf; ibp = getdirtybuf(ibp, &lk, MNT_WAIT); if (ibp == NULL) { /* @@ -5007,13 +8371,13 @@ merge_inode_lists(newlisthead, oldlisthead) newadp = TAILQ_FIRST(newlisthead); for (listadp = TAILQ_FIRST(oldlisthead); listadp && newadp;) { - if (listadp->ad_lbn < newadp->ad_lbn) { + if (listadp->ad_offset < newadp->ad_offset) { listadp = TAILQ_NEXT(listadp, ad_next); continue; } TAILQ_REMOVE(newlisthead, newadp, ad_next); TAILQ_INSERT_BEFORE(listadp, newadp, ad_next); - if (listadp->ad_lbn == newadp->ad_lbn) { + if (listadp->ad_offset == newadp->ad_offset) { allocdirect_merge(oldlisthead, newadp, listadp); listadp = newadp; @@ -5057,12 +8421,11 @@ softdep_fsync(vp) return (0); } if (!LIST_EMPTY(&inodedep->id_inowait) || - !LIST_EMPTY(&inodedep->id_bufwait) || !TAILQ_EMPTY(&inodedep->id_extupdt) || !TAILQ_EMPTY(&inodedep->id_newextupdt) || !TAILQ_EMPTY(&inodedep->id_inoupdt) || !TAILQ_EMPTY(&inodedep->id_newinoupdt)) - panic("softdep_fsync: pending ops"); + panic("softdep_fsync: pending ops %p", inodedep); for (error = 0, flushparent = 0; ; ) { if ((wk = LIST_FIRST(&inodedep->id_pendinghd)) == NULL) break; @@ -5254,8 +8617,8 @@ int softdep_sync_metadata(struct vnode *vp) { struct pagedep *pagedep; - struct allocdirect *adp; struct allocindir *aip; + struct newblk *newblk; struct buf *bp, *nbp; struct worklist *wk; struct bufobj *bo; @@ -5319,27 +8682,15 @@ loop: switch (wk->wk_type) { case D_ALLOCDIRECT: - adp = WK_ALLOCDIRECT(wk); - if (adp->ad_state & DEPCOMPLETE) - continue; - nbp = adp->ad_buf; - nbp = getdirtybuf(nbp, &lk, waitfor); - if (nbp == NULL) - continue; - FREE_LOCK(&lk); - if (waitfor == MNT_NOWAIT) { - bawrite(nbp); - } else if ((error = bwrite(nbp)) != 0) { - break; + case D_ALLOCINDIR: + newblk = WK_NEWBLK(wk); + if (newblk->nb_jnewblk != NULL) { + jwait(&newblk->nb_jnewblk->jn_list); + goto restart; } - ACQUIRE_LOCK(&lk); - continue; - - case D_ALLOCINDIR: - aip = WK_ALLOCINDIR(wk); - if (aip->ai_state & DEPCOMPLETE) + if (newblk->nb_state & DEPCOMPLETE) continue; - nbp = aip->ai_buf; + nbp = newblk->nb_bmsafemap->sm_buf; nbp = getdirtybuf(nbp, &lk, waitfor); if (nbp == NULL) continue; @@ -5355,10 +8706,16 @@ loop: case D_INDIRDEP: restart: - LIST_FOREACH(aip, &WK_INDIRDEP(wk)->ir_deplisthd, ai_next) { - if (aip->ai_state & DEPCOMPLETE) + LIST_FOREACH(aip, + &WK_INDIRDEP(wk)->ir_deplisthd, ai_next) { + newblk = (struct newblk *)aip; + if (newblk->nb_jnewblk != NULL) { + jwait(&newblk->nb_jnewblk->jn_list); + goto restart; + } + if (newblk->nb_state & DEPCOMPLETE) continue; - nbp = aip->ai_buf; + nbp = newblk->nb_bmsafemap->sm_buf; nbp = getdirtybuf(nbp, &lk, MNT_WAIT); if (nbp == NULL) goto restart; @@ -5489,7 +8846,8 @@ loop: BO_LOCK(bo); drain_output(vp); BO_UNLOCK(bo); - return (0); + return ffs_update(vp, 1); + /* return (0); */ } /* @@ -5502,7 +8860,9 @@ flush_inodedep_deps(mp, ino) ino_t ino; { struct inodedep *inodedep; + struct jaddref *jaddref; int error, waitfor; + int loops = 0; /* * This work is done in two passes. The first pass grabs most @@ -5522,8 +8882,17 @@ flush_inodedep_deps(mp, ino) return (error); FREE_LOCK(&lk); ACQUIRE_LOCK(&lk); +restart: if (inodedep_lookup(mp, ino, 0, &inodedep) == 0) return (0); + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) { + if (jaddref->ja_state & (GOINGAWAY | COMPLETE)) + continue; + if (++loops > 20) + panic("stuck jaddref: %p\n", jaddref); + jwait(&jaddref->ja_list); + goto restart; + } if (flush_deplist(&inodedep->id_inoupdt, waitfor, &error) || flush_deplist(&inodedep->id_newinoupdt, waitfor, &error) || flush_deplist(&inodedep->id_extupdt, waitfor, &error) || @@ -5555,13 +8924,19 @@ flush_deplist(listhead, waitfor, errorp) int *errorp; { struct allocdirect *adp; + struct newblk *newblk; struct buf *bp; mtx_assert(&lk, MA_OWNED); TAILQ_FOREACH(adp, listhead, ad_next) { - if (adp->ad_state & DEPCOMPLETE) + newblk = (struct newblk *)adp; + if (newblk->nb_jnewblk != NULL) { + jwait(&newblk->nb_jnewblk->jn_list); + return (1); + } + if (newblk->nb_state & DEPCOMPLETE) continue; - bp = adp->ad_buf; + bp = newblk->nb_bmsafemap->sm_buf; bp = getdirtybuf(bp, &lk, waitfor); if (bp == NULL) { if (waitfor == MNT_NOWAIT) @@ -5592,6 +8967,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp) struct diraddhd *diraddhdp; { struct inodedep *inodedep; + struct jaddref *jaddref; struct ufsmount *ump; struct diradd *dap; struct vnode *vp; @@ -5602,6 +8978,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp) struct worklist *wk; ump = VFSTOUFS(mp); +restart: while ((dap = LIST_FIRST(diraddhdp)) != NULL) { /* * Flush ourselves if this directory entry @@ -5633,6 +9010,18 @@ flush_pagedep_deps(pvp, mp, diraddhdp) * happen at most once. */ inum = dap->da_newinum; + if (inodedep_lookup(UFSTOVFS(ump), inum, 0, &inodedep) == 0) + panic("flush_pagedep_deps: lost inode1"); + /* + * Wait for any pending journal adds to complete so we don't + * cause rollbacks while syncing. + */ + LIST_FOREACH(jaddref, &inodedep->id_jaddrefhd, ja_inodeps) { + if (jaddref->ja_state & (GOINGAWAY | COMPLETE)) + continue; + jwait(&jaddref->ja_list); + goto restart; + } if (dap->da_state & MKDIR_BODY) { FREE_LOCK(&lk); if ((error = ffs_vgetf(mp, inum, LK_EXCLUSIVE, &vp, @@ -5690,6 +9079,13 @@ flush_pagedep_deps(pvp, mp, diraddhdp) break; } BO_UNLOCK(bo); + /* + * We have to wait for the direct pointers to point + * at the newdirblk before the dependency will go + * away. + */ + if (dap == LIST_FIRST(diraddhdp)) + ffs_update(vp, 1); vput(vp); if (error != 0) break; /* Flushing of first block failed */ @@ -5720,7 +9116,7 @@ retry: * push them to disk. */ if ((inodedep->id_state & DEPCOMPLETE) == 0) { - bp = inodedep->id_buf; + bp = inodedep->id_bmsafemap->sm_buf; bp = getdirtybuf(bp, &lk, MNT_WAIT); if (bp == NULL) goto retry; @@ -5749,8 +9145,11 @@ retry: * If we have failed to get rid of all the dependencies * then something is seriously wrong. */ - if (dap == LIST_FIRST(diraddhdp)) - panic("flush_pagedep_deps: flush failed"); + if (dap == LIST_FIRST(diraddhdp)) { + inodedep_lookup(UFSTOVFS(ump), inum, 0, &inodedep); + panic("flush_pagedep_deps: failed to flush " + "inodep %p ino %d dap %p", inodedep, inum, dap); + } } if (error) ACQUIRE_LOCK(&lk); @@ -6100,10 +9499,13 @@ softdep_count_dependencies(bp, wantcount) int wantcount; { struct worklist *wk; + struct bmsafemap *bmsafemap; struct inodedep *inodedep; struct indirdep *indirdep; + struct freeblks *freeblks; struct allocindir *aip; struct pagedep *pagedep; + struct dirrem *dirrem; struct diradd *dap; int i, retval; @@ -6132,6 +9534,12 @@ softdep_count_dependencies(bp, wantcount) if (!wantcount) goto out; } + if (LIST_FIRST(&inodedep->id_jaddrefhd)) { + /* Add reference dependency. */ + retval += 1; + if (!wantcount) + goto out; + } continue; case D_INDIRDEP: @@ -6147,6 +9555,14 @@ softdep_count_dependencies(bp, wantcount) case D_PAGEDEP: pagedep = WK_PAGEDEP(wk); + LIST_FOREACH(dirrem, &pagedep->pd_dirremhd, dm_next) { + if (LIST_FIRST(&dirrem->dm_jremrefhd)) { + /* Journal remove ref dependency. */ + retval += 1; + if (!wantcount) + goto out; + } + } for (i = 0; i < DAHASHSZ; i++) { LIST_FOREACH(dap, &pagedep->pd_diraddhd[i], da_pdlist) { @@ -6159,14 +9575,43 @@ softdep_count_dependencies(bp, wantcount) continue; case D_BMSAFEMAP: + bmsafemap = WK_BMSAFEMAP(wk); + if (LIST_FIRST(&bmsafemap->sm_jaddrefhd)) { + /* Add reference dependency. */ + retval += 1; + if (!wantcount) + goto out; + } + if (LIST_FIRST(&bmsafemap->sm_jnewblkhd)) { + /* Allocate block dependency. */ + retval += 1; + if (!wantcount) + goto out; + } + continue; + + case D_FREEBLKS: + freeblks = WK_FREEBLKS(wk); + if (LIST_FIRST(&freeblks->fb_jfreeblkhd)) { + /* Freeblk journal dependency. */ + retval += 1; + if (!wantcount) + goto out; + } + continue; + + case D_FREEWORK: + case D_FREEDEP: + case D_JSEGDEP: case D_ALLOCDIRECT: case D_ALLOCINDIR: case D_MKDIR: + case D_JSEG: /* never a dependency on these blocks */ continue; default: - panic("softdep_check_for_rollback: Unexpected type %s", + panic("softdep_count_dependencies: Unexpected type %s", TYPENAME(wk->wk_type)); /* NOTREACHED */ } @@ -6382,6 +9827,43 @@ softdep_error(func, error) #ifdef DDB +static void +inodedep_print(struct inodedep *inodedep, int verbose) +{ + db_printf("%p fs %p st %x ino %jd inoblk %jd delta %d saveino %p\n", + inodedep, inodedep->id_fs, inodedep->id_state, + (intmax_t)inodedep->id_ino, + (intmax_t)fsbtodb(inodedep->id_fs, + ino_to_fsba(inodedep->id_fs, inodedep->id_ino)), + inodedep->id_nlinkdelta, inodedep->id_savedino1); + + if (verbose == 0) + return; + + db_printf("\tpendinghd %p, bufwait %p, inowait %p, jaddrefhd %p, " + "mkdiradd %p\n", + LIST_FIRST(&inodedep->id_pendinghd), + LIST_FIRST(&inodedep->id_bufwait), + LIST_FIRST(&inodedep->id_inowait), + LIST_FIRST(&inodedep->id_jaddrefhd), + inodedep->id_mkdiradd); + db_printf("\tinoupdt %p, newinoupdt %p, extupdt %p, newextupdt %p\n", + TAILQ_FIRST(&inodedep->id_inoupdt), + TAILQ_FIRST(&inodedep->id_newinoupdt), + TAILQ_FIRST(&inodedep->id_extupdt), + TAILQ_FIRST(&inodedep->id_newextupdt)); +} + +DB_SHOW_COMMAND(inodedep, db_show_inodedep) +{ + + if (have_addr == 0) { + db_printf("Address required\n"); + return; + } + inodedep_print((struct inodedep*)addr, 1); +} + DB_SHOW_COMMAND(inodedeps, db_show_inodedeps) { struct inodedep_hashhead *inodedephd; @@ -6395,15 +9877,62 @@ DB_SHOW_COMMAND(inodedeps, db_show_inodedeps) LIST_FOREACH(inodedep, inodedephd, id_hash) { if (fs != NULL && fs != inodedep->id_fs) continue; - db_printf("%p fs %p st %x ino %jd inoblk %jd\n", - inodedep, inodedep->id_fs, inodedep->id_state, - (intmax_t)inodedep->id_ino, - (intmax_t)fsbtodb(inodedep->id_fs, - ino_to_fsba(inodedep->id_fs, inodedep->id_ino))); + inodedep_print(inodedep, 0); } } } +DB_SHOW_COMMAND(worklist, db_show_worklist) +{ + struct worklist *wk; + + if (have_addr == 0) { + db_printf("Address required\n"); + return; + } + wk = (struct worklist *)addr; + printf("worklist: %p type %s state 0x%X\n", + wk, TYPENAME(wk->wk_type), wk->wk_state); +} + +DB_SHOW_COMMAND(workhead, db_show_workhead) +{ + struct workhead *wkhd; + struct worklist *wk; + int i; + + if (have_addr == 0) { + db_printf("Address required\n"); + return; + } + wkhd = (struct workhead *)addr; + wk = LIST_FIRST(wkhd); + for (i = 0; i < 100 && wk != NULL; i++, wk = LIST_NEXT(wk, wk_list)) + db_printf("worklist: %p type %s state 0x%X", + wk, TYPENAME(wk->wk_type), wk->wk_state); + if (i == 100) + db_printf("workhead overflow"); + printf("\n"); +} + + +DB_SHOW_COMMAND(mkdirs, db_show_mkdirs) +{ + struct jaddref *jaddref; + struct diradd *diradd; + struct mkdir *mkdir; + + LIST_FOREACH(mkdir, &mkdirlisthd, md_mkdirs) { + diradd = mkdir->md_diradd; + db_printf("mkdir: %p state 0x%X dap %p state 0x%X", + mkdir, mkdir->md_state, diradd, diradd->da_state); + if ((jaddref = mkdir->md_jaddref) != NULL) + db_printf(" jaddref %p jaddref state 0x%X", + jaddref, jaddref->ja_state); + db_printf("\n"); + } +} + #endif /* DDB */ #endif /* SOFTUPDATES */ Index: /usr/src/sys/ufs/ffs/ffs_alloc.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_alloc.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_alloc.c (working copy) @@ -89,23 +89,23 @@ __FBSDID("$FreeBSD$"); #include typedef ufs2_daddr_t allocfcn_t(struct inode *ip, int cg, ufs2_daddr_t bpref, - int size); + int size, int rsize); -static ufs2_daddr_t ffs_alloccg(struct inode *, int, ufs2_daddr_t, int); +static ufs2_daddr_t ffs_alloccg(struct inode *, int, ufs2_daddr_t, int, int); static ufs2_daddr_t - ffs_alloccgblk(struct inode *, struct buf *, ufs2_daddr_t); + ffs_alloccgblk(struct inode *, struct buf *, ufs2_daddr_t, int); #ifdef INVARIANTS static int ffs_checkblk(struct inode *, ufs2_daddr_t, long); #endif -static ufs2_daddr_t ffs_clusteralloc(struct inode *, int, ufs2_daddr_t, int); -static void ffs_clusteracct(struct ufsmount *, struct fs *, struct cg *, - ufs1_daddr_t, int); +static ufs2_daddr_t ffs_clusteralloc(struct inode *, int, ufs2_daddr_t, int, + int); static ino_t ffs_dirpref(struct inode *); static ufs2_daddr_t ffs_fragextend(struct inode *, int, ufs2_daddr_t, int, int); static void ffs_fserr(struct fs *, ino_t, char *); static ufs2_daddr_t ffs_hashalloc - (struct inode *, int, ufs2_daddr_t, int, allocfcn_t *); -static ufs2_daddr_t ffs_nodealloccg(struct inode *, int, ufs2_daddr_t, int); + (struct inode *, int, ufs2_daddr_t, int, int, allocfcn_t *); +static ufs2_daddr_t ffs_nodealloccg(struct inode *, int, ufs2_daddr_t, int, + int); static ufs1_daddr_t ffs_mapsearch(struct fs *, struct cg *, ufs2_daddr_t, int); static int ffs_reallocblks_ufs1(struct vop_reallocblks_args *); static int ffs_reallocblks_ufs2(struct vop_reallocblks_args *); @@ -182,7 +182,7 @@ retry: cg = ino_to_cg(fs, ip->i_number); else cg = dtog(fs, bpref); - bno = ffs_hashalloc(ip, cg, bpref, size, ffs_alloccg); + bno = ffs_hashalloc(ip, cg, bpref, size, size, ffs_alloccg); if (bno > 0) { delta = btodb(size); if (ip->i_flag & IN_SPACECOUNTED) { @@ -380,16 +380,12 @@ retry: panic("ffs_realloccg: bad optim"); /* NOTREACHED */ } - bno = ffs_hashalloc(ip, cg, bpref, request, ffs_alloccg); + bno = ffs_hashalloc(ip, cg, bpref, request, nsize, ffs_alloccg); if (bno > 0) { bp->b_blkno = fsbtodb(fs, bno); if (!DOINGSOFTDEP(vp)) ffs_blkfree(ump, fs, ip->i_devvp, bprev, (long)osize, - ip->i_number); - if (nsize < request) - ffs_blkfree(ump, fs, ip->i_devvp, - bno + numfrags(fs, nsize), - (long)(request - nsize), ip->i_number); + ip->i_number, NULL); delta = btodb(nsize - osize); if (ip->i_flag & IN_SPACECOUNTED) { UFS_LOCK(ump); @@ -493,7 +489,7 @@ ffs_reallocblks_ufs1(ap) struct fs *fs; struct inode *ip; struct vnode *vp; - struct buf *sbp, *ebp; + struct buf *sbp, *ebp, *bp; ufs1_daddr_t *bap, *sbap, *ebap = 0; struct cluster_save *buflist; struct ufsmount *ump; @@ -501,7 +497,7 @@ ffs_reallocblks_ufs1(ap) ufs1_daddr_t soff, newblk, blkno; ufs2_daddr_t pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, len, start_lvl, end_lvl, ssize, lvl; vp = ap->a_vp; ip = VTOI(vp); @@ -578,7 +574,7 @@ ffs_reallocblks_ufs1(ap) * Search the block map looking for an allocation of the desired size. */ if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, ffs_clusteralloc)) == 0) { + len, len, ffs_clusteralloc)) == 0) { UFS_UNLOCK(ump); goto fail; } @@ -594,11 +590,17 @@ ffs_reallocblks_ufs1(ap) printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number, (intmax_t)start_lbn, (intmax_t)end_lbn); #endif + idp = start_ap; + bp = sbp; blkno = newblk; + lvl = start_lvl - 1; for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->fs_frag) { if (i == ssize) { bap = ebap; - soff = -i; + idp = end_ap; + bp = ebp; + lvl = end_lvl - 1; + idp[lvl].in_off = 0; } #ifdef INVARIANTS if (!ffs_checkblk(ip, @@ -614,12 +616,13 @@ ffs_reallocblks_ufs1(ap) if (DOINGSOFTDEP(vp)) { if (sbap == &ip->i_din1->di_db[0] && i < ssize) softdep_setup_allocdirect(ip, start_lbn + i, - blkno, *bap, fs->fs_bsize, fs->fs_bsize, - buflist->bs_children[i]); + start_lbn + i, blkno, *bap, fs->fs_bsize, + fs->fs_bsize, buflist->bs_children[i]); else - softdep_setup_allocindir_page(ip, start_lbn + i, - i < ssize ? sbp : ebp, soff + i, blkno, - *bap, buflist->bs_children[i]); + softdep_setup_allocindir_page(ip, bp, idp, + lvl, start_lbn + i, blkno, *bap, + buflist->bs_children[i]); + idp[lvl].in_off++; } *bap++ = blkno; } @@ -664,7 +667,7 @@ ffs_reallocblks_ufs1(ap) if (!DOINGSOFTDEP(vp)) ffs_blkfree(ump, fs, ip->i_devvp, dbtofsb(fs, buflist->bs_children[i]->b_blkno), - fs->fs_bsize, ip->i_number); + fs->fs_bsize, ip->i_number, NULL); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); #ifdef INVARIANTS if (!ffs_checkblk(ip, @@ -702,14 +705,14 @@ ffs_reallocblks_ufs2(ap) struct fs *fs; struct inode *ip; struct vnode *vp; - struct buf *sbp, *ebp; + struct buf *sbp, *ebp, *bp; ufs2_daddr_t *bap, *sbap, *ebap = 0; struct cluster_save *buflist; struct ufsmount *ump; ufs_lbn_t start_lbn, end_lbn; ufs2_daddr_t soff, newblk, blkno, pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, len, start_lvl, end_lvl, ssize, lvl; vp = ap->a_vp; ip = VTOI(vp); @@ -786,7 +789,7 @@ ffs_reallocblks_ufs2(ap) * Search the block map looking for an allocation of the desired size. */ if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, ffs_clusteralloc)) == 0) { + len, len, ffs_clusteralloc)) == 0) { UFS_UNLOCK(ump); goto fail; } @@ -802,11 +805,17 @@ ffs_reallocblks_ufs2(ap) printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number, (intmax_t)start_lbn, (intmax_t)end_lbn); #endif + idp = start_ap; + bp = sbp; blkno = newblk; + lvl = start_lvl - 1; for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->fs_frag) { if (i == ssize) { bap = ebap; - soff = -i; + idp = end_ap; + bp = ebp; + lvl = end_lvl - 1; + idp[lvl].in_off = 0; } #ifdef INVARIANTS if (!ffs_checkblk(ip, @@ -822,12 +831,13 @@ ffs_reallocblks_ufs2(ap) if (DOINGSOFTDEP(vp)) { if (sbap == &ip->i_din2->di_db[0] && i < ssize) softdep_setup_allocdirect(ip, start_lbn + i, - blkno, *bap, fs->fs_bsize, fs->fs_bsize, - buflist->bs_children[i]); + start_lbn + i, blkno, *bap, fs->fs_bsize, + fs->fs_bsize, buflist->bs_children[i]); else - softdep_setup_allocindir_page(ip, start_lbn + i, - i < ssize ? sbp : ebp, soff + i, blkno, - *bap, buflist->bs_children[i]); + softdep_setup_allocindir_page(ip, bp, idp, + lvl, start_lbn + i, blkno, *bap, + buflist->bs_children[i]); + idp[lvl].in_off++; } *bap++ = blkno; } @@ -872,7 +882,7 @@ ffs_reallocblks_ufs2(ap) if (!DOINGSOFTDEP(vp)) ffs_blkfree(ump, fs, ip->i_devvp, dbtofsb(fs, buflist->bs_children[i]->b_blkno), - fs->fs_bsize, ip->i_number); + fs->fs_bsize, ip->i_number, NULL); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); #ifdef INVARIANTS if (!ffs_checkblk(ip, @@ -959,7 +969,7 @@ ffs_valloc(pvp, mode, cred, vpp) if (fs->fs_contigdirs[cg] > 0) fs->fs_contigdirs[cg]--; } - ino = (ino_t)ffs_hashalloc(pip, cg, ipref, mode, + ino = (ino_t)ffs_hashalloc(pip, cg, ipref, mode, 0, (allocfcn_t *)ffs_nodealloccg); if (ino == 0) goto noinodes; @@ -1268,11 +1278,12 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap) */ /*VARARGS5*/ static ufs2_daddr_t -ffs_hashalloc(ip, cg, pref, size, allocator) +ffs_hashalloc(ip, cg, pref, size, rsize, allocator) struct inode *ip; int cg; ufs2_daddr_t pref; - int size; /* size for data blocks, mode for inodes */ + int size; /* Search size for data blocks, mode for inodes */ + int rsize; /* Real allocated size. */ allocfcn_t *allocator; { struct fs *fs; @@ -1288,7 +1299,7 @@ static ufs2_daddr_t /* * 1: preferred cylinder group */ - result = (*allocator)(ip, cg, pref, size); + result = (*allocator)(ip, cg, pref, size, rsize); if (result) return (result); /* @@ -1298,7 +1309,7 @@ static ufs2_daddr_t cg += i; if (cg >= fs->fs_ncg) cg -= fs->fs_ncg; - result = (*allocator)(ip, cg, 0, size); + result = (*allocator)(ip, cg, 0, size, rsize); if (result) return (result); } @@ -1309,7 +1320,7 @@ static ufs2_daddr_t */ cg = (icg + 2) % fs->fs_ncg; for (i = 2; i < fs->fs_ncg; i++) { - result = (*allocator)(ip, cg, 0, size); + result = (*allocator)(ip, cg, 0, size, rsize); if (result) return (result); cg++; @@ -1391,7 +1402,8 @@ ffs_fragextend(ip, cg, bprev, osize, nsize) ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); if (DOINGSOFTDEP(ITOV(ip))) - softdep_setup_blkmapdep(bp, UFSTOVFS(ump), bprev); + softdep_setup_blkmapdep(bp, UFSTOVFS(ump), bprev, + frags, numfrags(fs, osize)); bdwrite(bp); return (bprev); @@ -1409,11 +1421,12 @@ fail: * and if it is, allocate it. */ static ufs2_daddr_t -ffs_alloccg(ip, cg, bpref, size) +ffs_alloccg(ip, cg, bpref, size, rsize) struct inode *ip; int cg; ufs2_daddr_t bpref; int size; + int rsize; { struct fs *fs; struct cg *cgp; @@ -1441,7 +1454,7 @@ static ufs2_daddr_t cgp->cg_old_time = cgp->cg_time = time_second; if (size == fs->fs_bsize) { UFS_LOCK(ump); - blkno = ffs_alloccgblk(ip, bp, bpref); + blkno = ffs_alloccgblk(ip, bp, bpref, rsize); ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); bdwrite(bp); @@ -1465,21 +1478,14 @@ static ufs2_daddr_t if (cgp->cg_cs.cs_nbfree == 0) goto fail; UFS_LOCK(ump); - blkno = ffs_alloccgblk(ip, bp, bpref); - bno = dtogd(fs, blkno); - for (i = frags; i < fs->fs_frag; i++) - setbit(blksfree, bno + i); - i = fs->fs_frag - frags; - cgp->cg_cs.cs_nffree += i; - fs->fs_cstotal.cs_nffree += i; - fs->fs_cs(fs, cg).cs_nffree += i; - fs->fs_fmod = 1; - cgp->cg_frsum[i]++; + blkno = ffs_alloccgblk(ip, bp, bpref, rsize); ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); bdwrite(bp); return (blkno); } + KASSERT(size == rsize, + ("ffs_alloccg: size(%d) != rsize(%d)", size, rsize)); bno = ffs_mapsearch(fs, cgp, bpref, allocsiz); if (bno < 0) goto fail; @@ -1497,7 +1503,7 @@ static ufs2_daddr_t ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); if (DOINGSOFTDEP(ITOV(ip))) - softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno); + softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno, frags, 0); bdwrite(bp); return (blkno); @@ -1519,10 +1525,11 @@ fail: * blocks may be fragmented by the routine that allocates them. */ static ufs2_daddr_t -ffs_alloccgblk(ip, bp, bpref) +ffs_alloccgblk(ip, bp, bpref, size) struct inode *ip; struct buf *bp; ufs2_daddr_t bpref; + int size; { struct fs *fs; struct cg *cgp; @@ -1530,6 +1537,7 @@ static ufs2_daddr_t ufs1_daddr_t bno; ufs2_daddr_t blkno; u_int8_t *blksfree; + int i; fs = ip->i_fs; ump = ip->i_ump; @@ -1557,16 +1565,32 @@ static ufs2_daddr_t gotit: blkno = fragstoblks(fs, bno); ffs_clrblock(fs, blksfree, (long)blkno); - ffs_clusteracct(ump, fs, cgp, blkno, -1); + ffs_clusteracct(fs, cgp, blkno, -1); cgp->cg_cs.cs_nbfree--; fs->fs_cstotal.cs_nbfree--; fs->fs_cs(fs, cgp->cg_cgx).cs_nbfree--; fs->fs_fmod = 1; blkno = cgbase(fs, cgp->cg_cgx) + bno; + /* + * If the caller didn't want the whole block free the frags here. + */ + size = numfrags(fs, size); + if (size != fs->fs_frag) { + bno = dtogd(fs, blkno); + for (i = size; i < fs->fs_frag; i++) + setbit(blksfree, bno + i); + i = fs->fs_frag - size; + cgp->cg_cs.cs_nffree += i; + fs->fs_cstotal.cs_nffree += i; + fs->fs_cs(fs, cgp->cg_cgx).cs_nffree += i; + fs->fs_fmod = 1; + cgp->cg_frsum[i]++; + } /* XXX Fixme. */ UFS_UNLOCK(ump); if (DOINGSOFTDEP(ITOV(ip))) - softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno); + softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno, + size, 0); UFS_LOCK(ump); return (blkno); } @@ -1579,11 +1603,12 @@ gotit: * take the first one that we find following bpref. */ static ufs2_daddr_t -ffs_clusteralloc(ip, cg, bpref, len) +ffs_clusteralloc(ip, cg, bpref, len, unused) struct inode *ip; int cg; ufs2_daddr_t bpref; int len; + int unused; { struct fs *fs; struct cg *cgp; @@ -1679,7 +1704,7 @@ static ufs2_daddr_t len = blkstofrags(fs, len); UFS_LOCK(ump); for (i = 0; i < len; i += fs->fs_frag) - if (ffs_alloccgblk(ip, bp, bno + i) != bno + i) + if (ffs_alloccgblk(ip, bp, bno + i, fs->fs_bsize) != bno + i) panic("ffs_clusteralloc: lost block"); ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); @@ -1703,11 +1728,12 @@ fail: * inode in the specified cylinder group. */ static ufs2_daddr_t -ffs_nodealloccg(ip, cg, ipref, mode) +ffs_nodealloccg(ip, cg, ipref, mode, unused) struct inode *ip; int cg; ufs2_daddr_t ipref; int mode; + int unused; { struct fs *fs; struct cg *cgp; @@ -1810,28 +1836,6 @@ gotit: } /* - * check if a block is free - */ -static int -ffs_isfreeblock(struct fs *fs, u_char *cp, ufs1_daddr_t h) -{ - - switch ((int)fs->fs_frag) { - case 8: - return (cp[h] == 0); - case 4: - return ((cp[h >> 1] & (0x0f << ((h & 0x1) << 2))) == 0); - case 2: - return ((cp[h >> 2] & (0x03 << ((h & 0x3) << 1))) == 0); - case 1: - return ((cp[h >> 3] & (0x01 << (h & 0x7))) == 0); - default: - panic("ffs_isfreeblock"); - } - return (0); -} - -/* * Free a block or fragment. * * The specified block or fragment is placed back in the @@ -1839,13 +1843,14 @@ gotit: * block reassembly is checked. */ void -ffs_blkfree(ump, fs, devvp, bno, size, inum) +ffs_blkfree(ump, fs, devvp, bno, size, inum, dephd) struct ufsmount *ump; struct fs *fs; struct vnode *devvp; ufs2_daddr_t bno; long size; ino_t inum; + struct workhead *dephd; { struct cg *cgp; struct buf *bp; @@ -1912,7 +1917,7 @@ void panic("ffs_blkfree: freeing free block"); } ffs_setblock(fs, blksfree, fragno); - ffs_clusteracct(ump, fs, cgp, fragno, 1); + ffs_clusteracct(fs, cgp, fragno, 1); cgp->cg_cs.cs_nbfree++; fs->fs_cstotal.cs_nbfree++; fs->fs_cs(fs, cg).cs_nbfree++; @@ -1952,7 +1957,7 @@ void cgp->cg_cs.cs_nffree -= fs->fs_frag; fs->fs_cstotal.cs_nffree -= fs->fs_frag; fs->fs_cs(fs, cg).cs_nffree -= fs->fs_frag; - ffs_clusteracct(ump, fs, cgp, fragno, 1); + ffs_clusteracct(fs, cgp, fragno, 1); cgp->cg_cs.cs_nbfree++; fs->fs_cstotal.cs_nbfree++; fs->fs_cs(fs, cg).cs_nbfree++; @@ -1961,6 +1966,9 @@ void fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); + if (UFSTOVFS(ump)->mnt_flag & MNT_SOFTDEP) + softdep_setup_blkfree(UFSTOVFS(ump), bp, bno, + numfrags(fs, size), dephd); bdwrite(bp); } @@ -2031,7 +2039,8 @@ ffs_vfree(pvp, ino, mode) return (0); } ip = VTOI(pvp); - return (ffs_freefile(ip->i_ump, ip->i_fs, ip->i_devvp, ino, mode)); + return (ffs_freefile(ip->i_ump, ip->i_fs, ip->i_devvp, ino, mode, + NULL)); } /* @@ -2039,12 +2048,13 @@ ffs_vfree(pvp, ino, mode) * The specified inode is placed back in the free map. */ int -ffs_freefile(ump, fs, devvp, ino, mode) +ffs_freefile(ump, fs, devvp, ino, mode, wkhd) struct ufsmount *ump; struct fs *fs; struct vnode *devvp; ino_t ino; int mode; + struct workhead *wkhd; { struct cg *cgp; struct buf *bp; @@ -2100,6 +2110,9 @@ int fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); + if (UFSTOVFS(ump)->mnt_flag & MNT_SOFTDEP) + softdep_setup_inofree(UFSTOVFS(ump), bp, + ino + cg * fs->fs_ipg, wkhd); bdwrite(bp); return (0); } @@ -2213,101 +2226,6 @@ ffs_mapsearch(fs, cgp, bpref, allocsiz) } /* - * Update the cluster map because of an allocation or free. - * - * Cnt == 1 means free; cnt == -1 means allocating. - */ -void -ffs_clusteracct(ump, fs, cgp, blkno, cnt) - struct ufsmount *ump; - struct fs *fs; - struct cg *cgp; - ufs1_daddr_t blkno; - int cnt; -{ - int32_t *sump; - int32_t *lp; - u_char *freemapp, *mapp; - int i, start, end, forw, back, map, bit; - - mtx_assert(UFS_MTX(ump), MA_OWNED); - - if (fs->fs_contigsumsize <= 0) - return; - freemapp = cg_clustersfree(cgp); - sump = cg_clustersum(cgp); - /* - * Allocate or clear the actual block. - */ - if (cnt > 0) - setbit(freemapp, blkno); - else - clrbit(freemapp, blkno); - /* - * Find the size of the cluster going forward. - */ - start = blkno + 1; - end = start + fs->fs_contigsumsize; - if (end >= cgp->cg_nclusterblks) - end = cgp->cg_nclusterblks; - mapp = &freemapp[start / NBBY]; - map = *mapp++; - bit = 1 << (start % NBBY); - for (i = start; i < end; i++) { - if ((map & bit) == 0) - break; - if ((i & (NBBY - 1)) != (NBBY - 1)) { - bit <<= 1; - } else { - map = *mapp++; - bit = 1; - } - } - forw = i - start; - /* - * Find the size of the cluster going backward. - */ - start = blkno - 1; - end = start - fs->fs_contigsumsize; - if (end < 0) - end = -1; - mapp = &freemapp[start / NBBY]; - map = *mapp--; - bit = 1 << (start % NBBY); - for (i = start; i > end; i--) { - if ((map & bit) == 0) - break; - if ((i & (NBBY - 1)) != 0) { - bit >>= 1; - } else { - map = *mapp--; - bit = 1 << (NBBY - 1); - } - } - back = start - i; - /* - * Account for old cluster and the possibly new forward and - * back clusters. - */ - i = back + forw + 1; - if (i > fs->fs_contigsumsize) - i = fs->fs_contigsumsize; - sump[i] += cnt; - if (back > 0) - sump[back] -= cnt; - if (forw > 0) - sump[forw] -= cnt; - /* - * Update cluster summary information. - */ - lp = &sump[fs->fs_contigsumsize]; - for (i = fs->fs_contigsumsize; i > 0; i--) - if (*lp-- > 0) - break; - fs->fs_maxcluster[cgp->cg_cgx] = i; -} - -/* * Fserr prints the name of a filesystem with an error diagnostic. * * The form of the error message is: @@ -2505,7 +2423,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) #endif /* DEBUG */ while (cmd.size > 0) { if ((error = ffs_freefile(ump, fs, ump->um_devvp, - cmd.value, filetype))) + cmd.value, filetype, NULL))) break; cmd.size -= 1; cmd.value += 1; @@ -2533,7 +2451,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) if (blksize > blkcnt) blksize = blkcnt; ffs_blkfree(ump, fs, ump->um_devvp, blkno, - blksize * fs->fs_fsize, ROOTINO); + blksize * fs->fs_fsize, ROOTINO, NULL); blkno += blksize; blkcnt -= blksize; blksize = fs->fs_frag; Index: /usr/src/sys/ufs/ffs/ffs_extern.h =================================================================== --- /usr/src/sys/ufs/ffs/ffs_extern.h (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_extern.h (working copy) @@ -56,18 +56,20 @@ int ffs_balloc_ufs2(struct vnode *a_vp, off_t a_st struct ucred *a_cred, int a_flags, struct buf **a_bpp); int ffs_blkatoff(struct vnode *, off_t, char **, struct buf **); void ffs_blkfree(struct ufsmount *, struct fs *, struct vnode *, - ufs2_daddr_t, long, ino_t); + ufs2_daddr_t, long, ino_t, struct workhead *); ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *); ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *); int ffs_checkfreefile(struct fs *, struct vnode *, ino_t); void ffs_clrblock(struct fs *, u_char *, ufs1_daddr_t); +void ffs_clusteracct(struct fs *, struct cg *, ufs1_daddr_t, int); void ffs_bdflush(struct bufobj *, struct buf *); int ffs_copyonwrite(struct vnode *, struct buf *); int ffs_flushfiles(struct mount *, int, struct thread *); void ffs_fragacct(struct fs *, int, int32_t [], int); int ffs_freefile(struct ufsmount *, struct fs *, struct vnode *, ino_t, - int); + int, struct workhead *); int ffs_isblock(struct fs *, u_char *, ufs1_daddr_t); +int ffs_isfreeblock(struct fs *, u_char *, ufs1_daddr_t); void ffs_load_inode(struct buf *, struct inode *, struct fs *, ino_t); int ffs_mountroot(void); int ffs_reallocblks(struct vop_reallocblks_args *); @@ -108,7 +110,7 @@ void softdep_initialize(void); void softdep_uninitialize(void); int softdep_mount(struct vnode *, struct mount *, struct fs *, struct ucred *); -void softdep_move_dependencies(struct buf *, struct buf *); +int softdep_move_dependencies(struct buf *, struct buf *); int softdep_flushworklist(struct mount *, int *, struct thread *); int softdep_flushfiles(struct mount *, int, struct thread *); void softdep_update_inodeblock(struct inode *, struct buf *, int); @@ -117,15 +119,21 @@ void softdep_freefile(struct vnode *, ino_t, int); int softdep_request_cleanup(struct fs *, struct vnode *); void softdep_setup_freeblocks(struct inode *, off_t, int); void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t); -void softdep_setup_blkmapdep(struct buf *, struct mount *, ufs2_daddr_t); -void softdep_setup_allocdirect(struct inode *, ufs_lbn_t, ufs2_daddr_t, +void softdep_setup_blkmapdep(struct buf *, struct mount *, ufs2_daddr_t, + int, int); +void softdep_setup_allocdirect(struct inode *, int, ufs_lbn_t, ufs2_daddr_t, ufs2_daddr_t, long, long, struct buf *); void softdep_setup_allocext(struct inode *, ufs_lbn_t, ufs2_daddr_t, ufs2_daddr_t, long, long, struct buf *); void softdep_setup_allocindir_meta(struct buf *, struct inode *, - struct buf *, int, ufs2_daddr_t); -void softdep_setup_allocindir_page(struct inode *, ufs_lbn_t, - struct buf *, int, ufs2_daddr_t, ufs2_daddr_t, struct buf *); + struct buf *, struct indir *, int, ufs2_daddr_t); +void softdep_setup_allocindir_page(struct inode *, struct buf *, + struct indir *, int, ufs_lbn_t, ufs2_daddr_t, ufs2_daddr_t, + struct buf *); +void softdep_setup_blkfree(struct mount *, struct buf *, ufs2_daddr_t, int, + struct workhead *); +void softdep_setup_inofree(struct mount *, struct buf *, ino_t, + struct workhead *); void softdep_fsync_mountdev(struct vnode *); int softdep_sync_metadata(struct vnode *); int softdep_process_worklist(struct mount *, int); Index: /usr/src/sys/ufs/ffs/ffs_subr.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_subr.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_subr.c (working copy) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #ifndef _KERNEL #include #include -#include "fsck.h" #else #include #include @@ -223,12 +222,43 @@ ffs_isblock(fs, cp, h) mask = 0x01 << (h & 0x7); return ((cp[h >> 3] & mask) == mask); default: +#ifdef _KERNEL panic("ffs_isblock"); +#endif + break; } return (0); } /* + * check if a block is free + */ +int +ffs_isfreeblock(fs, cp, h) + struct fs *fs; + u_char *cp; + ufs1_daddr_t h; +{ + + switch ((int)fs->fs_frag) { + case 8: + return (cp[h] == 0); + case 4: + return ((cp[h >> 1] & (0x0f << ((h & 0x1) << 2))) == 0); + case 2: + return ((cp[h >> 2] & (0x03 << ((h & 0x3) << 1))) == 0); + case 1: + return ((cp[h >> 3] & (0x01 << (h & 0x7))) == 0); + default: +#ifdef _KERNEL + panic("ffs_isfreeblock"); +#endif + break; + } + return (0); +} + +/* * take a block out of the map */ void @@ -252,7 +282,10 @@ ffs_clrblock(fs, cp, h) cp[h >> 3] &= ~(0x01 << (h & 0x7)); return; default: +#ifdef _KERNEL panic("ffs_clrblock"); +#endif + break; } } @@ -281,6 +314,101 @@ ffs_setblock(fs, cp, h) cp[h >> 3] |= (0x01 << (h & 0x7)); return; default: +#ifdef _KERNEL panic("ffs_setblock"); +#endif + break; } } + +/* + * Update the cluster map because of an allocation or free. + * + * Cnt == 1 means free; cnt == -1 means allocating. + */ +void +ffs_clusteracct(fs, cgp, blkno, cnt) + struct fs *fs; + struct cg *cgp; + ufs1_daddr_t blkno; + int cnt; +{ + int32_t *sump; + int32_t *lp; + u_char *freemapp, *mapp; + int i, start, end, forw, back, map, bit; + + if (fs->fs_contigsumsize <= 0) + return; + freemapp = cg_clustersfree(cgp); + sump = cg_clustersum(cgp); + /* + * Allocate or clear the actual block. + */ + if (cnt > 0) + setbit(freemapp, blkno); + else + clrbit(freemapp, blkno); + /* + * Find the size of the cluster going forward. + */ + start = blkno + 1; + end = start + fs->fs_contigsumsize; + if (end >= cgp->cg_nclusterblks) + end = cgp->cg_nclusterblks; + mapp = &freemapp[start / NBBY]; + map = *mapp++; + bit = 1 << (start % NBBY); + for (i = start; i < end; i++) { + if ((map & bit) == 0) + break; + if ((i & (NBBY - 1)) != (NBBY - 1)) { + bit <<= 1; + } else { + map = *mapp++; + bit = 1; + } + } + forw = i - start; + /* + * Find the size of the cluster going backward. + */ + start = blkno - 1; + end = start - fs->fs_contigsumsize; + if (end < 0) + end = -1; + mapp = &freemapp[start / NBBY]; + map = *mapp--; + bit = 1 << (start % NBBY); + for (i = start; i > end; i--) { + if ((map & bit) == 0) + break; + if ((i & (NBBY - 1)) != 0) { + bit >>= 1; + } else { + map = *mapp--; + bit = 1 << (NBBY - 1); + } + } + back = start - i; + /* + * Account for old cluster and the possibly new forward and + * back clusters. + */ + i = back + forw + 1; + if (i > fs->fs_contigsumsize) + i = fs->fs_contigsumsize; + sump[i] += cnt; + if (back > 0) + sump[back] -= cnt; + if (forw > 0) + sump[forw] -= cnt; + /* + * Update cluster summary information. + */ + lp = &sump[fs->fs_contigsumsize]; + for (i = fs->fs_contigsumsize; i > 0; i--) + if (*lp-- > 0) + break; + fs->fs_maxcluster[cgp->cg_cgx] = i; +} Index: /usr/src/sys/ufs/ffs/softdep.h =================================================================== --- /usr/src/sys/ufs/ffs/softdep.h (revision 200709) +++ /usr/src/sys/ufs/ffs/softdep.h (working copy) @@ -98,18 +98,20 @@ #define UNDONE 0x0002 #define COMPLETE 0x0004 #define DEPCOMPLETE 0x0008 -#define MKDIR_PARENT 0x0010 /* diradd & mkdir only */ -#define MKDIR_BODY 0x0020 /* diradd & mkdir only */ +#define MKDIR_PARENT 0x0010 /* diradd, mkdir, jaddref, jsegdep only */ +#define MKDIR_BODY 0x0020 /* diradd, mkdir, jaddref only */ #define RMDIR 0x0040 /* dirrem only */ -#define DIRCHG 0x0080 /* diradd & dirrem only */ -#define GOINGAWAY 0x0100 /* indirdep only */ -#define IOSTARTED 0x0200 /* inodedep & pagedep only */ +#define DIRCHG 0x0080 /* diradd, dirrem only */ +#define GOINGAWAY 0x0100 /* indirdep, jremref only */ +#define IOSTARTED 0x0200 /* inodedep, pagedep, bmsafemap only */ #define SPACECOUNTED 0x0400 /* inodedep only */ -#define NEWBLOCK 0x0800 /* pagedep only */ +#define NEWBLOCK 0x0800 /* pagedep, jaddref only */ #define INPROGRESS 0x1000 /* dirrem, freeblks, freefrag, freefile only */ #define UFS1FMT 0x2000 /* indirdep only */ #define EXTDATA 0x4000 /* allocdirect only */ #define ONWORKLIST 0x8000 +#define IOWAITING 0x10000 /* Thread is waiting for IO to complete. */ +#define ONDEPLIST 0x20000 /* Structure is on a dependency list. */ #define ALLCOMPLETE (ATTACHED | COMPLETE | DEPCOMPLETE) @@ -135,25 +137,36 @@ * and the macros below changed to use it. */ struct worklist { + LIST_ENTRY(worklist) wk_list; /* list of work requests */ struct mount *wk_mp; /* Mount we live in */ - LIST_ENTRY(worklist) wk_list; /* list of work requests */ - unsigned short wk_type; /* type of request */ - unsigned short wk_state; /* state flags */ + unsigned int wk_type:8, /* type of request */ + wk_state:24; /* state flags */ }; #define WK_DATA(wk) ((void *)(wk)) #define WK_PAGEDEP(wk) ((struct pagedep *)(wk)) #define WK_INODEDEP(wk) ((struct inodedep *)(wk)) #define WK_BMSAFEMAP(wk) ((struct bmsafemap *)(wk)) +#define WK_NEWBLK(wk) ((struct newblk *)(wk)) #define WK_ALLOCDIRECT(wk) ((struct allocdirect *)(wk)) #define WK_INDIRDEP(wk) ((struct indirdep *)(wk)) #define WK_ALLOCINDIR(wk) ((struct allocindir *)(wk)) #define WK_FREEFRAG(wk) ((struct freefrag *)(wk)) #define WK_FREEBLKS(wk) ((struct freeblks *)(wk)) +#define WK_FREEWORK(wk) ((struct freework *)(wk)) #define WK_FREEFILE(wk) ((struct freefile *)(wk)) #define WK_DIRADD(wk) ((struct diradd *)(wk)) #define WK_MKDIR(wk) ((struct mkdir *)(wk)) #define WK_DIRREM(wk) ((struct dirrem *)(wk)) #define WK_NEWDIRBLK(wk) ((struct newdirblk *)(wk)) +#define WK_JADDREF(wk) ((struct jaddref *)(wk)) +#define WK_JREMREF(wk) ((struct jremref *)(wk)) +#define WK_JMVREF(wk) ((struct jmvref *)(wk)) +#define WK_JSEGDEP(wk) ((struct jsegdep *)(wk)) +#define WK_JSEG(wk) ((struct jseg *)(wk)) +#define WK_JNEWBLK(wk) ((struct jnewblk *)(wk)) +#define WK_JFREEBLK(wk) ((struct jfreeblk *)(wk)) +#define WK_FREEDEP(wk) ((struct freedep *)(wk)) +#define WK_JFREEFRAG(wk) ((struct jfreefrag *)(wk)) /* * Various types of lists @@ -165,6 +178,14 @@ LIST_HEAD(inodedephd, inodedep); LIST_HEAD(allocindirhd, allocindir); LIST_HEAD(allocdirecthd, allocdirect); TAILQ_HEAD(allocdirectlst, allocdirect); +LIST_HEAD(indirdephd, indirdep); +LIST_HEAD(jaddrefhd, jaddref); +LIST_HEAD(jremrefhd, jremref); +LIST_HEAD(jmvrefhd, jmvref); +LIST_HEAD(jnewblkhd, jnewblk); +LIST_HEAD(jfreeblkhd, jfreeblk); +LIST_HEAD(freeworkhd, freework); +TAILQ_HEAD(jseglst, jseg); /* * The "pagedep" structure tracks the various dependencies related to @@ -192,9 +213,11 @@ struct pagedep { LIST_ENTRY(pagedep) pd_hash; /* hashed lookup */ ino_t pd_ino; /* associated file */ ufs_lbn_t pd_lbn; /* block within file */ + struct newdirblk *pd_newdirblk; /* associated newdirblk if NEWBLOCK */ struct dirremhd pd_dirremhd; /* dirrem's waiting for page */ struct diraddhd pd_diraddhd[DAHASHSZ]; /* diradd dir entry updates */ struct diraddhd pd_pendinghd; /* directory entries awaiting write */ + struct jmvrefhd pd_jmvrefhd; /* Dependent journal writes. */ }; /* @@ -252,7 +275,9 @@ struct inodedep { ino_t id_ino; /* dependent inode */ nlink_t id_nlinkdelta; /* saved effective link count */ LIST_ENTRY(inodedep) id_deps; /* bmsafemap's list of inodedep's */ - struct buf *id_buf; /* related bmsafemap (if pending) */ + struct bmsafemap *id_bmsafemap; /* related bmsafemap (if pending) */ + struct diradd *id_mkdiradd; /* diradd for a mkdir. */ + struct jaddrefhd id_jaddrefhd; /* Journal add refs pending. */ long id_savedextsize; /* ext size saved during rollback */ off_t id_savedsize; /* file size saved during rollback */ struct workhead id_pendinghd; /* entries awaiting directory write */ @@ -271,23 +296,6 @@ struct inodedep { #define id_savedino2 id_un.idu_savedino2 /* - * A "newblk" structure is attached to a bmsafemap structure when a block - * or fragment is allocated from a cylinder group. Its state is set to - * DEPCOMPLETE when its cylinder group map is written. It is consumed by - * an associated allocdirect or allocindir allocation which will attach - * themselves to the bmsafemap structure if the newblk's DEPCOMPLETE flag - * is not set (i.e., its cylinder group map has not been written). - */ -struct newblk { - LIST_ENTRY(newblk) nb_hash; /* hashed lookup */ - struct fs *nb_fs; /* associated filesystem */ - int nb_state; /* state of bitmap dependency */ - ufs2_daddr_t nb_newblkno; /* allocated block number */ - LIST_ENTRY(newblk) nb_deps; /* bmsafemap's list of newblk's */ - struct bmsafemap *nb_bmsafemap; /* associated bmsafemap */ -}; - -/* * A "bmsafemap" structure maintains a list of dependency structures * that depend on the update of a particular cylinder group map. * It has lists for newblks, allocdirects, allocindirs, and inodedeps. @@ -299,14 +307,46 @@ struct inodedep { */ struct bmsafemap { struct worklist sm_list; /* cylgrp buffer */ +# define sm_state sm_list.wk_state + int sm_cg; + LIST_ENTRY(bmsafemap) sm_hash; /* Hash links. */ struct buf *sm_buf; /* associated buffer */ struct allocdirecthd sm_allocdirecthd; /* allocdirect deps */ + struct allocdirecthd sm_allocdirectwr; /* writing allocdirect deps */ struct allocindirhd sm_allocindirhd; /* allocindir deps */ + struct allocindirhd sm_allocindirwr; /* writing allocindir deps */ struct inodedephd sm_inodedephd; /* inodedep deps */ + struct inodedephd sm_inodedepwr; /* writing inodedep deps */ struct newblkhd sm_newblkhd; /* newblk deps */ + struct newblkhd sm_newblkwr; /* writing newblk deps */ + struct jaddrefhd sm_jaddrefhd; /* Pending inode allocations. */ + struct jnewblkhd sm_jnewblkhd; /* Pending block allocations. */ }; /* + * A "newblk" structure is attached to a bmsafemap structure when a block + * or fragment is allocated from a cylinder group. Its state is set to + * DEPCOMPLETE when its cylinder group map is written. It is converted to + * an allocdirect or allocindir allocation once the allocator calls the + * appropriate setup function. + */ +struct newblk { + struct worklist nb_list; +# define nb_state nb_list.wk_state + LIST_ENTRY(newblk) nb_hash; /* hashed lookup */ + LIST_ENTRY(newblk) nb_deps; /* bmsafemap's list of newblks */ + struct jnewblk *nb_jnewblk; /* New block journal entry. */ + struct bmsafemap *nb_bmsafemap;/* cylgrp dep (if pending) */ + struct freefrag *nb_freefrag; /* fragment to be freed (if any) */ + struct indirdephd nb_indirdeps; /* Children indirect blocks. */ + struct workhead nb_newdirblk; /* dir block to notify when written */ + struct workhead nb_jwork; /* Journal work pending. */ + ufs2_daddr_t nb_newblkno; /* new value of block pointer */ + ufs2_daddr_t nb_oldblkno; /* old value of block pointer */ + int nb_offset; /* Pointer offset in parent. */ +}; + +/* * An "allocdirect" structure is attached to an "inodedep" when a new block * or fragment is allocated and pointed to by the inode described by * "inodedep". The worklist is linked to the buffer that holds the block. @@ -334,20 +374,18 @@ struct bmsafemap { * and inodedep->id_pendinghd lists. */ struct allocdirect { - struct worklist ad_list; /* buffer holding block */ -# define ad_state ad_list.wk_state /* block pointer state */ + struct newblk ad_block; /* Common block logic */ +# define ad_state ad_block.nb_list.wk_state /* block pointer state */ TAILQ_ENTRY(allocdirect) ad_next; /* inodedep's list of allocdirect's */ - ufs_lbn_t ad_lbn; /* block within file */ - ufs2_daddr_t ad_newblkno; /* new value of block pointer */ - ufs2_daddr_t ad_oldblkno; /* old value of block pointer */ + struct inodedep *ad_inodedep; /* associated inodedep */ long ad_newsize; /* size of new block */ long ad_oldsize; /* size of old block */ - LIST_ENTRY(allocdirect) ad_deps; /* bmsafemap's list of allocdirect's */ - struct buf *ad_buf; /* cylgrp buffer (if pending) */ - struct inodedep *ad_inodedep; /* associated inodedep */ - struct freefrag *ad_freefrag; /* fragment to be freed (if any) */ - struct workhead ad_newdirblk; /* dir block to notify when written */ }; +#define ad_newblkno ad_block.nb_newblkno +#define ad_oldblkno ad_block.nb_oldblkno +#define ad_offset ad_block.nb_offset +#define ad_freefrag ad_block.nb_freefrag +#define ad_newdirblk ad_block.nb_newdirblk /* * A single "indirdep" structure manages all allocation dependencies for @@ -369,10 +407,14 @@ struct allocdirect { struct indirdep { struct worklist ir_list; /* buffer holding indirect block */ # define ir_state ir_list.wk_state /* indirect block pointer state */ - caddr_t ir_saveddata; /* buffer cache contents */ + LIST_ENTRY(indirdep) ir_next; /* alloc{direct,indir} list */ + caddr_t ir_saveddata; /* buffer cache contents */ struct buf *ir_savebp; /* buffer holding safe copy */ + struct allocindirhd ir_completehd; /* waiting for indirdep complete */ + struct allocindirhd ir_writehd; /* Waiting for the pointer write. */ struct allocindirhd ir_donehd; /* done waiting to update safecopy */ struct allocindirhd ir_deplisthd; /* allocindir deps for this block */ + struct workhead ir_jwork; /* Journal work pending. */ }; /* @@ -389,31 +431,38 @@ struct indirdep { * can then be freed as it is no longer applicable. */ struct allocindir { - struct worklist ai_list; /* buffer holding indirect block */ -# define ai_state ai_list.wk_state /* indirect block pointer state */ + struct newblk ai_block; /* Common block area */ +# define ai_state ai_block.nb_list.wk_state /* indirect pointer state */ LIST_ENTRY(allocindir) ai_next; /* indirdep's list of allocindir's */ - int ai_offset; /* pointer offset in indirect block */ - ufs2_daddr_t ai_newblkno; /* new block pointer value */ - ufs2_daddr_t ai_oldblkno; /* old block pointer value */ - struct freefrag *ai_freefrag; /* block to be freed when complete */ struct indirdep *ai_indirdep; /* address of associated indirdep */ - LIST_ENTRY(allocindir) ai_deps; /* bmsafemap's list of allocindir's */ - struct buf *ai_buf; /* cylgrp buffer (if pending) */ }; +#define ai_newblkno ai_block.nb_newblkno +#define ai_oldblkno ai_block.nb_oldblkno +#define ai_offset ai_block.nb_offset +#define ai_freefrag ai_block.nb_freefrag /* + * The allblk union is used to size the newblk structure on allocation so + * that it may be any one of three types. + */ +union allblk { + struct allocindir ab_allocindir; + struct allocdirect ab_allocdirect; + struct newblk ab_newblk; +}; + +/* * A "freefrag" structure is attached to an "inodedep" when a previously * allocated fragment is replaced with a larger fragment, rather than extended. * The "freefrag" structure is constructed and attached when the replacement * block is first allocated. It is processed after the inode claiming the - * bigger block that replaces it has been written to disk. Note that the - * ff_state field is is used to store the uid, so may lose data. However, - * the uid is used only in printing an error message, so is not critical. - * Keeping it in a short keeps the data structure down to 32 bytes. + * bigger block that replaces it has been written to disk. */ struct freefrag { struct worklist ff_list; /* id_inowait or delayed worklist */ -# define ff_state ff_list.wk_state /* owning user; should be uid_t */ +# define ff_state ff_list.wk_state + struct jfreefrag *ff_jfreefrag; /* Associated journal entry. */ + struct workhead ff_jwork; /* Journal work pending. */ ufs2_daddr_t ff_blkno; /* fragment physical block number */ long ff_fragsize; /* size of fragment being deleted */ ino_t ff_inum; /* owning inode number */ @@ -423,23 +472,60 @@ struct freefrag { * A "freeblks" structure is attached to an "inodedep" when the * corresponding file's length is reduced to zero. It records all * the information needed to free the blocks of a file after its - * zero'ed inode has been written to disk. + * zero'ed inode has been written to disk. The actual work is done + * by child freework structures which are responsible for individual + * inode pointers while freeblks is responsible for retiring the + * entire operation when it is complete and holding common members. */ struct freeblks { struct worklist fb_list; /* id_inowait or delayed worklist */ # define fb_state fb_list.wk_state /* inode and dirty block state */ + struct jfreeblkhd fb_jfreeblkhd; /* Journal entries pending */ + struct workhead fb_freeworkhd; /* Work items pending */ + struct workhead fb_jwork; /* Journal work pending */ ino_t fb_previousinum; /* inode of previous owner of blocks */ uid_t fb_uid; /* uid of previous owner of blocks */ struct vnode *fb_devvp; /* filesystem device vnode */ - long fb_oldextsize; /* previous ext data size */ - off_t fb_oldsize; /* previous file size */ ufs2_daddr_t fb_chkcnt; /* used to check cnt of blks released */ - ufs2_daddr_t fb_dblks[NDADDR]; /* direct blk ptrs to deallocate */ - ufs2_daddr_t fb_iblks[NIADDR]; /* indirect blk ptrs to deallocate */ - ufs2_daddr_t fb_eblks[NXADDR]; /* indirect blk ptrs to deallocate */ + int fb_ref; /* Children outstanding. */ }; /* + * A "freework" structure handles the release of a tree of blocks or a single + * block. Each indirect block in a tree is allocated its own freework + * structure so that the indrect block may be freed only when all of its + * children are freed. In this way we enforce the rule that an allocated + * block must have a valid path to a root that is journaled. Each child + * block acquires a reference and when the ref hits zero the parent ref + * is decremented. If there is no parent the freeblks ref is decremented. + */ +struct freework { + struct worklist fw_list; +# define fw_state fw_list.wk_state + LIST_ENTRY(freework) fw_next; /* Queue for freeblksk. */ + struct freeblks *fw_freeblks; /* Root of operation. */ + struct freework *fw_parent; /* Parent indirect. */ + ufs2_daddr_t fw_blkno; /* Our block #. */ + ufs_lbn_t fw_lbn; /* Original lbn before free. */ + int fw_frags; /* Number of frags. */ + int fw_ref; /* Number of children out. */ + int fw_off; /* Current working position. */ + struct workhead fw_jwork; /* Journal work pending. */ +}; + +/* + * A "freedep" structure is allocated to track the completion of a bitmap + * write for a freework. One freedep may cover many freed blocks so long + * as they reside in the same cylinder group. When the cg is written + * the freedep decrements the ref on the freework which may permit it + * to be freed as well. + */ +struct freedep { + struct worklist fd_list; + struct freework *fd_freework; /* Parent freework. */ +}; + +/* * A "freefile" structure is attached to an inode when its * link count is reduced to zero. It marks the inode as free in * the cylinder group map after the zero'ed inode has been written @@ -450,6 +536,7 @@ struct freefile { mode_t fx_mode; /* mode of inode */ ino_t fx_oldinum; /* inum of the unlinked file */ struct vnode *fx_devvp; /* filesystem device vnode */ + struct workhead fx_jwork; /* journal work pending. */ }; /* @@ -482,12 +569,11 @@ struct freefile { * than zero. * * The overlaying of da_pagedep and da_previous is done to keep the - * structure down to 32 bytes in size on a 32-bit machine. If a - * da_previous entry is present, the pointer to its pagedep is available - * in the associated dirrem entry. If the DIRCHG flag is set, the - * da_previous entry is valid; if not set the da_pagedep entry is valid. - * The DIRCHG flag never changes; it is set when the structure is created - * if appropriate and is never cleared. + * structure down. If a da_previous entry is present, the pointer to its + * pagedep is available in the associated dirrem entry. If the DIRCHG flag + * is set, the da_previous entry is valid; if not set the da_pagedep entry + * is valid. The DIRCHG flag never changes; it is set when the structure + * is created if appropriate and is never cleared. */ struct diradd { struct worklist da_list; /* id_inowait or id_pendinghd list */ @@ -499,6 +585,7 @@ struct diradd { struct dirrem *dau_previous; /* entry being replaced in dir change */ struct pagedep *dau_pagedep; /* pagedep dependency for addition */ } da_un; + struct workhead da_jwork; /* Journal work awaiting completion. */ }; #define da_previous da_un.dau_previous #define da_pagedep da_un.dau_pagedep @@ -525,12 +612,13 @@ struct diradd { * mkdir structures that reference it. The deletion would be faster if the * diradd structure were simply augmented to have two pointers that referenced * the associated mkdir's. However, this would increase the size of the diradd - * structure from 32 to 64-bits to speed a very infrequent operation. + * structure to speed a very infrequent operation. */ struct mkdir { struct worklist md_list; /* id_inowait or buffer holding dir */ # define md_state md_list.wk_state /* type: MKDIR_PARENT or MKDIR_BODY */ struct diradd *md_diradd; /* associated diradd */ + struct jaddref *md_jaddref; /* dependent jaddref. */ struct buf *md_buf; /* MKDIR_BODY: buffer holding dir */ LIST_ENTRY(mkdir) md_mkdirs; /* list of all mkdirs */ }; @@ -542,20 +630,18 @@ LIST_HEAD(mkdirlist, mkdir) mkdirlisthd; * list of the pagedep for the directory page that contains the entry. * It is processed after the directory page with the deleted entry has * been written to disk. - * - * The overlaying of dm_pagedep and dm_dirinum is done to keep the - * structure down to 32 bytes in size on a 32-bit machine. It works - * because they are never used concurrently. */ struct dirrem { struct worklist dm_list; /* delayed worklist */ # define dm_state dm_list.wk_state /* state of the old directory entry */ LIST_ENTRY(dirrem) dm_next; /* pagedep's list of dirrem's */ + struct jremrefhd dm_jremrefhd; /* Pending remove reference deps. */ ino_t dm_oldinum; /* inum of the removed dir entry */ union { struct pagedep *dmu_pagedep; /* pagedep dependency for remove */ ino_t dmu_dirinum; /* parent inode number (for rmdir) */ } dm_un; + struct workhead dm_jwork; /* Journal work awaiting completion. */ }; #define dm_pagedep dm_un.dmu_pagedep #define dm_dirinum dm_un.dmu_dirinum @@ -577,9 +663,162 @@ struct dirrem { * blocks using a similar scheme with the allocindir structures. Rather * than adding this level of complexity, we simply write those newly * allocated indirect blocks synchronously as such allocations are rare. + * In the case of a new directory the . and .. links are tracked with + * a mkdir rather than a pagedep. In this case we track the mkdir + * so it can be released when it is written. A workhead is used + * to simplify canceling a mkdir that is removed by a subsequent dirrem. */ struct newdirblk { struct worklist db_list; /* id_inowait or pg_newdirblk */ # define db_state db_list.wk_state /* unused */ struct pagedep *db_pagedep; /* associated pagedep */ + struct workhead db_mkdir; }; + +/* + * A "jaddref" structure tracks a new reference (link count) on an inode + * and prevents the link count increase and bitmap allocation until a + * journal entry can be written. Once the journal entry is written, + * the inode is put on the pendinghd of the bmsafemap and a diradd or + * mkdir entry is placed on the bufwait list of the inode. The DEPCOMPLETE + * flag is used to indicate that all of the required information for writing + * the journal entry is present. MKDIR_BODY and MKDIR_PARENT are used to + * differentiate . and .. links from regular file names. NEWBLOCK indicates + * a bitmap is still pending. If a new reference is canceled by a delete + * prior to writing the journal the jaddref write is canceled and the + * structure persists to prevent any disk-visible changes until it is + * ultimately released when the file is freed or the link is dropped again. + */ +struct jaddref { + struct worklist ja_list; /* Journal pending or jseg entries. */ +# define ja_state ja_list.wk_state + struct jsegdep *ja_jsegdep; + union { + struct diradd *jau_diradd; /* Pending diradd. */ + struct mkdir *jau_mkdir; /* MKDIR_{PARENT,BODY} */ + } ja_un; + LIST_ENTRY(jaddref) ja_bmdeps; /* Links for bmsafemap. */ + LIST_ENTRY(jaddref) ja_inodeps; /* Links for inodedep. */ + off_t ja_diroff; /* Directory offset. */ + ino_t ja_ino; /* Inode number. */ + ino_t ja_parent; /* Parent inode number. */ + int16_t ja_nlink; /* nlink before addition. */ + uint16_t ja_mode; /* File mode, needed for IFMT. */ +}; +#define ja_diradd ja_un.jau_diradd +#define ja_mkdir ja_un.jau_mkdir + +/* + * A "jremref" structure tracks a removed reference (unlink) on an + * inode and prevents the directory remove from proceeding until the + * journal entry is written. Once the journal has been written the remove + * may proceed as normal. + */ +struct jremref { + struct worklist jr_list; /* Journal pending or jseg entries. */ +# define jr_state jr_list.wk_state + struct jsegdep *jr_jsegdep; + struct dirrem *jr_dirrem; /* Back pointer to dirrem. */ + LIST_ENTRY(jremref) jr_deps; /* Links for pagdep. */ + off_t jr_diroff; /* Directory offset. */ + ino_t jr_ino; /* Inode number. */ + ino_t jr_parent; /* Parent inode number. */ + int16_t jr_nlink; /* nlink before the removal. */ + uint16_t jr_mode; /* File mode, needed for IFMT. */ +}; + +struct jmvref { + struct worklist jm_list; + LIST_ENTRY(jmvref) jm_deps; + ino_t jm_parent; + ino_t jm_ino; + off_t jm_oldoff; + off_t jm_newoff; +}; + +/* + * A "jnewblk" structure tracks a newly allocated block or fragment and + * prevents the direct or indirect block pointer as well as the cg bitmap + * from being written until it is logged. After it is logged the jsegdep + * is attached to the allocdirect or allocindir until the operation is + * completed or reverted. If the operation is reverted prior to the journal + * write the jnewblk structure is maintained to prevent the bitmaps from + * reaching the disk. Ultimately the jnewblk structure will be passed + * to the free routine as the in memory cg is modified back to the free + * state at which time it can be released. + */ +struct jnewblk { + struct worklist jn_list; +# define jn_state jn_list.wk_state + struct jsegdep *jn_jsegdep; + LIST_ENTRY(jnewblk) jn_deps; /* All jnewblks on bmsafemap */ + struct newblk *jn_newblk; + ino_t jn_ino; + ufs_lbn_t jn_lbn; + ufs2_daddr_t jn_blkno; + int jn_oldfrags; + int jn_frags; +}; + +/* + * A "jfreeblk" structure tracks the journal write for freeing a block + * or tree of blocks. The block pointer must not be cleared in the inode + * or indirect prior to the jfreeblk being written. + */ +struct jfreeblk { + struct worklist jf_list; +# define jf_state jf_list.wk_state + struct jsegdep *jf_jsegdep; + struct freeblks *jf_freeblks; + LIST_ENTRY(jfreeblk) jf_deps; + ino_t jf_ino; + ufs_lbn_t jf_lbn; + ufs2_daddr_t jf_blkno; + int jf_frags; +}; + +/* + * A "jfreefrag" tracks the freeing of a single block when a fragment is + * extended or an indirect page is replaced. It is not part of a larger + * freeblks operation. + */ +struct jfreefrag { + struct worklist fr_list; +# define fr_state fr_list.wk_state + struct jsegdep *fr_jsegdep; + struct freefrag *fr_freefrag; + ino_t fr_ino; + ufs_lbn_t fr_lbn; + ufs2_daddr_t fr_blkno; + int fr_frags; +}; + +/* + * A "jsegdep" structure tracks a single reference to a written journal + * segment so the journal space can be reclaimed when all dependencies + * have been written. + */ +struct jsegdep { + struct worklist jd_list; +# define jd_state jd_list.wk_state + struct jseg *jd_seg; +}; + +/* + * A "jseg" structure contains all of the journal records written in a + * single disk write. jaddref and jremref structures are linked into + * js_entries so thay may be completed when the write completes. The + * js_deps array contains as many entries as there are ref counts to + * reduce the number of allocations required per journal write to one. + */ +struct jseg { + struct worklist js_list; /* b_deps link for journal */ + struct workhead js_entries; /* Entries awaiting write */ + TAILQ_ENTRY(jseg) js_next; + struct jblocks *js_jblocks; /* Back pointer to block/seg list */ + struct buf *js_buf; /* Buffer while unwritten */ + uint64_t js_seq; + int js_size; /* Allocated size in bytes */ + int js_cnt; /* Total items allocated */ + int js_refs; /* Count of items pending completion */ +}; Index: /usr/src/sys/ufs/ffs/ffs_balloc.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_balloc.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_balloc.c (working copy) @@ -138,7 +138,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse if (error) return (error); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, nb, + softdep_setup_allocdirect(ip, nb, nb, dbtofsb(fs, bp->b_blkno), dp->di_db[nb], fs->fs_bsize, osize, bp); ip->i_size = smalllblktosize(fs, nb + 1); @@ -190,7 +190,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse if (error) return (error); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, lbn, + softdep_setup_allocdirect(ip, lbn, lbn, dbtofsb(fs, bp->b_blkno), nb, nsize, osize, bp); } @@ -210,7 +210,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse if (flags & BA_CLRBUF) vfs_bio_clrbuf(bp); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, lbn, newb, 0, + softdep_setup_allocdirect(ip, lbn, lbn, newb, 0, nsize, 0, bp); } dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno); @@ -255,7 +255,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse vfs_bio_clrbuf(bp); if (DOINGSOFTDEP(vp)) { softdep_setup_allocdirect(ip, NDADDR + indirs[0].in_off, - newb, 0, fs->fs_bsize, 0, bp); + indirs[0].in_lbn, newb, 0, fs->fs_bsize, 0, bp); bdwrite(bp); } else { /* @@ -305,8 +305,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse nbp->b_blkno = fsbtodb(fs, nb); vfs_bio_clrbuf(nbp); if (DOINGSOFTDEP(vp)) { - softdep_setup_allocindir_meta(nbp, ip, bp, - indirs[i - 1].in_off, nb); + softdep_setup_allocindir_meta(nbp, ip, bp, indirs, i, + nb); bdwrite(nbp); } else { /* @@ -361,8 +361,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffse if (flags & BA_CLRBUF) vfs_bio_clrbuf(nbp); if (DOINGSOFTDEP(vp)) - softdep_setup_allocindir_page(ip, lbn, bp, - indirs[i].in_off, nb, 0, nbp); + softdep_setup_allocindir_page(ip, bp, indirs, i, lbn, + nb, 0, nbp); bap[indirs[i].in_off] = nb; /* * If required, write synchronously, otherwise use @@ -418,6 +418,8 @@ fail: * slow, running out of disk space is not expected to be a common * occurence. The error return from fsync is ignored as we already * have an error to return to the user. + * + * XXX Still have to journal the free below */ (void) ffs_syncvnode(vp, MNT_WAIT); for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns; @@ -473,7 +475,7 @@ fail: */ for (blkp = allociblk; blkp < allocblk; blkp++) { ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, - ip->i_number); + ip->i_number, NULL); } return (error); } @@ -643,7 +645,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse if (error) return (error); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, nb, + softdep_setup_allocdirect(ip, nb, nb, dbtofsb(fs, bp->b_blkno), dp->di_db[nb], fs->fs_bsize, osize, bp); @@ -696,7 +698,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse if (error) return (error); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, lbn, + softdep_setup_allocdirect(ip, lbn, lbn, dbtofsb(fs, bp->b_blkno), nb, nsize, osize, bp); } @@ -716,7 +718,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse if (flags & BA_CLRBUF) vfs_bio_clrbuf(bp); if (DOINGSOFTDEP(vp)) - softdep_setup_allocdirect(ip, lbn, newb, 0, + softdep_setup_allocdirect(ip, lbn, lbn, newb, 0, nsize, 0, bp); } dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno); @@ -761,7 +763,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse vfs_bio_clrbuf(bp); if (DOINGSOFTDEP(vp)) { softdep_setup_allocdirect(ip, NDADDR + indirs[0].in_off, - newb, 0, fs->fs_bsize, 0, bp); + indirs[0].in_lbn, newb, 0, fs->fs_bsize, 0, bp); bdwrite(bp); } else { /* @@ -811,8 +813,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse nbp->b_blkno = fsbtodb(fs, nb); vfs_bio_clrbuf(nbp); if (DOINGSOFTDEP(vp)) { - softdep_setup_allocindir_meta(nbp, ip, bp, - indirs[i - 1].in_off, nb); + softdep_setup_allocindir_meta(nbp, ip, bp, indirs, i, + nb); bdwrite(nbp); } else { /* @@ -867,8 +869,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffse if (flags & BA_CLRBUF) vfs_bio_clrbuf(nbp); if (DOINGSOFTDEP(vp)) - softdep_setup_allocindir_page(ip, lbn, bp, - indirs[i].in_off, nb, 0, nbp); + softdep_setup_allocindir_page(ip, bp, indirs, i, lbn, + nb, 0, nbp); bap[indirs[i].in_off] = nb; /* * If required, write synchronously, otherwise use @@ -930,6 +932,8 @@ fail: * slow, running out of disk space is not expected to be a common * occurence. The error return from fsync is ignored as we already * have an error to return to the user. + * + * XXX Still have to journal the free below */ (void) ffs_syncvnode(vp, MNT_WAIT); for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns; @@ -985,7 +989,7 @@ fail: */ for (blkp = allociblk; blkp < allocblk; blkp++) { ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, - ip->i_number); + ip->i_number, NULL); } return (error); } Index: /usr/src/sys/ufs/ffs/ffs_inode.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_inode.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_inode.c (working copy) @@ -232,7 +232,7 @@ ffs_truncate(vp, length, flags, cred, td) if (oldblks[i] == 0) continue; ffs_blkfree(ump, fs, ip->i_devvp, oldblks[i], - sblksize(fs, osize, i), ip->i_number); + sblksize(fs, osize, i), ip->i_number, NULL); } } } @@ -336,6 +336,8 @@ ffs_truncate(vp, length, flags, cred, td) * zero'ed in case it ever becomes accessible again because * of subsequent file growth. Directories however are not * zero'ed as they should grow back initialized to empty. + * + * XXX Still need to manually journal this. */ offset = blkoff(fs, length); if (offset == 0) { @@ -445,7 +447,7 @@ ffs_truncate(vp, length, flags, cred, td) if (lastiblock[level] < 0) { DIP_SET(ip, i_ib[level], 0); ffs_blkfree(ump, fs, ip->i_devvp, bn, - fs->fs_bsize, ip->i_number); + fs->fs_bsize, ip->i_number, NULL); blocksreleased += nblocks; } } @@ -464,7 +466,8 @@ ffs_truncate(vp, length, flags, cred, td) continue; DIP_SET(ip, i_db[i], 0); bsize = blksize(fs, ip, i); - ffs_blkfree(ump, fs, ip->i_devvp, bn, bsize, ip->i_number); + ffs_blkfree(ump, fs, ip->i_devvp, bn, bsize, ip->i_number, + NULL); blocksreleased += btodb(bsize); } if (lastblock < 0) @@ -496,7 +499,7 @@ ffs_truncate(vp, length, flags, cred, td) */ bn += numfrags(fs, newspace); ffs_blkfree(ump, fs, ip->i_devvp, bn, - oldspace - newspace, ip->i_number); + oldspace - newspace, ip->i_number, NULL); blocksreleased += btodb(oldspace - newspace); } } @@ -638,7 +641,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp blocksreleased += blkcount; } ffs_blkfree(ip->i_ump, fs, ip->i_devvp, nb, fs->fs_bsize, - ip->i_number); + ip->i_number, NULL); blocksreleased += nblocks; } Index: /usr/src/sys/ufs/ffs/ffs_snapshot.c =================================================================== --- /usr/src/sys/ufs/ffs/ffs_snapshot.c (revision 200709) +++ /usr/src/sys/ufs/ffs/ffs_snapshot.c (working copy) @@ -582,7 +582,8 @@ loop: len = fragroundup(fs, blkoff(fs, xp->i_size)); if (len != 0 && len < fs->fs_bsize) { ffs_blkfree(ump, copy_fs, vp, - DIP(xp, i_db[loc]), len, xp->i_number); + DIP(xp, i_db[loc]), len, xp->i_number, + NULL); blkno = DIP(xp, i_db[loc]); DIP_SET(xp, i_db[loc], 0); } @@ -598,7 +599,7 @@ loop: DIP_SET(xp, i_db[loc], blkno); if (!error) error = ffs_freefile(ump, copy_fs, vp, xp->i_number, - xp->i_mode); + xp->i_mode, NULL); VOP_UNLOCK(xvp, 0); vdrop(xvp); if (error) { @@ -700,7 +701,7 @@ out1: copy_fs, vp, xp->i_number, - xp->i_mode); + xp->i_mode, NULL); } if (error) { fs->fs_snapinum[snaploc] = 0; @@ -1220,7 +1221,7 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, ex *ip->i_snapblklist++ = lblkno; if (blkno == BLK_SNAP) blkno = blkstofrags(fs, lblkno); - ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum); + ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum, NULL); } return (0); } @@ -1500,7 +1501,7 @@ mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, ex *ip->i_snapblklist++ = lblkno; if (blkno == BLK_SNAP) blkno = blkstofrags(fs, lblkno); - ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum); + ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum, NULL); } return (0); } Index: /usr/src/sys/ufs/ffs/fs.h =================================================================== --- /usr/src/sys/ufs/ffs/fs.h (revision 200709) +++ /usr/src/sys/ufs/ffs/fs.h (working copy) @@ -337,7 +337,10 @@ struct fs { int32_t fs_avgfilesize; /* expected average file size */ int32_t fs_avgfpdir; /* expected # of files per directory */ int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */ - int32_t fs_sparecon32[26]; /* reserved for future constants */ + int32_t fs_sujournal; /* SUJ journal file */ + int32_t fs_sujfree; /* SUJ free list */ + ufs_time_t fs_mtime; /* Last mount or fsck time. */ + int32_t fs_sparecon32[22]; /* reserved for future constants */ int32_t fs_flags; /* see FS_ flags below */ int32_t fs_contigsumsize; /* size of cluster summary array */ int32_t fs_maxsymlinklen; /* max length of an internal symlink */ @@ -409,6 +412,7 @@ CTASSERT(sizeof(struct fs) == 1376); #define FS_MULTILABEL 0x20 /* file system is MAC multi-label */ #define FS_GJOURNAL 0x40 /* gjournaled file system */ #define FS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */ +#define FS_SUJ 0x100 /* Filesystem using softupdate journal */ /* * Macros to access bits in the fs_active array. @@ -598,8 +602,32 @@ struct cg { ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (size))))) - /* + * Indirect lbns are aligned on NDADDR addresses where single indirects + * are the negated address of the lowest lbn reachable, double indirects + * are this lbn - 1 and triple indirects are this lbn - 2. This yields + * an unusual bit order to determine level. + */ +static inline int +lbn_level(ufs_lbn_t lbn) +{ + if (lbn >= 0) + return 0; + switch (lbn & 0x3) { + case 0: + return (0); + case 1: + break; + case 2: + return (2); + case 3: + return (1); + default: + break; + } + return (-1); +} +/* * Number of inodes in a secondary storage block/fragment. */ #define INOPB(fs) ((fs)->fs_inopb) @@ -610,6 +638,78 @@ struct cg { */ #define NINDIR(fs) ((fs)->fs_nindir) +/* + * Softdep journal record format. + */ + +#define JOP_ADDREF 1 /* Add a reference to an inode. */ +#define JOP_REMREF 2 /* Remove a reference from an inode. */ +#define JOP_NEWBLK 3 /* Allocate a block. */ +#define JOP_FREEBLK 4 /* Free a block or a tree of blocks. */ +#define JOP_MVREF 5 /* Move a reference from one off to another. */ + +#define JREC_SIZE 32 /* Record and segment header size. */ + +#define SUJ_MIN (1 * 1024 * 1024) /* Minimum journal size */ +#define SUJ_MAX (128 * SUJ_MIN) /* Maximum journal size */ + +/* + * Size of the segment record header. There is at most one for each disk + * block and at least one for each filesystem block in the journal. The + * segment header is followed by an array of records. + */ +struct jsegrec { + uint64_t jsr_seq; /* Our sequence number */ + uint64_t jsr_oldest; /* Oldest valid sequence number */ + uint32_t jsr_cnt; /* Count of valid records */ + uint32_t jsr_crc; /* 32bit crc of the valid space */ + ufs_time_t jsr_time; /* timestamp for mount instance */ +}; + +struct jrefrec { + uint32_t jr_op; + ino_t jr_ino; + ino_t jr_parent; + int16_t jr_nlink; + uint16_t jr_mode; + off_t jr_diroff; + uint64_t jr_unused; +}; + +struct jmvrec { + uint32_t jm_op; + ino_t jm_ino; + ino_t jm_parent; + uint16_t jm_unused; + off_t jm_oldoff; + off_t jm_newoff; +}; + +struct jblkrec { + uint32_t jb_op; + uint32_t jb_ino; + ufs2_daddr_t jb_blkno; + ufs_lbn_t jb_lbn; + uint16_t jb_frags; + uint16_t jb_oldfrags; + uint32_t jb_unused; +}; + +union jrec { + struct jsegrec rec_jsegrec; + struct jrefrec rec_jrefrec; + struct jmvrec rec_jmvrec; + struct jblkrec rec_jblkrec; +}; + +#ifdef CTASSERT +CTASSERT(sizeof(struct jsegrec) == JREC_SIZE); +CTASSERT(sizeof(struct jrefrec) == JREC_SIZE); +CTASSERT(sizeof(struct jmvrec) == JREC_SIZE); +CTASSERT(sizeof(struct jblkrec) == JREC_SIZE); +CTASSERT(sizeof(union jrec) == JREC_SIZE); +#endif + extern int inside[], around[]; extern u_char *fragtbl[]; -- Test scenario: run.sh marcus.cfg