linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check
@ 2023-05-08 13:30 Xiao Ni
  2023-08-23 14:09 ` Mariusz Tkaczyk
  0 siblings, 1 reply; 4+ messages in thread
From: Xiao Ni @ 2023-05-08 13:30 UTC (permalink / raw)
  To: jes; +Cc: linux-raid

mdcheck_continue is triggered by mdcheck_start timer. It's used to
continue check action if the raid is too big and mdcheck_start
service can't finish check action. If mdcheck start can finish check
action, it doesn't need to mdcheck continue service anymore. So stop
it when mdcheck start service can finish check action.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 misc/mdcheck | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/misc/mdcheck b/misc/mdcheck
index 700c3e252e72..f56972c8ed10 100644
--- a/misc/mdcheck
+++ b/misc/mdcheck
@@ -140,7 +140,13 @@ do
 		echo $a > $fl
 		any=yes
 	done
-	if [ -z "$any" ]; then exit 0; fi
+	if [ -z "$any" ]; then
+		#mdcheck_continue.timer is started by mdcheck_start.timer.
+		#When he check action can be finished in mdcheck_start.service,
+		#it doesn't need mdcheck_continue anymore.
+		systemctl stop mdcheck_continue.timer
+		exit 0;
+	fi
 	sleep 120
 done
 
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check
  2023-05-08 13:30 [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check Xiao Ni
@ 2023-08-23 14:09 ` Mariusz Tkaczyk
  2023-08-25  9:00   ` Xiao Ni
  0 siblings, 1 reply; 4+ messages in thread
From: Mariusz Tkaczyk @ 2023-08-23 14:09 UTC (permalink / raw)
  To: Xiao Ni, linux-raid; +Cc: jes

Hi Xiao,
some nits:

On Mon,  8 May 2023 21:30:10 +0800
Xiao Ni <xni@redhat.com> wrote:

> mdcheck_continue is triggered by mdcheck_start timer. It's used to
> continue check action if the raid is too big and mdcheck_start
> service can't finish check action. If mdcheck start can finish check
> action, it doesn't need to mdcheck continue service anymore. So stop
> it when mdcheck start service can finish check action.
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
>  misc/mdcheck | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/misc/mdcheck b/misc/mdcheck
> index 700c3e252e72..f56972c8ed10 100644
> --- a/misc/mdcheck
> +++ b/misc/mdcheck
> @@ -140,7 +140,13 @@ do
>  		echo $a > $fl
>  		any=yes
>  	done
> -	if [ -z "$any" ]; then exit 0; fi
> +	if [ -z "$any" ]; then
> +		#mdcheck_continue.timer is started by mdcheck_start.timer.
> +		#When he check action can be finished in
's/he/the/g'
I think that there should be space after '#' but it is preferred to use /* */ 
Could you please send v2?

Thanks,
Mariusz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check
  2023-08-23 14:09 ` Mariusz Tkaczyk
@ 2023-08-25  9:00   ` Xiao Ni
  2023-08-25  9:57     ` Mariusz Tkaczyk
  0 siblings, 1 reply; 4+ messages in thread
From: Xiao Ni @ 2023-08-25  9:00 UTC (permalink / raw)
  To: Mariusz Tkaczyk; +Cc: linux-raid, jes

On Wed, Aug 23, 2023 at 10:09 PM Mariusz Tkaczyk
<mariusz.tkaczyk@linux.intel.com> wrote:
>
> Hi Xiao,
> some nits:
>
> On Mon,  8 May 2023 21:30:10 +0800
> Xiao Ni <xni@redhat.com> wrote:
>
> > mdcheck_continue is triggered by mdcheck_start timer. It's used to
> > continue check action if the raid is too big and mdcheck_start
> > service can't finish check action. If mdcheck start can finish check
> > action, it doesn't need to mdcheck continue service anymore. So stop
> > it when mdcheck start service can finish check action.
> >
> > Signed-off-by: Xiao Ni <xni@redhat.com>
> > ---
> >  misc/mdcheck | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/misc/mdcheck b/misc/mdcheck
> > index 700c3e252e72..f56972c8ed10 100644
> > --- a/misc/mdcheck
> > +++ b/misc/mdcheck
> > @@ -140,7 +140,13 @@ do
> >               echo $a > $fl
> >               any=yes
> >       done
> > -     if [ -z "$any" ]; then exit 0; fi
> > +     if [ -z "$any" ]; then
> > +             #mdcheck_continue.timer is started by mdcheck_start.timer.
> > +             #When he check action can be finished in
> 's/he/the/g'
> I think that there should be space after '#' but it is preferred to use /* */
> Could you please send v2?

