linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] imsm: make messages more understandable
@ 2011-12-16 14:04 Lukasz Dorau
  2011-12-16 17:59 ` Williams, Dan J
  2011-12-19 23:37 ` NeilBrown
  0 siblings, 2 replies; 4+ messages in thread
From: Lukasz Dorau @ 2011-12-16 14:04 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, dan.j.williams, marcin.labun, ed.ciechanowski

The printed messages should be more appropriate and understandable
for user. If maxsize is equal 0, this means there is no free space left
on device. If size is greater than maxsize, this means there is not enough
space to create a new volume of given size.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
---
 super-intel.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 3c10d29..3990d58 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5466,9 +5466,16 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
 	}
 
 	if (maxsize < size || maxsize == 0) {
-		if (verbose)
-			fprintf(stderr, Name ": not enough space after merge (%llu < %llu)\n",
-				maxsize, size);
+		if (verbose) {
+			if (maxsize == 0)
+				fprintf(stderr, Name ": no free space"
+						" left on device. Aborting...\n");
+			else
+				fprintf(stderr, Name ": not enough space"
+						" to create volume of given size"
+						" (%llu < %llu). Aborting...\n",
+						maxsize, size);
+		}
 		return 0;
 	}
 


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

end of thread, other threads:[~2011-12-19 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 14:04 [PATCH] imsm: make messages more understandable Lukasz Dorau
2011-12-16 17:59 ` Williams, Dan J
2011-12-19  9:34   ` Labun, Marcin
2011-12-19 23:37 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).