All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Adamski <k@adamski.org>
To: linux-raid@vger.kernel.org
Subject: [md PATCH 1/1] add display of hours remaining to finish resync
Date: Tue, 01 Nov 2011 17:53:47 -0400	[thread overview]
Message-ID: <1320184427.6471.70.camel@oxygen.netxsys.com> (raw)

This is my first patch, so please be gentle.

This patch adds the display of the number of hours till the completion
of resync of an array in the /proc/mdstat display.

Example: [>....................]  resync =  3.3% (98633240/2928311808)
finish=1026.1min (17h) speed=45957K/sec

Signed-off-by: Krzysztof Adamski <k@adamski.org>

# diff -Naru drivers/md/md.c-orig  drivers/md/md.c
--- drivers/md/md.c-orig        2011-10-25 01:11:12.000000000 -0400
+++ drivers/md/md.c     2011-11-01 17:37:35.000000000 -0400
@@ -6351,8 +6351,8 @@
        rt *= dt;
        rt >>= 5;
 
-       seq_printf(seq, " finish=%lu.%lumin", (unsigned long)rt / 60,
-                  ((unsigned long)rt % 60)/6);
+       seq_printf(seq, " finish=%lu.%lumin (%luh)", (unsigned long)rt /
60,
+                  ((unsigned long)rt % 60)/6, (unsigned long)rt / 60 /
60);
 
        seq_printf(seq, " speed=%ldK/sec", db/2/dt);
 }




             reply	other threads:[~2011-11-01 21:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 21:53 Krzysztof Adamski [this message]
2011-11-01 23:32 ` [md PATCH 1/1] add display of hours remaining to finish resync NeilBrown
2011-11-01 23:35 ` Paul Menzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320184427.6471.70.camel@oxygen.netxsys.com \
    --to=k@adamski.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.