From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guoqing Jiang Subject: [PATCH 2/2] mdadm: output info more precisely when change bitmap Date: Thu, 19 Nov 2015 13:59:19 +0800 Message-ID: <1447912759-6239-2-git-send-email-gqjiang@suse.com> References: <1447912759-6239-1-git-send-email-gqjiang@suse.com> Return-path: In-Reply-To: <1447912759-6239-1-git-send-email-gqjiang@suse.com> Sender: linux-raid-owner@vger.kernel.org To: neilb@suse.com Cc: rgoldwyn@suse.com, linux-raid@vger.kernel.org, Guoqing Jiang List-Id: linux-raid.ids When change bitmap to none, the infos could be more accurate based on existed state type. And s->bitmap_file is passed from cmd "--bitmap=TYPE", so remove s->bitmap_file from err info since it should means change the bitmap to one type failed rather than the type is already present. Signed-off-by: Guoqing Jiang --- Grow.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Grow.c b/Grow.c index 80d7b22..30ff7f3 100644 --- a/Grow.c +++ b/Grow.c @@ -328,12 +328,15 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s) if (strcmp(s->bitmap_file, "none")==0) { array.state &= ~(1<bitmap_file, devname); + pr_err("bitmap already present on %s\n", devname); return 1; } -- 2.1.4