Message ID | 158216304905.602314.17780460003947176973.stgit@magnolia (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | xfsprogs: refactor buffer function names | expand |
On Wed, Feb 19, 2020 at 05:44:09PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > Hide these two functions because they're not used outside of rdwr.c. Can we also pick a better name? That r postfix always seem very strange to me.
On Fri, Feb 21, 2020 at 06:53:54AM -0800, Christoph Hellwig wrote: > On Wed, Feb 19, 2020 at 05:44:09PM -0800, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@oracle.com> > > > > Hide these two functions because they're not used outside of rdwr.c. > > Can we also pick a better name? That r postfix always seem very strange > to me. They're odd, but I also don't really have a good suggestion... getbufr -> xfs_buf_get_raw? putbufr -> xfs_buf_commit? --D
diff --git a/libxfs/libxfs_io.h b/libxfs/libxfs_io.h index 1f6e6d97..7d96c2a3 100644 --- a/libxfs/libxfs_io.h +++ b/libxfs/libxfs_io.h @@ -216,9 +216,6 @@ extern void libxfs_bcache_flush(void); extern int libxfs_bcache_overflowed(void); /* Buffer (Raw) Interfaces */ -extern xfs_buf_t *libxfs_getbufr(struct xfs_buftarg *, xfs_daddr_t, int); -extern void libxfs_putbufr(xfs_buf_t *); - int libxfs_bwrite(struct xfs_buf *); extern int libxfs_readbufr(struct xfs_buftarg *, xfs_daddr_t, xfs_buf_t *, int, int); extern int libxfs_readbufr_map(struct xfs_buftarg *, struct xfs_buf *, int); diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c index 9302a698..bab70dfd 100644 --- a/libxfs/rdwr.c +++ b/libxfs/rdwr.c @@ -52,6 +52,10 @@ * propagation of stale errors into future buffer operations. */ +static struct xfs_buf *libxfs_getbufr(struct xfs_buftarg *btp, + xfs_daddr_t daddr, int len); +static void libxfs_putbufr(struct xfs_buf *bp); + #define BDSTRAT_SIZE (256 * 1024) #define IO_BCOMPARE_CHECK @@ -666,7 +670,7 @@ __libxfs_getbufr(int blen) return bp; } -xfs_buf_t * +static xfs_buf_t * libxfs_getbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen) { xfs_buf_t *bp; @@ -1360,7 +1364,7 @@ libxfs_bflush( return bp->b_error; } -void +static void libxfs_putbufr(xfs_buf_t *bp) { if (bp->b_flags & LIBXFS_B_DIRTY)