diff mbox series

[18/18] libxfs: rename libxfs_getbuf_map to libxfs_buf_get_map

Message ID 158216306760.602314.2873425161697294878.stgit@magnolia (mailing list archive)
State Superseded, archived
Headers show
Series xfsprogs: refactor buffer function names | expand

Commit Message

Darrick J. Wong Feb. 20, 2020, 1:44 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Rename this function to match the kernel function.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/libxfs_io.h |    6 +++---
 libxfs/rdwr.c      |   16 ++++++++--------
 libxfs/trans.c     |    4 ++--
 repair/prefetch.c  |    2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

Comments

Christoph Hellwig Feb. 21, 2020, 2:55 p.m. UTC | #1
On Wed, Feb 19, 2020 at 05:44:27PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Rename this function to match the kernel function.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/libxfs/libxfs_io.h b/libxfs/libxfs_io.h
index 8e9af208..2a451ab2 100644
--- a/libxfs/libxfs_io.h
+++ b/libxfs/libxfs_io.h
@@ -144,7 +144,7 @@  extern struct cache_operations	libxfs_bcache_operations;
 #define libxfs_buf_get(dev, daddr, len) \
 	libxfs_trace_getbuf(__FUNCTION__, __FILE__, __LINE__, \
 			    (dev), (daddr), (len))
-#define libxfs_getbuf_map(dev, map, nmaps, flags) \
+#define libxfs_buf_get_map(dev, map, nmaps, flags) \
 	libxfs_trace_getbuf_map(__FUNCTION__, __FILE__, __LINE__, \
 			    (dev), (map), (nmaps), (flags))
 #define libxfs_buf_relse(buf) \
@@ -171,7 +171,7 @@  extern void	libxfs_trace_putbuf (const char *, const char *, int,
 extern xfs_buf_t *libxfs_buf_read_map(struct xfs_buftarg *, struct xfs_buf_map *,
 			int, int, const struct xfs_buf_ops *);
 void libxfs_buf_dirty(struct xfs_buf *bp, int flags);
-extern xfs_buf_t *libxfs_getbuf_map(struct xfs_buftarg *,
+extern xfs_buf_t *libxfs_buf_get_map(struct xfs_buftarg *,
 			struct xfs_buf_map *, int, int);
 void	libxfs_buf_relse(struct xfs_buf *);
 
@@ -183,7 +183,7 @@  libxfs_buf_get(
 {
 	DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
 
-	return libxfs_getbuf_map(target, &map, 1, 0);
+	return libxfs_buf_get_map(target, &map, 1, 0);
 }
 
 static inline struct xfs_buf*
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 531f24e3..52674559 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -387,14 +387,14 @@  libxfs_log_header(
 
 #undef libxfs_buf_read_map
 #undef libxfs_writebuf
-#undef libxfs_getbuf_map
+#undef libxfs_buf_get_map
 
 xfs_buf_t	*libxfs_buf_read_map(struct xfs_buftarg *, struct xfs_buf_map *,
 				int, int, const struct xfs_buf_ops *);
 int		libxfs_writebuf(xfs_buf_t *, int);
 struct xfs_buf *libxfs_buf_get(struct xfs_buftarg *btp, xfs_daddr_t daddr,
 				size_t len);
-xfs_buf_t	*libxfs_getbuf_map(struct xfs_buftarg *, struct xfs_buf_map *,
+xfs_buf_t	*libxfs_buf_get_map(struct xfs_buftarg *, struct xfs_buf_map *,
 				int, int);
 void		libxfs_buf_relse(struct xfs_buf *);
 
@@ -450,7 +450,7 @@  libxfs_trace_getbuf(
 	struct xfs_buf		*bp;
 	DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
 
-	bp = libxfs_getbuf_map(target, &map, 1, 0);
+	bp = libxfs_buf_get_map(target, &map, 1, 0);
 	__add_trace(bp, func, file, line);
 	return bp;
 }
@@ -460,7 +460,7 @@  libxfs_trace_getbuf_map(const char *func, const char *file, int line,
 		struct xfs_buftarg *btp, struct xfs_buf_map *map, int nmaps,
 		int flags)
 {
-	xfs_buf_t	*bp = libxfs_getbuf_map(btp, map, nmaps, flags);
+	xfs_buf_t	*bp = libxfs_buf_get_map(btp, map, nmaps, flags);
 	__add_trace(bp, func, file, line);
 	return bp;
 }
@@ -805,7 +805,7 @@  reset_buf_state(
 }
 
 static struct xfs_buf *
-__libxfs_getbuf_map(struct xfs_buftarg *btp, struct xfs_buf_map *map,
+__libxfs_buf_get_map(struct xfs_buftarg *btp, struct xfs_buf_map *map,
 		    int nmaps, int flags)
 {
 	struct xfs_bufkey key = {NULL};
@@ -827,12 +827,12 @@  __libxfs_getbuf_map(struct xfs_buftarg *btp, struct xfs_buf_map *map,
 }
 
 struct xfs_buf *
-libxfs_getbuf_map(struct xfs_buftarg *btp, struct xfs_buf_map *map,
+libxfs_buf_get_map(struct xfs_buftarg *btp, struct xfs_buf_map *map,
 		  int nmaps, int flags)
 {
 	struct xfs_buf	*bp;
 
-	bp = __libxfs_getbuf_map(btp, map, nmaps, flags);
+	bp = __libxfs_buf_get_map(btp, map, nmaps, flags);
 	reset_buf_state(bp);
 	return bp;
 }
@@ -1036,7 +1036,7 @@  libxfs_buf_read_map(struct xfs_buftarg *btp, struct xfs_buf_map *map, int nmaps,
 		return libxfs_readbuf(btp, map[0].bm_bn, map[0].bm_len,
 					flags, ops);
 
-	bp = __libxfs_getbuf_map(btp, map, nmaps, 0);
+	bp = __libxfs_buf_get_map(btp, map, nmaps, 0);
 	if (!bp)
 		return NULL;
 
diff --git a/libxfs/trans.c b/libxfs/trans.c
index f532e3d6..f4ce23a7 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -427,7 +427,7 @@  libxfs_trans_get_buf_map(
 	struct xfs_buf_log_item	*bip;
 
 	if (!tp)
-		return libxfs_getbuf_map(target, map, nmaps, 0);
+		return libxfs_buf_get_map(target, map, nmaps, 0);
 
 	/*
 	 * If we find the buffer in the cache with this transaction
@@ -445,7 +445,7 @@  libxfs_trans_get_buf_map(
 		return bp;
 	}
 
-	bp = libxfs_getbuf_map(target, map, nmaps, 0);
+	bp = libxfs_buf_get_map(target, map, nmaps, 0);
 	if (bp == NULL) {
 		return NULL;
 	}
diff --git a/repair/prefetch.c b/repair/prefetch.c
index a3858f9a..7f705cc0 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -120,7 +120,7 @@  pf_queue_io(
 	 * the lock holder is either reading it from disk himself or
 	 * completely overwriting it this behaviour is perfectly fine.
 	 */
-	bp = libxfs_getbuf_map(mp->m_dev, map, nmaps, LIBXFS_GETBUF_TRYLOCK);
+	bp = libxfs_buf_get_map(mp->m_dev, map, nmaps, LIBXFS_GETBUF_TRYLOCK);
 	if (!bp)
 		return;