Re: [Cluster-devel] [PATCH 7/9] gfs2: Fix marking bitmaps non-full
Hi, On 12/10/18 13:06, Bob Peterson wrote: - Original Message - Hi, The series looks good I think. This one though looks like a bug fix and should probably go to -stable too? Steve. I concur. So can I add your reviewed-by before I push? Bob Peterson Yes, please do, Steve.
Re: [Cluster-devel] [PATCH 7/9] gfs2: Fix marking bitmaps non-full
- Original Message - > Hi, > The series looks good I think. This one though looks like a bug fix and > should probably go to -stable too? > > Steve. I concur. So can I add your reviewed-by before I push? Bob Peterson
Re: [Cluster-devel] [PATCH 7/9] gfs2: Fix marking bitmaps non-full
On Fri, 12 Oct 2018 at 11:15, Steven Whitehouse wrote: > The series looks good I think. This one though looks like a bug fix and > should probably go to -stable too? Yes, that's a good idea. The fix applies all the way back to v4.4 or even further. Thanks, Andreas
Re: [Cluster-devel] [PATCH 7/9] gfs2: Fix marking bitmaps non-full
Hi, On 11/10/18 20:20, Andreas Gruenbacher wrote: Reservations in gfs can span multiple gfs2_bitmaps (but they won't span multiple resource groups). When removing a reservation, we want to clear the GBF_FULL flags of all involved gfs2_bitmaps, not just that of the first bitmap. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) The series looks good I think. This one though looks like a bug fix and should probably go to -stable too? Steve. diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index f47c76d9d9d0..7c5904c49a6a 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -641,7 +641,10 @@ static void __rs_deltree(struct gfs2_blkreserv *rs) RB_CLEAR_NODE(&rs->rs_node); if (rs->rs_free) { - struct gfs2_bitmap *bi = rbm_bi(&rs->rs_rbm); + u64 last_block = gfs2_rbm_to_block(&rs->rs_rbm) + +rs->rs_free - 1; + struct gfs2_rbm last_rbm = { .rgd = rs->rs_rbm.rgd, }; + struct gfs2_bitmap *start, *last; /* return reserved blocks to the rgrp */ BUG_ON(rs->rs_rbm.rgd->rd_reserved < rs->rs_free); @@ -652,7 +655,13 @@ static void __rs_deltree(struct gfs2_blkreserv *rs) it will force the number to be recalculated later. */ rgd->rd_extfail_pt += rs->rs_free; rs->rs_free = 0; - clear_bit(GBF_FULL, &bi->bi_flags); + if (gfs2_rbm_from_block(&last_rbm, last_block)) + return; + start = rbm_bi(&rs->rs_rbm); + last = rbm_bi(&last_rbm); + do + clear_bit(GBF_FULL, &start->bi_flags); + while (start++ != last); } }
[Cluster-devel] [PATCH 7/9] gfs2: Fix marking bitmaps non-full
Reservations in gfs can span multiple gfs2_bitmaps (but they won't span multiple resource groups). When removing a reservation, we want to clear the GBF_FULL flags of all involved gfs2_bitmaps, not just that of the first bitmap. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index f47c76d9d9d0..7c5904c49a6a 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -641,7 +641,10 @@ static void __rs_deltree(struct gfs2_blkreserv *rs) RB_CLEAR_NODE(&rs->rs_node); if (rs->rs_free) { - struct gfs2_bitmap *bi = rbm_bi(&rs->rs_rbm); + u64 last_block = gfs2_rbm_to_block(&rs->rs_rbm) + +rs->rs_free - 1; + struct gfs2_rbm last_rbm = { .rgd = rs->rs_rbm.rgd, }; + struct gfs2_bitmap *start, *last; /* return reserved blocks to the rgrp */ BUG_ON(rs->rs_rbm.rgd->rd_reserved < rs->rs_free); @@ -652,7 +655,13 @@ static void __rs_deltree(struct gfs2_blkreserv *rs) it will force the number to be recalculated later. */ rgd->rd_extfail_pt += rs->rs_free; rs->rs_free = 0; - clear_bit(GBF_FULL, &bi->bi_flags); + if (gfs2_rbm_from_block(&last_rbm, last_block)) + return; + start = rbm_bi(&rs->rs_rbm); + last = rbm_bi(&last_rbm); + do + clear_bit(GBF_FULL, &start->bi_flags); + while (start++ != last); } } -- 2.17.1