This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch main in repository gfs2-utils.
commit 05d0ba53f6b0ab21ac2791ef496074411636d3a0 Author: Andrew Price anprice@redhat.com AuthorDate: Mon Jan 17 18:10:09 2022 +0000
libgfs2: Namespace improvements - gfs1.c
Use the lgfs2_ prefix in libgfs2 interface names.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/fsck/pass1.c | 2 +- gfs2/fsck/pass2.c | 2 +- gfs2/fsck/util.h | 2 +- gfs2/libgfs2/fs_ops.c | 12 ++++++------ gfs2/libgfs2/gfs1.c | 16 ++++++++-------- gfs2/libgfs2/libgfs2.h | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c index c2d6cae4..2b3379a7 100644 --- a/gfs2/fsck/pass1.c +++ b/gfs2/fsck/pass1.c @@ -152,7 +152,7 @@ static int pass1_repair_leaf(struct gfs2_inode *ip, uint64_t *leaf_no, " (0x%"PRIx64") at index: 0x%x for 0x%x pointers.\n"), ip->i_num.in_addr, ip->i_num.in_addr, lindex, ref_count); if (ip->i_sbd->gfs1) - gfs1_writei(ip, padbuf, lindex * sizeof(uint64_t), pad_size); + lgfs2_gfs1_writei(ip, padbuf, lindex * sizeof(uint64_t), pad_size); else lgfs2_writei(ip, padbuf, lindex * sizeof(uint64_t), pad_size); free(padbuf); diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c index 71e10e96..3d732772 100644 --- a/gfs2/fsck/pass2.c +++ b/gfs2/fsck/pass2.c @@ -1000,7 +1000,7 @@ static int write_new_leaf(struct gfs2_inode *dip, int start_lindex, dip->i_num.in_addr, dip->i_num.in_addr, start_lindex, (unsigned long)pad_size / sizeof(uint64_t)); if (dip->i_sbd->gfs1) - count = gfs1_writei(dip, padbuf, start_lindex * + count = lgfs2_gfs1_writei(dip, padbuf, start_lindex * sizeof(uint64_t), pad_size); else count = lgfs2_writei(dip, padbuf, start_lindex * diff --git a/gfs2/fsck/util.h b/gfs2/fsck/util.h index 5f9c488b..ae654bf4 100644 --- a/gfs2/fsck/util.h +++ b/gfs2/fsck/util.h @@ -82,7 +82,7 @@ static const inline char *block_type_string(int q)
static inline int is_dir(struct gfs2_inode *ip, int gfs1) { - if (gfs1 && is_gfs_dir(ip)) + if (gfs1 && lgfs2_is_gfs_dir(ip)) return 1; if (S_ISDIR(ip->i_mode)) return 1; diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c index 077677a4..1d5ef8e6 100644 --- a/gfs2/libgfs2/fs_ops.c +++ b/gfs2/libgfs2/fs_ops.c @@ -235,7 +235,7 @@ void lgfs2_unstuff_dinode(struct gfs2_inode *ip) struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_buffer_head *bh; uint64_t block = 0; - int isdir = S_ISDIR(ip->i_mode) || is_gfs_dir(ip); + int isdir = S_ISDIR(ip->i_mode) || lgfs2_is_gfs_dir(ip);
if (ip->i_size) { if (lgfs2_meta_alloc(ip, &block)) @@ -612,7 +612,7 @@ int lgfs2_readi(struct gfs2_inode *ip, void *buf, uint64_t offset, unsigned int
if (!extlen) { if (sdp->gfs1) - gfs1_block_map(ip, lblock, ¬_new, &dblock, + lgfs2_gfs1_block_map(ip, lblock, ¬_new, &dblock, &extlen, 0); else lgfs2_block_map(ip, lblock, ¬_new, &dblock, @@ -935,7 +935,7 @@ void lgfs2_dir_split_leaf(struct gfs2_inode *dip, uint32_t start, uint64_t leaf_ lp[x] = cpu_to_be64(bn);
if (dip->i_sbd->gfs1) - count = gfs1_writei(dip, (char *)lp, start * sizeof(uint64_t), + count = lgfs2_gfs1_writei(dip, (char *)lp, start * sizeof(uint64_t), half_len * sizeof(uint64_t)); else count = lgfs2_writei(dip, (char *)lp, start * sizeof(uint64_t), @@ -1043,7 +1043,7 @@ static void dir_double_exhash(struct gfs2_inode *dip) }
if (sdp->gfs1) - count = gfs1_writei(dip, (char *)buf + + count = lgfs2_gfs1_writei(dip, (char *)buf + sdp->sd_hash_bsize, block * sdp->sd_bsize, sdp->sd_bsize); else @@ -1763,7 +1763,7 @@ int lgfs2_dir_search(struct gfs2_inode *dip, const char *filename, int len, { int error;
- if(!S_ISDIR(dip->i_mode) && !is_gfs_dir(dip)) + if(!S_ISDIR(dip->i_mode) && !lgfs2_is_gfs_dir(dip)) return -1;
if (dip->i_flags & GFS2_DIF_EXHASH) @@ -1851,7 +1851,7 @@ int lgfs2_dirent_del(struct gfs2_inode *dip, const char *filename, int len) { int error;
- if(!S_ISDIR(dip->i_mode) && !is_gfs_dir(dip)) + if(!S_ISDIR(dip->i_mode) && !lgfs2_is_gfs_dir(dip)) return -1;
if (dip->i_flags & GFS2_DIF_EXHASH) diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c index 5cee3df8..2b864137 100644 --- a/gfs2/libgfs2/gfs1.c +++ b/gfs2/libgfs2/gfs1.c @@ -31,14 +31,14 @@ gfs1_metapointer(char *buf, unsigned int height, struct metapath *mp) return ((__be64 *)(buf + head_size)) + mp->mp_list[height]; }
-int is_gfs_dir(struct gfs2_inode *ip) +int lgfs2_is_gfs_dir(struct gfs2_inode *ip) { if (ip->i_di_type == GFS_FILE_DIR) return 1; return 0; }
-void gfs1_lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head *bh, +void lgfs2_gfs1_lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head *bh, unsigned int height, struct metapath *mp, int create, int *new, uint64_t *block) { @@ -67,7 +67,7 @@ void gfs1_lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head *bh, *new = 1; }
-void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, +void lgfs2_gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, uint64_t *dblock, uint32_t *extlen, int prealloc) { struct gfs2_sbd *sdp = ip->i_sbd; @@ -109,7 +109,7 @@ void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, bh = ip->i_bh;
for (x = 0; x < end_of_metadata; x++) { - gfs1_lookup_block(ip, bh, x, &mp, create, new, dblock); + lgfs2_gfs1_lookup_block(ip, bh, x, &mp, create, new, dblock); if (bh != ip->i_bh) lgfs2_brelse(bh); if (!*dblock) @@ -133,7 +133,7 @@ void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, }
if (!prealloc) - gfs1_lookup_block(ip, bh, end_of_metadata, &mp, create, new, + lgfs2_gfs1_lookup_block(ip, bh, end_of_metadata, &mp, create, new, dblock);
if (extlen && *dblock) { @@ -147,7 +147,7 @@ void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, nptrs = (end_of_metadata) ? sdp->sd_inptrs : sdp->sd_diptrs;
while (++mp.mp_list[end_of_metadata] < nptrs) { - gfs1_lookup_block(ip, bh, end_of_metadata, &mp, + lgfs2_gfs1_lookup_block(ip, bh, end_of_metadata, &mp, 0, &tmp_new, &tmp_dblock);
@@ -163,7 +163,7 @@ void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, lgfs2_brelse(bh); }
-int gfs1_writei(struct gfs2_inode *ip, void *buf, uint64_t offset, +int lgfs2_gfs1_writei(struct gfs2_inode *ip, void *buf, uint64_t offset, unsigned int size) { struct gfs2_sbd *sdp = ip->i_sbd; @@ -203,7 +203,7 @@ int gfs1_writei(struct gfs2_inode *ip, void *buf, uint64_t offset,
if (!extlen){ new = 1; - gfs1_block_map(ip, lblock, &new, &dblock, &extlen, 0); + lgfs2_gfs1_block_map(ip, lblock, &new, &dblock, &extlen, 0); if (!dblock) return -1; } diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index c6f0fb9e..e74918ab 100644 --- a/gfs2/libgfs2/libgfs2.h +++ b/gfs2/libgfs2/libgfs2.h @@ -710,14 +710,14 @@ struct gfs_log_descriptor { uint8_t ld_reserved[64]; };
-extern int is_gfs_dir(struct gfs2_inode *ip); -extern void gfs1_lookup_block(struct gfs2_inode *ip, +extern int lgfs2_is_gfs_dir(struct gfs2_inode *ip); +extern void lgfs2_gfs1_lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head *bh, unsigned int height, struct metapath *mp, int create, int *new, uint64_t *block); -extern void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, +extern void lgfs2_gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, uint64_t *dblock, uint32_t *extlen, int prealloc); -extern int gfs1_writei(struct gfs2_inode *ip, void *buf, uint64_t offset, +extern int lgfs2_gfs1_writei(struct gfs2_inode *ip, void *buf, uint64_t offset, unsigned int size); extern struct gfs2_inode *lgfs2_gfs_inode_get(struct gfs2_sbd *sdp, char *buf); extern struct gfs2_inode *lgfs2_gfs_inode_read(struct gfs2_sbd *sdp, uint64_t di_addr);
cluster-commits@lists.fedorahosted.org