From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 02/27] xfsprogs: remove unused IO_DEBUG functionality
Date: Thu, 15 Oct 2020 18:21:30 +1100 [thread overview]
Message-ID: <20201015072155.1631135-3-david@fromorbit.com> (raw)
In-Reply-To: <20201015072155.1631135-1-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Similar to the XFS_BUF_TRACING code, this is largely unused and not
hugely helpfule for tracing buffer IO. Remove it to simplify the
conversion process to the kernel buffer cache.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
libxfs/Makefile | 1 -
libxfs/rdwr.c | 45 ---------------------------------------------
2 files changed, 46 deletions(-)
diff --git a/libxfs/Makefile b/libxfs/Makefile
index 44b23816e20b..de595b7cd49f 100644
--- a/libxfs/Makefile
+++ b/libxfs/Makefile
@@ -102,7 +102,6 @@ CFILES = cache.c \
#
# Tracing flags:
-# -DIO_DEBUG reads and writes of buffers
# -DMEM_DEBUG all zone memory use
# -DLI_DEBUG log item (ino/buf) manipulation
# -DXACT_DEBUG transaction state changes
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 51494f71fcfa..11ff7f44b32a 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -340,12 +340,6 @@ libxfs_getbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen)
bp =__libxfs_getbufr(blen);
if (bp)
libxfs_initbuf(bp, btp, blkno, blen);
-#ifdef IO_DEBUG
- printf("%lx: %s: allocated %u bytes buffer, key=0x%llx(0x%llx), %p\n",
- pthread_self(), __FUNCTION__, blen,
- (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp);
-#endif
-
return bp;
}
@@ -374,12 +368,6 @@ libxfs_getbufr_map(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen,
bp =__libxfs_getbufr(blen);
if (bp)
libxfs_initbuf_map(bp, btp, map, nmaps);
-#ifdef IO_DEBUG
- printf("%lx: %s: allocated %u bytes buffer, key=0x%llx(0x%llx), %p\n",
- pthread_self(), __FUNCTION__, blen,
- (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp);
-#endif
-
return bp;
}
@@ -427,12 +415,6 @@ __cache_lookup(
cache_node_set_priority(libxfs_bcache, cn,
cache_node_get_priority(cn) - CACHE_PREFETCH_PRIORITY);
-#ifdef IO_DEBUG
- printf("%lx %s: hit buffer %p for bno = 0x%llx/0x%llx\n",
- pthread_self(), __FUNCTION__,
- bp, bp->b_bn, (long long)LIBXFS_BBTOOFF64(key->blkno));
-#endif
-
*bpp = bp;
return 0;
}
@@ -607,11 +589,6 @@ libxfs_readbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, xfs_buf_t *bp,
bp->b_bn == blkno &&
bp->b_bcount == bytes)
bp->b_flags |= LIBXFS_B_UPTODATE;
-#ifdef IO_DEBUG
- printf("%lx: %s: read %u bytes, error %d, blkno=0x%llx(0x%llx), %p\n",
- pthread_self(), __FUNCTION__, bytes, error,
- (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp);
-#endif
bp->b_error = error;
return error;
}
@@ -654,11 +631,6 @@ libxfs_readbufr_map(struct xfs_buftarg *btp, struct xfs_buf *bp, int flags)
if (!error)
bp->b_flags |= LIBXFS_B_UPTODATE;
-#ifdef IO_DEBUG
- printf("%lx: %s: read %lu bytes, error %d, blkno=%llu(%llu), %p\n",
- pthread_self(), __FUNCTION__, buf - (char *)bp->b_addr, error,
- (long long)LIBXFS_BBTOOFF64(bp->b_bn), (long long)bp->b_bn, bp);
-#endif
return error;
}
@@ -728,11 +700,6 @@ libxfs_buf_read_map(
goto err;
ok:
-#ifdef IO_DEBUGX
- printf("%lx: %s: read %lu bytes, error %d, blkno=%llu(%llu), %p\n",
- pthread_self(), __FUNCTION__, buf - (char *)bp->b_addr, error,
- (long long)LIBXFS_BBTOOFF64(bp->b_bn), (long long)bp->b_bn, bp);
-#endif
*bpp = bp;
return 0;
err:
@@ -881,12 +848,6 @@ libxfs_bwrite(
}
}
-#ifdef IO_DEBUG
- printf("%lx: %s: wrote %u bytes, blkno=%llu(%llu), %p, error %d\n",
- pthread_self(), __FUNCTION__, bp->b_bcount,
- (long long)LIBXFS_BBTOOFF64(bp->b_bn),
- (long long)bp->b_bn, bp, bp->b_error);
-#endif
if (bp->b_error) {
fprintf(stderr,
_("%s: write failed on %s bno 0x%llx/0x%x, err=%d\n"),
@@ -907,12 +868,6 @@ void
libxfs_buf_mark_dirty(
struct xfs_buf *bp)
{
-#ifdef IO_DEBUG
- printf("%lx: %s: dirty blkno=%llu(%llu)\n",
- pthread_self(), __FUNCTION__,
- (long long)LIBXFS_BBTOOFF64(bp->b_bn),
- (long long)bp->b_bn);
-#endif
/*
* Clear any error hanging over from reading the buffer. This prevents
* subsequent reads after this write from seeing stale errors.
--
2.28.0
next prev parent reply other threads:[~2020-10-15 7:22 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 7:21 [PATCH 00/27] [RFC, WIP] xfsprogs: xfs_buf unification and AIO Dave Chinner
2020-10-15 7:21 ` [PATCH 01/27] xfsprogs: remove unused buffer tracing code Dave Chinner
2020-10-15 7:21 ` Dave Chinner [this message]
2020-11-16 2:31 ` [PATCH 02/27] xfsprogs: remove unused IO_DEBUG functionality Eric Sandeen
2020-10-15 7:21 ` [PATCH 03/27] libxfs: get rid of b_bcount from xfs_buf Dave Chinner
2020-11-23 19:53 ` Eric Sandeen
2020-10-15 7:21 ` [PATCH 04/27] libxfs: rename buftarg->dev to btdev Dave Chinner
2020-11-16 2:33 ` Eric Sandeen
2020-10-15 7:21 ` [PATCH 05/27] xfsprogs: get rid of ancient btree tracing fragments Dave Chinner
2020-11-16 2:35 ` Eric Sandeen
2020-10-15 7:21 ` [PATCH 06/27] xfsprogs: remove xfs_buf_t typedef Dave Chinner
2020-10-15 15:22 ` Darrick J. Wong
2020-10-15 20:54 ` Dave Chinner
2020-10-15 7:21 ` [PATCH 07/27] xfsprogs: introduce liburcu support Dave Chinner
2020-10-15 7:21 ` [PATCH 08/27] libxfs: add spinlock_t wrapper Dave Chinner
2020-10-15 7:21 ` [PATCH 09/27] atomic: convert to uatomic Dave Chinner
2020-10-15 7:21 ` [PATCH 10/27] libxfs: add kernel-compatible completion API Dave Chinner
2020-10-15 17:09 ` Darrick J. Wong
2020-10-19 22:21 ` Dave Chinner
2020-10-15 7:21 ` [PATCH 11/27] libxfs: add wrappers for kernel semaphores Dave Chinner
2020-10-15 7:21 ` [PATCH 12/27] xfsprogs: convert use-once buffer reads to uncached IO Dave Chinner
2020-10-15 17:12 ` Darrick J. Wong
2020-10-19 22:36 ` Dave Chinner
2020-10-15 7:21 ` [PATCH 13/27] libxfs: introduce userspace buftarg infrastructure Dave Chinner
2020-10-15 7:21 ` [PATCH 14/27] xfs: rename libxfs_buftarg_init to libxfs_open_devices() Dave Chinner
2020-10-15 7:21 ` [PATCH 15/27] libxfs: introduce userspace buftarg infrastructure Dave Chinner
2020-10-15 17:16 ` Darrick J. Wong
2020-10-15 7:21 ` [PATCH 16/27] libxfs: add a synchronous IO engine to the buftarg Dave Chinner
2020-10-15 7:21 ` [PATCH 17/27] xfsprogs: convert libxfs_readbufr to libxfs_buf_read_uncached Dave Chinner
2020-10-15 7:21 ` [PATCH 18/27] libxfs: convert libxfs_bwrite to buftarg IO Dave Chinner
2020-10-15 7:21 ` [PATCH 19/27] libxfs: add cache infrastructure to buftarg Dave Chinner
2020-10-15 7:21 ` [PATCH 20/27] libxfs: add internal lru to btcache Dave Chinner
2020-10-15 7:21 ` [PATCH 21/27] libxfs: Add kernel list_lru wrapper Dave Chinner
2020-10-15 7:21 ` [PATCH 22/27] libxfs: introduce new buffer cache infrastructure Dave Chinner
2020-10-15 17:46 ` Darrick J. Wong
2020-10-15 7:21 ` [PATCH 23/27] libxfs: use PSI information to detect memory pressure Dave Chinner
2020-10-15 17:56 ` Darrick J. Wong
2020-10-15 21:20 ` Dave Chinner
2020-10-15 7:21 ` [PATCH 24/27] libxfs: add a buftarg cache shrinker implementation Dave Chinner
2020-10-15 18:01 ` Darrick J. Wong
2020-10-15 21:33 ` Dave Chinner
2020-10-15 7:21 ` [PATCH 25/27] libxfs: switch buffer cache implementations Dave Chinner
2020-10-15 7:21 ` [PATCH 26/27] build: set platform_defs.h.in dependency correctly Dave Chinner
2020-10-15 7:21 ` [PATCH 27/27] libxfs: convert sync IO buftarg engine to AIO Dave Chinner
2020-10-15 18:26 ` Darrick J. Wong
2020-10-15 21:42 ` Dave Chinner
2020-10-15 7:29 ` [PATCH 00/27] [RFC, WIP] xfsprogs: xfs_buf unification and AIO Dave Chinner
2020-10-15 18:37 ` Darrick J. Wong
2020-10-15 22:35 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201015072155.1631135-3-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.