* [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked
[not found] <519064916.686895.1533741034983.JavaMail.zimbra@redhat.com>
@ 2018-08-08 15:10 ` Bob Peterson
2018-08-08 15:31 ` Andrew Price
2018-08-08 16:08 ` Paul Evans
0 siblings, 2 replies; 3+ messages in thread
From: Bob Peterson @ 2018-08-08 15:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Function update_rgrp_lvb_unlinked used to do the same thing as
be32_add_cpu. This patch removes it in favor of using be32_add_cpu
directly.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/rgrp.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index ef50fe9b880a..1ad3256b9cbc 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1111,13 +1111,6 @@ static int gfs2_rgrp_lvb_valid(struct gfs2_rgrpd *rgd)
return 1;
}
-static void update_rgrp_lvb_unlinked(struct gfs2_rgrpd *rgd, u32 change)
-{
- struct gfs2_rgrp_lvb *rgl = rgd->rd_rgl;
- u32 unlinked = be32_to_cpu(rgl->rl_unlinked) + change;
- rgl->rl_unlinked = cpu_to_be32(unlinked);
-}
-
static u32 count_unlinked(struct gfs2_rgrpd *rgd)
{
struct gfs2_bitmap *bi;
@@ -2489,7 +2482,7 @@ void gfs2_unlink_di(struct inode *inode)
trace_gfs2_block_alloc(ip, rgd, blkno, 1, GFS2_BLKST_UNLINKED);
gfs2_trans_add_meta(rgd->rd_gl, rgd->rd_bits[0].bi_bh);
gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
- update_rgrp_lvb_unlinked(rgd, 1);
+ be32_add_cpu(&rgd->rd_rgl->rl_unlinked, 1);
}
void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
@@ -2509,7 +2502,7 @@ void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
gfs2_trans_add_meta(rgd->rd_gl, rgd->rd_bits[0].bi_bh);
gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
- update_rgrp_lvb_unlinked(rgd, -1);
+ be32_add_cpu(&rgd->rd_rgl->rl_unlinked, -1);
gfs2_statfs_change(sdp, 0, +1, -1);
trace_gfs2_block_alloc(ip, rgd, ip->i_no_addr, 1, GFS2_BLKST_FREE);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked
2018-08-08 15:10 ` [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked Bob Peterson
@ 2018-08-08 15:31 ` Andrew Price
2018-08-08 16:08 ` Paul Evans
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Price @ 2018-08-08 15:31 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 08/08/18 16:10, Bob Peterson wrote:
> Hi,
>
> Function update_rgrp_lvb_unlinked used to do the same thing as
> be32_add_cpu. This patch removes it in favor of using be32_add_cpu
> directly.
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Looks good.
Reviewed-by: Andrew Price <anprice@redhat.com>
Andy
> ---
> fs/gfs2/rgrp.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index ef50fe9b880a..1ad3256b9cbc 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -1111,13 +1111,6 @@ static int gfs2_rgrp_lvb_valid(struct gfs2_rgrpd *rgd)
> return 1;
> }
>
> -static void update_rgrp_lvb_unlinked(struct gfs2_rgrpd *rgd, u32 change)
> -{
> - struct gfs2_rgrp_lvb *rgl = rgd->rd_rgl;
> - u32 unlinked = be32_to_cpu(rgl->rl_unlinked) + change;
> - rgl->rl_unlinked = cpu_to_be32(unlinked);
> -}
> -
> static u32 count_unlinked(struct gfs2_rgrpd *rgd)
> {
> struct gfs2_bitmap *bi;
> @@ -2489,7 +2482,7 @@ void gfs2_unlink_di(struct inode *inode)
> trace_gfs2_block_alloc(ip, rgd, blkno, 1, GFS2_BLKST_UNLINKED);
> gfs2_trans_add_meta(rgd->rd_gl, rgd->rd_bits[0].bi_bh);
> gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
> - update_rgrp_lvb_unlinked(rgd, 1);
> + be32_add_cpu(&rgd->rd_rgl->rl_unlinked, 1);
> }
>
> void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
> @@ -2509,7 +2502,7 @@ void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
>
> gfs2_trans_add_meta(rgd->rd_gl, rgd->rd_bits[0].bi_bh);
> gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
> - update_rgrp_lvb_unlinked(rgd, -1);
> + be32_add_cpu(&rgd->rd_rgl->rl_unlinked, -1);
>
> gfs2_statfs_change(sdp, 0, +1, -1);
> trace_gfs2_block_alloc(ip, rgd, ip->i_no_addr, 1, GFS2_BLKST_FREE);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked
2018-08-08 15:10 ` [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked Bob Peterson
2018-08-08 15:31 ` Andrew Price
@ 2018-08-08 16:08 ` Paul Evans
1 sibling, 0 replies; 3+ messages in thread
From: Paul Evans @ 2018-08-08 16:08 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 08/08/18 16:10, Bob Peterson wrote:
> Hi,
>
> Function update_rgrp_lvb_unlinked used to do the same thing as
> be32_add_cpu. This patch removes it in favor of using be32_add_cpu
> directly.
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
>
Looks good to me.
Reviewed-by Paul Evans <pevans@redhat.com>
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-08 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <519064916.686895.1533741034983.JavaMail.zimbra@redhat.com>
2018-08-08 15:10 ` [Cluster-devel] [GFS2 PATCH] gfs2: eliminate update_rgrp_lvb_unlinked Bob Peterson
2018-08-08 15:31 ` Andrew Price
2018-08-08 16:08 ` Paul Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).