NeilBrown: Grow: restrict to 2.6.32

Martin F. Krafft madduck at alioth.debian.org
Wed Jan 27 02:01:15 UTC 2010


Module: mdadm
Branch: build
Commit: d2505cff5a3ca88de4fc7030fca40a8e069b18f6
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=d2505cff5a3ca88de4fc7030fca40a8e069b18f6

Author: NeilBrown <neilb at suse.de>
Date:   Fri Nov  6 15:19:39 2009 +1100

Grow: restrict to 2.6.32

2.6.31 has a bug which can lead to unsafe reshaping.
So only allow a reshape with 2.6.32.
When the required fixed get into 2.6.31.y, this can be relaxed
slightly

Signed-off-by: NeilBrown <neilb at suse.de>

---

 Grow.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Grow.c b/Grow.c
index 8e6e7f7..4423b78 100644
--- a/Grow.c
+++ b/Grow.c
@@ -871,6 +871,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
 			ndata--;
 		}
 
+		if (odata == ndata &&
+		    get_linux_version() < 2006032) {
+			fprintf(stderr, Name ": in-place reshape is not safe before 2.6.32, sorry.\n");
+			break;
+		}
+
 		/* Check that we can hold all the data */
 		size = ndata * array.size;
 		get_dev_size(fd, NULL, &array_size);




More information about the pkg-mdadm-commits mailing list