diff --git a/share/man/man5/tarfs.5 b/share/man/man5/tarfs.5 --- a/share/man/man5/tarfs.5 +++ b/share/man/man5/tarfs.5 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 2, 2023 +.Dd February 14, 2023 .Dt TARFS 5 .Os .Sh NAME @@ -81,6 +81,7 @@ .It 0x40 Ta Decompression .It 0x80 Ta Decompression index .It 0x100 Ta Sparse file mapping +.It 0x200 Ta Bounce buffer usage .El .Sh SEE ALSO .Xr tar 1 , diff --git a/sys/fs/tarfs/tarfs_dbg.h b/sys/fs/tarfs/tarfs_dbg.h --- a/sys/fs/tarfs/tarfs_dbg.h +++ b/sys/fs/tarfs/tarfs_dbg.h @@ -45,6 +45,7 @@ #define TARFS_DEBUG_ZIO 0x40 #define TARFS_DEBUG_ZIDX 0x80 #define TARFS_DEBUG_MAP 0x100 +#define TARFS_DEBUG_BOUNCE 0x200 #define TARFS_DPF(category, fmt, ...) \ do { \ diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c --- a/sys/fs/tarfs/tarfs_io.c +++ b/sys/fs/tarfs/tarfs_io.c @@ -391,7 +391,7 @@ if (uiop->uio_segflg == UIO_SYSSPACE) { zob.dst = uiop->uio_iov->iov_base; } else { - TARFS_DPF(ALLOC, "%s: allocating %zu-byte bounce buffer\n", + TARFS_DPF(BOUNCE, "%s: allocating %zu-byte bounce buffer\n", __func__, len); zob.dst = obuf = malloc(len, M_TEMP, M_WAITOK); } @@ -488,7 +488,7 @@ if (uiop->uio_segflg == UIO_SYSSPACE) { uiop->uio_resid = resid; } else if (len > resid) { - TARFS_DPF(ALLOC, "%s: bounced %zu bytes\n", __func__, + TARFS_DPF(BOUNCE, "%s: bounced %zu bytes\n", __func__, len - resid); error = uiomove(obuf, len - resid, uiop); #ifdef TARFS_DEBUG @@ -497,7 +497,7 @@ } } if (obuf != NULL) { - TARFS_DPF(ALLOC, "%s: freeing bounce buffer\n", __func__); + TARFS_DPF(BOUNCE, "%s: freeing bounce buffer\n", __func__); free(obuf, M_TEMP); } if (rl != NULL)