| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: vfs_subr.c,v 1.488 2020/05/26 18:38:37 ad Exp $ */ | | 1 | /* $NetBSD: vfs_subr.c,v 1.489 2020/07/26 21:28:33 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020 | | 4 | * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020 |
5 | * The NetBSD Foundation, Inc. | | 5 | * The NetBSD Foundation, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to The NetBSD Foundation | | 8 | * This code is derived from software contributed to The NetBSD Foundation |
9 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 9 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
10 | * NASA Ames Research Center, by Charles M. Hannum, by Andrew Doran, | | 10 | * NASA Ames Research Center, by Charles M. Hannum, by Andrew Doran, |
11 | * by Marshall Kirk McKusick and Greg Ganger at the University of Michigan. | | 11 | * by Marshall Kirk McKusick and Greg Ganger at the University of Michigan. |
12 | * | | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | | 13 | * Redistribution and use in source and binary forms, with or without |
14 | * modification, are permitted provided that the following conditions | | 14 | * modification, are permitted provided that the following conditions |
| @@ -59,27 +59,27 @@ | | | @@ -59,27 +59,27 @@ |
59 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 59 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
60 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 60 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
61 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 61 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
62 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 62 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
63 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 63 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
64 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 64 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
65 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 65 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
66 | * SUCH DAMAGE. | | 66 | * SUCH DAMAGE. |
67 | * | | 67 | * |
68 | * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 | | 68 | * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 |
69 | */ | | 69 | */ |
70 | | | 70 | |
71 | #include <sys/cdefs.h> | | 71 | #include <sys/cdefs.h> |
72 | __KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.488 2020/05/26 18:38:37 ad Exp $"); | | 72 | __KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.489 2020/07/26 21:28:33 christos Exp $"); |
73 | | | 73 | |
74 | #ifdef _KERNEL_OPT | | 74 | #ifdef _KERNEL_OPT |
75 | #include "opt_ddb.h" | | 75 | #include "opt_ddb.h" |
76 | #include "opt_compat_netbsd.h" | | 76 | #include "opt_compat_netbsd.h" |
77 | #include "opt_compat_43.h" | | 77 | #include "opt_compat_43.h" |
78 | #endif | | 78 | #endif |
79 | | | 79 | |
80 | #include <sys/param.h> | | 80 | #include <sys/param.h> |
81 | #include <sys/systm.h> | | 81 | #include <sys/systm.h> |
82 | #include <sys/conf.h> | | 82 | #include <sys/conf.h> |
83 | #include <sys/dirent.h> | | 83 | #include <sys/dirent.h> |
84 | #include <sys/filedesc.h> | | 84 | #include <sys/filedesc.h> |
85 | #include <sys/kernel.h> | | 85 | #include <sys/kernel.h> |
| @@ -1533,27 +1533,27 @@ vfs_buf_print(struct buf *bp, int full, | | | @@ -1533,27 +1533,27 @@ vfs_buf_print(struct buf *bp, int full, |
1533 | (*pr)(" bufsize 0x%lx bcount 0x%lx resid 0x%lx\n", | | 1533 | (*pr)(" bufsize 0x%lx bcount 0x%lx resid 0x%lx\n", |
1534 | bp->b_bufsize, bp->b_bcount, bp->b_resid); | | 1534 | bp->b_bufsize, bp->b_bcount, bp->b_resid); |
1535 | (*pr)(" data %p saveaddr %p\n", | | 1535 | (*pr)(" data %p saveaddr %p\n", |
1536 | bp->b_data, bp->b_saveaddr); | | 1536 | bp->b_data, bp->b_saveaddr); |
1537 | (*pr)(" iodone %p objlock %p\n", bp->b_iodone, bp->b_objlock); | | 1537 | (*pr)(" iodone %p objlock %p\n", bp->b_iodone, bp->b_objlock); |
1538 | } | | 1538 | } |
1539 | | | 1539 | |
1540 | void | | 1540 | void |
1541 | vfs_vnode_print(struct vnode *vp, int full, void (*pr)(const char *, ...)) | | 1541 | vfs_vnode_print(struct vnode *vp, int full, void (*pr)(const char *, ...)) |
1542 | { | | 1542 | { |
1543 | | | 1543 | |
1544 | uvm_object_printit(&vp->v_uobj, full, pr); | | 1544 | uvm_object_printit(&vp->v_uobj, full, pr); |
1545 | (*pr)("\n"); | | 1545 | (*pr)("\n"); |
1546 | vprint_common(vp, "", printf); | | 1546 | vprint_common(vp, "", pr); |
1547 | if (full) { | | 1547 | if (full) { |
1548 | struct buf *bp; | | 1548 | struct buf *bp; |
1549 | | | 1549 | |
1550 | (*pr)("clean bufs:\n"); | | 1550 | (*pr)("clean bufs:\n"); |
1551 | LIST_FOREACH(bp, &vp->v_cleanblkhd, b_vnbufs) { | | 1551 | LIST_FOREACH(bp, &vp->v_cleanblkhd, b_vnbufs) { |
1552 | (*pr)(" bp %p\n", bp); | | 1552 | (*pr)(" bp %p\n", bp); |
1553 | vfs_buf_print(bp, full, pr); | | 1553 | vfs_buf_print(bp, full, pr); |
1554 | } | | 1554 | } |
1555 | | | 1555 | |
1556 | (*pr)("dirty bufs:\n"); | | 1556 | (*pr)("dirty bufs:\n"); |
1557 | LIST_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) { | | 1557 | LIST_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) { |
1558 | (*pr)(" bp %p\n", bp); | | 1558 | (*pr)(" bp %p\n", bp); |
1559 | vfs_buf_print(bp, full, pr); | | 1559 | vfs_buf_print(bp, full, pr); |