* [PATCH 1/2] md: raid5 return new layout in mdstat while reshaping
@ 2010-07-21 11:03 ` Trela, Maciej
2010-07-22 0:58 ` Dan Williams
0 siblings, 1 reply; 3+ messages in thread
From: Trela, Maciej @ 2010-07-21 11:03 UTC (permalink / raw)
To: Neil Brown; +Cc: Williams, Dan J, Kwolek, Adam, linux-raid
From: Maciej Trela <maciej.trela@intel.com>
While reshaping, report mdstat algorithm according to the new_layout.
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
---
drivers/md/raid5.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4d85632..b7c6561 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5256,8 +5256,12 @@ static void status(struct seq_file *seq, mddev_t *mddev)
raid5_conf_t *conf = mddev->private;
int i;
- seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level,
- mddev->chunk_sectors / 2, mddev->layout);
+ seq_printf(seq, " level %d, %dk chunk,", mddev->level,
+ mddev->chunk_sectors / 2);
+ if (mddev->reshape_position != MaxSector)
+ seq_printf(seq, " algorithm %d", mddev->new_layout);
+ else
+ seq_printf(seq, " algorithm %d", mddev->layout);
seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->raid_disks - mddev->degraded);
for (i = 0; i < conf->raid_disks; i++)
seq_printf (seq, "%s",
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] md: raid5 return new layout in mdstat while reshaping
2010-07-21 11:03 ` [PATCH 1/2] md: raid5 return new layout in mdstat while reshaping Trela, Maciej
@ 2010-07-22 0:58 ` Dan Williams
2010-07-22 8:43 ` Trela, Maciej
0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2010-07-22 0:58 UTC (permalink / raw)
To: Trela, Maciej; +Cc: Neil Brown, Kwolek, Adam, linux-raid
On Wed, Jul 21, 2010 at 4:03 AM, Trela, Maciej <Maciej.Trela@intel.com> wrote:
> From: Maciej Trela <maciej.trela@intel.com>
>
> While reshaping, report mdstat algorithm according to the new_layout.
It's not immediately clear to me why this is needed? The md/layout
attribute in sysfs shows the new_layout during reshape if userspace
forgets what it changed (should also be recorded in the metadata). If
it is needed then spell that out in the commit message.
--
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 1/2] md: raid5 return new layout in mdstat while reshaping
2010-07-22 0:58 ` Dan Williams
@ 2010-07-22 8:43 ` Trela, Maciej
0 siblings, 0 replies; 3+ messages in thread
From: Trela, Maciej @ 2010-07-22 8:43 UTC (permalink / raw)
To: Williams, Dan J; +Cc: Neil Brown, Kwolek, Adam, linux-raid
> -----Original Message-----
> From: dan.j.williams@gmail.com [mailto:dan.j.williams@gmail.com] On
> Behalf Of Dan Williams
> Sent: Thursday, July 22, 2010 2:59 AM
> To: Trela, Maciej
> Cc: Neil Brown; Kwolek, Adam; linux-raid@vger.kernel.org
> Subject: Re: [PATCH 1/2] md: raid5 return new layout in mdstat while
> reshaping
>
> On Wed, Jul 21, 2010 at 4:03 AM, Trela, Maciej <Maciej.Trela@intel.com>
> wrote:
> > From: Maciej Trela <maciej.trela@intel.com>
> >
> > While reshaping, report mdstat algorithm according to the new_layout.
>
> It's not immediately clear to me why this is needed? The md/layout
> attribute in sysfs shows the new_layout during reshape if userspace
> forgets what it changed (should also be recorded in the metadata). If
> it is needed then spell that out in the commit message.
>
Yes, you are right.
We can definitely read the new layout from sysfs.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-22 8:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AcsoxGax1b+/Kg5eR/SJirk+wfgLpw==>
2010-07-21 11:03 ` [PATCH 1/2] md: raid5 return new layout in mdstat while reshaping Trela, Maciej
2010-07-22 0:58 ` Dan Williams
2010-07-22 8:43 ` Trela, Maciej
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.