* [Cluster-devel] [PATCH] sub sd_rgrps When clear rgrp
@ 2019-06-27 3:04 Yang Bin
2019-06-27 13:57 ` Andreas Grünbacher
0 siblings, 1 reply; 3+ messages in thread
From: Yang Bin @ 2019-06-27 3:04 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: " Yang Bin "<yang.bin18@zte.com.cn>
When clear rgrp,sub sd_rgrps after erased from rindex_tree
Signed-off-by: Yang Bin <yang.bin18@zte.com.cn>
---
fs/gfs2/rgrp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 15d6e32..a4b2e83
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -730,6 +730,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
gl = rgd->rd_gl;
rb_erase(n, &sdp->sd_rindex_tree);
+ sdp->sd_rgrps--;
if (gl) {
glock_clear_object(gl, rgd);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Cluster-devel] [PATCH] sub sd_rgrps When clear rgrp
2019-06-27 3:04 [Cluster-devel] [PATCH] sub sd_rgrps When clear rgrp Yang Bin
@ 2019-06-27 13:57 ` Andreas Grünbacher
2019-06-28 7:44 ` yang.bin18
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Grünbacher @ 2019-06-27 13:57 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi Yang Bin,
Am Do., 27. Juni 2019 um 05:08 Uhr schrieb Yang Bin <yang.bin18@zte.com.cn>:
> From: " Yang Bin "<yang.bin18@zte.com.cn>
>
> When clear rgrp,sub sd_rgrps after erased from rindex_tree
this patch isn't incorrect, but all it does it ensure that sd_rgrps
reaches zero before we destroy a struct gfs2_sbd. However, sd_rgrps is
only ever used when a filesystem is active, and while that is the
case, it can never decrease. It will grow when the filesystem is grown
though.
So what are you trying to achieve with this patch?
> Signed-off-by: Yang Bin <yang.bin18@zte.com.cn>
> ---
> fs/gfs2/rgrp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index 15d6e32..a4b2e83
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -730,6 +730,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
> gl = rgd->rd_gl;
>
> rb_erase(n, &sdp->sd_rindex_tree);
> + sdp->sd_rgrps--;
>
> if (gl) {
> glock_clear_object(gl, rgd);
> --
> 1.8.3.1
>
Thanks,
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] [PATCH] sub sd_rgrps When clear rgrp
2019-06-27 13:57 ` Andreas Grünbacher
@ 2019-06-28 7:44 ` yang.bin18
0 siblings, 0 replies; 3+ messages in thread
From: yang.bin18 @ 2019-06-28 7:44 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi Andreas,
>Am Do., 27. Juni 2019 um 05:08 Uhr schrieb Yang Bin <yang.bin18@zte.com.cn>:
>> From: " Yang Bin "<yang.bin18@zte.com.cn>
>>
>> When clear rgrp,sub sd_rgrps after erased from rindex_tree
>this patch isn't incorrect, but all it does it ensure that sd_rgrps
>reaches zero before we destroy a struct gfs2_sbd. However, sd_rgrps is
>only ever used when a filesystem is active, and while that is the
>case, it can never decrease. It will grow when the filesystem is grown
>though.
>So what are you trying to achieve with this patch?
In mounting, it may fail and then execute "gfs2_clear_rgrpd" . To solve this failing ,
I add reload process,which will read rindex again .But reload will fail ,
because sd_rgrps has beyonded rindex`s size. So I make this patch.
>> Signed-off-by: Yang Bin <yang.bin18@zte.com.cn>
>> ---
>> fs/gfs2/rgrp.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
>> index 15d6e32..a4b2e83
>> --- a/fs/gfs2/rgrp.c
>> +++ b/fs/gfs2/rgrp.c
>> @@ -730,6 +730,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
>> gl = rgd->rd_gl;
>>
>> rb_erase(n, &sdp->sd_rindex_tree);
>> + sdp->sd_rgrps--;
>>
>> if (gl) {
>> glock_clear_object(gl, rgd);
>> --
>> 1.8.3.1
>>
>Thanks,
>Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-28 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 3:04 [Cluster-devel] [PATCH] sub sd_rgrps When clear rgrp Yang Bin
2019-06-27 13:57 ` Andreas Grünbacher
2019-06-28 7:44 ` yang.bin18
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).