* [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
* Re: [PATCH] imsm: make messages more understandable
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
1 sibling, 1 reply; 4+ messages in thread
From: Williams, Dan J @ 2011-12-16 17:59 UTC (permalink / raw)
To: Lukasz Dorau; +Cc: neilb, linux-raid, marcin.labun, ed.ciechanowski
On Fri, Dec 16, 2011 at 6:04 AM, Lukasz Dorau <lukasz.dorau@intel.com> wrote:
> 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>
Acked-by: Dan Williams <dan.j.williams@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] imsm: make messages more understandable
2011-12-16 17:59 ` Williams, Dan J
@ 2011-12-19 9:34 ` Labun, Marcin
0 siblings, 0 replies; 4+ messages in thread
From: Labun, Marcin @ 2011-12-19 9:34 UTC (permalink / raw)
To: Dorau, Lukasz
Cc: neilb@suse.de, linux-raid@vger.kernel.org, Ciechanowski, Ed,
Williams, Dan J
Acked-by: Marcin Labun <marcin.labun@intel.com>
> -----Original Message-----
> From: Williams, Dan J [mailto:dan.j.williams@intel.com]
> Sent: Friday, December 16, 2011 6:59 PM
> To: Dorau, Lukasz
> Cc: neilb@suse.de; linux-raid@vger.kernel.org; Labun, Marcin;
> Ciechanowski, Ed
> Subject: Re: [PATCH] imsm: make messages more understandable
>
> On Fri, Dec 16, 2011 at 6:04 AM, Lukasz Dorau <lukasz.dorau@intel.com>
> wrote:
> > 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>
>
> Acked-by: Dan Williams <dan.j.williams@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] imsm: make messages more understandable
2011-12-16 14:04 [PATCH] imsm: make messages more understandable Lukasz Dorau
2011-12-16 17:59 ` Williams, Dan J
@ 2011-12-19 23:37 ` NeilBrown
1 sibling, 0 replies; 4+ messages in thread
From: NeilBrown @ 2011-12-19 23:37 UTC (permalink / raw)
To: Lukasz Dorau; +Cc: linux-raid, dan.j.williams, marcin.labun, ed.ciechanowski
[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]
On Fri, 16 Dec 2011 15:04:53 +0100 Lukasz Dorau <lukasz.dorau@intel.com>
wrote:
> 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;
> }
Applied. Thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [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).