dm: make alloc error info more clearly.
PATCH 1/1 dm: make alloc error info more clearly.
From: Robin Dong <[email protected]>
If dm-delay structure allocation failed, report more precise error information.
If dm-flakey structure alocation failed, it will report wrong error information which should be fixed.
--- drivers/md/dm-delay.c | 2 +- drivers/md/dm-flakey.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm-delay.c +1 -1
@@ -140,7 +140,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv) dc =kmalloc (sizeof (*dc),GFP_KERNEL );if (!dc) { - ti->error ="Cannot allocate context" ; + ti->error ="Cannot allocate delay context" ;return -ENOMEM ; }
drivers/md/dm-flakey.c +1 -1
@@ -176,7 +176,7 @@ static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv) fc =kzalloc (sizeof (*fc),GFP_KERNEL );if (!fc) { - ti->error ="Cannot allocate linear context" ; + ti->error ="Cannot allocate flakey context" ;return -ENOMEM ; } fc->start_time = jiffies;
Signature · 1 line
1.7.1
Alasdair G Kergon
maintainerQuoted 1 line · Robin Dong
If dm-delay structure allocation failed, report more precise error information.
Do you have some test result that shows this?
DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);?
Alasdair
2013/7/7 Alasdair G Kergon <[email protected]>
Quoted 3 lines · Robin Dong
Quoted 1 line
If dm-delay structure allocation failed, report more precise error
information.
Quoted 6 lines
Do you have some test result that shows this?
DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);?
Oh, sorry for my omission.
But I stil think that print "Cannot allocate linear context" in dm-flakey is puzzling...
Quoted 3 lines
Alasdair
--
--
Best Regard
Robin Dong
Quoted 8 lines · Robin Dong
2013/7/7 Alasdair G Kergon <[email protected]>
Quoted 3 lines · Robin Dong
Quoted 1 line
If dm-delay structure allocation failed, report more precise error
information.
Quoted 3 lines
Do you have some test result that shows this?
Quoted 7 lines
Quoted 3 lines
DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);?
Oh, sorry for my omission.
But I stil think that print "Cannot allocate linear context" in dm-flakey is puzzling...
Yeah, that should get fixed up (with s/linear //), clearly got introduced via cut and paste.