Hi Mariusz

diff --git a/misc/mdcheck b/misc/mdcheck
index 700c3e252e72..f87999d3e797 100644
--- a/misc/mdcheck
+++ b/misc/mdcheck
@@ -140,7 +140,13 @@ do
                echo $a > $fl
                any=yes
        done
-       if [ -z "$any" ]; then exit 0; fi
+       # mdcheck_continue.timer is started by mdcheck_start.timer.
+       # When the check action can be finished in mdcheck_start.service,
+       # it doesn't need mdcheck_continue anymore.
+       if [ -z "$any" ]; then
+               systemctl stop mdcheck_continue.timer
+               exit 0;
+       fi
        sleep 120
 done

How about this one?

Regards
Xiao
>
> Thanks,
> Mariusz
>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check
  2023-08-25  9:00   ` Xiao Ni
@ 2023-08-25  9:57     ` Mariusz Tkaczyk
  0 siblings, 0 replies; 4+ messages in thread
From: Mariusz Tkaczyk @ 2023-08-25  9:57 UTC (permalink / raw)
  To: Xiao Ni; +Cc: linux-raid, jes

On Fri, 25 Aug 2023 17:00:19 +0800
Xiao Ni <xni@redhat.com> wrote:

> On Wed, Aug 23, 2023 at 10:09 PM Mariusz Tkaczyk
> <mariusz.tkaczyk@linux.intel.com> wrote:
> >
> > Hi Xiao,
> > some nits:
> >
> > On Mon,  8 May 2023 21:30:10 +0800
> > Xiao Ni <xni@redhat.com> wrote:
> >  
> > > mdcheck_continue is triggered by mdcheck_start timer. It's used to
> > > continue check action if the raid is too big and mdcheck_start
> > > service can't finish check action. If mdcheck start can finish check
> > > action, it doesn't need to mdcheck continue service anymore. So stop
> > > it when mdcheck start service can finish check action.
> > >
> > > Signed-off-by: Xiao Ni <xni@redhat.com>
> > > ---
> > >  misc/mdcheck | 8 +++++++-
> > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/misc/mdcheck b/misc/mdcheck
> > > index 700c3e252e72..f56972c8ed10 100644
> > > --- a/misc/mdcheck
> > > +++ b/misc/mdcheck
> > > @@ -140,7 +140,13 @@ do
> > >               echo $a > $fl
> > >               any=yes
> > >       done
> > > -     if [ -z "$any" ]; then exit 0; fi
> > > +     if [ -z "$any" ]; then
> > > +             #mdcheck_continue.timer is started by mdcheck_start.timer.
> > > +             #When he check action can be finished in  
> > 's/he/the/g'
> > I think that there should be space after '#' but it is preferred to use /*
> > */ Could you please send v2?  
> 
> Hi Mariusz
> 
> diff --git a/misc/mdcheck b/misc/mdcheck
> index 700c3e252e72..f87999d3e797 100644
> --- a/misc/mdcheck
> +++ b/misc/mdcheck
> @@ -140,7 +140,13 @@ do
>                 echo $a > $fl
>                 any=yes
>         done
> -       if [ -z "$any" ]; then exit 0; fi
> +       # mdcheck_continue.timer is started by mdcheck_start.timer.
> +       # When the check action can be finished in mdcheck_start.service,
> +       # it doesn't need mdcheck_continue anymore.
> +       if [ -z "$any" ]; then
> +               systemctl stop mdcheck_continue.timer
> +               exit 0;
> +       fi
>         sleep 120
>  done
> 
> How about this one?
> 
> Regards
> Xiao
> >
> > Thanks,
> > Mariusz
> >  
> 
LGTM
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>

Mariusz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-25  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 13:30 [PATCH 1/1] Stop mdcheck_continue timer when mdcheck_start service can finish check Xiao Ni
2023-08-23 14:09 ` Mariusz Tkaczyk
2023-08-25  9:00   ` Xiao Ni
2023-08-25  9:57     ` Mariusz Tkaczyk

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).