All of lore.kernel.org
 help / color / mirror / Atom feed
* Grow set size issue
@ 2017-03-29 17:50 jes.sorensen
  2017-03-29 21:34 ` NeilBrown
  0 siblings, 1 reply; 9+ messages in thread
From: jes.sorensen @ 2017-03-29 17:50 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

Hi Neil,

In the below patch you changed the error handling, to make the kernel
not setting the size of the device being an error. However we still have
the code in place to handle the error, except it never triggers.

Question is do you remember the reason for this change? Old kernels not
allowing it, are there any legitimate reasons for the kernel to refuse
the size change?

Cheers,
Jes

commit b0a658ffbcd2104594e8a7a185fa0fe05127723e
Author: NeilBrown <neilb@suse.de>
Date:   Thu May 3 16:18:22 2012 +1000

    Grow: failing the set the per-device size is not an error.
    
    Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/Grow.c b/Grow.c
index 0b0d718..330e719 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1668,7 +1668,9 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
                rv = 0;
                for (mdi = sra->devs; mdi; mdi = mdi->next) {
                        if (sysfs_set_num(sra, mdi, "size", size) < 0) {
-                               rv = 1;
+                               /* Probably kernel refusing to let us
+                                * reduce the size - not an error.
+                                */
                                break;
                        }
                        if (array.not_persistent == 0 &&

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

end of thread, other threads:[~2017-06-06 16:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 17:50 Grow set size issue jes.sorensen
2017-03-29 21:34 ` NeilBrown
2017-03-30 14:10   ` Jes Sorensen
2017-06-02 11:01     ` Tomasz Majchrzak
2017-06-02 17:48       ` Jes Sorensen
2017-06-05 14:09         ` [PATCH] Grow: set component size prior to array size Tomasz Majchrzak
2017-06-05 15:06           ` Jes Sorensen
2017-06-06 14:47             ` Tomasz Majchrzak
2017-06-06 16:00               ` Jes Sorensen

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.