MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_dump_mount_counters

Function vfs_dump_mount_counters

freebsd/kern/vfs_mount.c:1649–1689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1647}
1648
1649void
1650vfs_dump_mount_counters(struct mount *mp)
1651{
1652 struct mount_pcpu *mpcpu;
1653 int ref, lockref, writeopcount;
1654 int cpu;
1655
1656 printf("%s: mp %p vfs_ops %d\n", __func__, mp, mp->mnt_vfs_ops);
1657
1658 printf(" ref : ");
1659 ref = mp->mnt_ref;
1660 CPU_FOREACH(cpu) {
1661 mpcpu = vfs_mount_pcpu_remote(mp, cpu);
1662 printf("%d ", mpcpu->mntp_ref);
1663 ref += mpcpu->mntp_ref;
1664 }
1665 printf("\n");
1666 printf(" lockref : ");
1667 lockref = mp->mnt_lockref;
1668 CPU_FOREACH(cpu) {
1669 mpcpu = vfs_mount_pcpu_remote(mp, cpu);
1670 printf("%d ", mpcpu->mntp_lockref);
1671 lockref += mpcpu->mntp_lockref;
1672 }
1673 printf("\n");
1674 printf("writeopcount: ");
1675 writeopcount = mp->mnt_writeopcount;
1676 CPU_FOREACH(cpu) {
1677 mpcpu = vfs_mount_pcpu_remote(mp, cpu);
1678 printf("%d ", mpcpu->mntp_writeopcount);
1679 writeopcount += mpcpu->mntp_writeopcount;
1680 }
1681 printf("\n");
1682
1683 printf("counter struct total\n");
1684 printf("ref %-5d %-5d\n", mp->mnt_ref, ref);
1685 printf("lockref %-5d %-5d\n", mp->mnt_lockref, lockref);
1686 printf("writeopcount %-5d %-5d\n", mp->mnt_writeopcount, writeopcount);
1687
1688 panic("invalid counts on struct mount");
1689}
1690#endif
1691
1692int

Callers 3

vn_finished_writeFunction · 0.85
vfs_unbusyFunction · 0.85

Calls 2

printfFunction · 0.70
panicFunction · 0.70

Tested by

no test coverage detected