@@ -434,10 +434,10 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
434434 hc = __get_name_cell (new );
435435
436436 if (hc ) {
437- DMWARN ("Unable to change %s on mapped device %s to one that "
438- "already exists: %s" ,
439- change_uuid ? "uuid" : "name" ,
440- param -> name , new );
437+ DMERR ("Unable to change %s on mapped device %s to one that "
438+ "already exists: %s" ,
439+ change_uuid ? "uuid" : "name" ,
440+ param -> name , new );
441441 dm_put (hc -> md );
442442 up_write (& _hash_lock );
443443 kfree (new_data );
@@ -449,8 +449,8 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
449449 */
450450 hc = __get_name_cell (param -> name );
451451 if (!hc ) {
452- DMWARN ("Unable to rename non-existent device, %s to %s%s" ,
453- param -> name , change_uuid ? "uuid " : "" , new );
452+ DMERR ("Unable to rename non-existent device, %s to %s%s" ,
453+ param -> name , change_uuid ? "uuid " : "" , new );
454454 up_write (& _hash_lock );
455455 kfree (new_data );
456456 return ERR_PTR (- ENXIO );
@@ -460,9 +460,9 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
460460 * Does this device already have a uuid?
461461 */
462462 if (change_uuid && hc -> uuid ) {
463- DMWARN ("Unable to change uuid of mapped device %s to %s "
464- "because uuid is already set to %s" ,
465- param -> name , new , hc -> uuid );
463+ DMERR ("Unable to change uuid of mapped device %s to %s "
464+ "because uuid is already set to %s" ,
465+ param -> name , new , hc -> uuid );
466466 dm_put (hc -> md );
467467 up_write (& _hash_lock );
468468 kfree (new_data );
@@ -750,7 +750,7 @@ static int get_target_version(struct file *filp, struct dm_ioctl *param, size_t
750750static int check_name (const char * name )
751751{
752752 if (strchr (name , '/' )) {
753- DMWARN ("invalid device name" );
753+ DMERR ("invalid device name" );
754754 return - EINVAL ;
755755 }
756756
@@ -773,7 +773,7 @@ static struct dm_table *dm_get_inactive_table(struct mapped_device *md, int *src
773773 down_read (& _hash_lock );
774774 hc = dm_get_mdptr (md );
775775 if (!hc || hc -> md != md ) {
776- DMWARN ("device has been removed from the dev hash table." );
776+ DMERR ("device has been removed from the dev hash table." );
777777 goto out ;
778778 }
779779
@@ -1026,7 +1026,7 @@ static int dev_rename(struct file *filp, struct dm_ioctl *param, size_t param_si
10261026 if (new_data < param -> data ||
10271027 invalid_str (new_data , (void * ) param + param_size ) || !* new_data ||
10281028 strlen (new_data ) > (change_uuid ? DM_UUID_LEN - 1 : DM_NAME_LEN - 1 )) {
1029- DMWARN ("Invalid new mapped device name or uuid string supplied." );
1029+ DMERR ("Invalid new mapped device name or uuid string supplied." );
10301030 return - EINVAL ;
10311031 }
10321032
@@ -1061,21 +1061,21 @@ static int dev_set_geometry(struct file *filp, struct dm_ioctl *param, size_t pa
10611061
10621062 if (geostr < param -> data ||
10631063 invalid_str (geostr , (void * ) param + param_size )) {
1064- DMWARN ("Invalid geometry supplied." );
1064+ DMERR ("Invalid geometry supplied." );
10651065 goto out ;
10661066 }
10671067
10681068 x = sscanf (geostr , "%lu %lu %lu %lu%c" , indata ,
10691069 indata + 1 , indata + 2 , indata + 3 , & dummy );
10701070
10711071 if (x != 4 ) {
1072- DMWARN ("Unable to interpret geometry settings." );
1072+ DMERR ("Unable to interpret geometry settings." );
10731073 goto out ;
10741074 }
10751075
10761076 if (indata [0 ] > 65535 || indata [1 ] > 255 ||
10771077 indata [2 ] > 255 || indata [3 ] > ULONG_MAX ) {
1078- DMWARN ("Geometry exceeds range limits." );
1078+ DMERR ("Geometry exceeds range limits." );
10791079 goto out ;
10801080 }
10811081
@@ -1387,15 +1387,15 @@ static int populate_table(struct dm_table *table,
13871387 char * target_params ;
13881388
13891389 if (!param -> target_count ) {
1390- DMWARN ("populate_table: no targets specified" );
1390+ DMERR ("populate_table: no targets specified" );
13911391 return - EINVAL ;
13921392 }
13931393
13941394 for (i = 0 ; i < param -> target_count ; i ++ ) {
13951395
13961396 r = next_target (spec , next , end , & spec , & target_params );
13971397 if (r ) {
1398- DMWARN ("unable to find target" );
1398+ DMERR ("unable to find target" );
13991399 return r ;
14001400 }
14011401
@@ -1404,7 +1404,7 @@ static int populate_table(struct dm_table *table,
14041404 (sector_t ) spec -> length ,
14051405 target_params );
14061406 if (r ) {
1407- DMWARN ("error adding target to table" );
1407+ DMERR ("error adding target to table" );
14081408 return r ;
14091409 }
14101410
@@ -1451,8 +1451,8 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
14511451 if (immutable_target_type &&
14521452 (immutable_target_type != dm_table_get_immutable_target_type (t )) &&
14531453 !dm_table_get_wildcard_target (t )) {
1454- DMWARN ("can't replace immutable target type %s" ,
1455- immutable_target_type -> name );
1454+ DMERR ("can't replace immutable target type %s" ,
1455+ immutable_target_type -> name );
14561456 r = - EINVAL ;
14571457 goto err_unlock_md_type ;
14581458 }
@@ -1461,12 +1461,12 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
14611461 /* setup md->queue to reflect md's type (may block) */
14621462 r = dm_setup_md_queue (md , t );
14631463 if (r ) {
1464- DMWARN ("unable to set up device queue for new table." );
1464+ DMERR ("unable to set up device queue for new table." );
14651465 goto err_unlock_md_type ;
14661466 }
14671467 } else if (!is_valid_type (dm_get_md_type (md ), dm_table_get_type (t ))) {
1468- DMWARN ("can't change device type (old=%u vs new=%u) after initial table load." ,
1469- dm_get_md_type (md ), dm_table_get_type (t ));
1468+ DMERR ("can't change device type (old=%u vs new=%u) after initial table load." ,
1469+ dm_get_md_type (md ), dm_table_get_type (t ));
14701470 r = - EINVAL ;
14711471 goto err_unlock_md_type ;
14721472 }
@@ -1477,7 +1477,7 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
14771477 down_write (& _hash_lock );
14781478 hc = dm_get_mdptr (md );
14791479 if (!hc || hc -> md != md ) {
1480- DMWARN ("device has been removed from the dev hash table." );
1480+ DMERR ("device has been removed from the dev hash table." );
14811481 up_write (& _hash_lock );
14821482 r = - ENXIO ;
14831483 goto err_destroy_table ;
@@ -1686,19 +1686,19 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
16861686
16871687 if (tmsg < (struct dm_target_msg * ) param -> data ||
16881688 invalid_str (tmsg -> message , (void * ) param + param_size )) {
1689- DMWARN ("Invalid target message parameters." );
1689+ DMERR ("Invalid target message parameters." );
16901690 r = - EINVAL ;
16911691 goto out ;
16921692 }
16931693
16941694 r = dm_split_args (& argc , & argv , tmsg -> message );
16951695 if (r ) {
1696- DMWARN ("Failed to split target message parameters" );
1696+ DMERR ("Failed to split target message parameters" );
16971697 goto out ;
16981698 }
16991699
17001700 if (!argc ) {
1701- DMWARN ("Empty message received." );
1701+ DMERR ("Empty message received." );
17021702 r = - EINVAL ;
17031703 goto out_argv ;
17041704 }
@@ -1718,12 +1718,12 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
17181718
17191719 ti = dm_table_find_target (table , tmsg -> sector );
17201720 if (!ti ) {
1721- DMWARN ("Target message sector outside device." );
1721+ DMERR ("Target message sector outside device." );
17221722 r = - EINVAL ;
17231723 } else if (ti -> type -> message )
17241724 r = ti -> type -> message (ti , argc , argv , result , maxlen );
17251725 else {
1726- DMWARN ("Target type does not support messages" );
1726+ DMERR ("Target type does not support messages" );
17271727 r = - EINVAL ;
17281728 }
17291729
@@ -1814,11 +1814,11 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
18141814
18151815 if ((DM_VERSION_MAJOR != version [0 ]) ||
18161816 (DM_VERSION_MINOR < version [1 ])) {
1817- DMWARN ("ioctl interface mismatch: "
1818- "kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)" ,
1819- DM_VERSION_MAJOR , DM_VERSION_MINOR ,
1820- DM_VERSION_PATCHLEVEL ,
1821- version [0 ], version [1 ], version [2 ], cmd );
1817+ DMERR ("ioctl interface mismatch: "
1818+ "kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)" ,
1819+ DM_VERSION_MAJOR , DM_VERSION_MINOR ,
1820+ DM_VERSION_PATCHLEVEL ,
1821+ version [0 ], version [1 ], version [2 ], cmd );
18221822 r = - EINVAL ;
18231823 }
18241824
@@ -1927,11 +1927,11 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
19271927
19281928 if (cmd == DM_DEV_CREATE_CMD ) {
19291929 if (!* param -> name ) {
1930- DMWARN ("name not supplied when creating device" );
1930+ DMERR ("name not supplied when creating device" );
19311931 return - EINVAL ;
19321932 }
19331933 } else if (* param -> uuid && * param -> name ) {
1934- DMWARN ("only supply one of name or uuid, cmd(%u)" , cmd );
1934+ DMERR ("only supply one of name or uuid, cmd(%u)" , cmd );
19351935 return - EINVAL ;
19361936 }
19371937
@@ -1978,7 +1978,7 @@ static int ctl_ioctl(struct file *file, uint command, struct dm_ioctl __user *us
19781978
19791979 fn = lookup_ioctl (cmd , & ioctl_flags );
19801980 if (!fn ) {
1981- DMWARN ("dm_ctl_ioctl: unknown command 0x%x" , command );
1981+ DMERR ("dm_ctl_ioctl: unknown command 0x%x" , command );
19821982 return - ENOTTY ;
19831983 }
19841984
@@ -2203,7 +2203,7 @@ int __init dm_early_create(struct dm_ioctl *dmi,
22032203 (sector_t ) spec_array [i ]-> length ,
22042204 target_params_array [i ]);
22052205 if (r ) {
2206- DMWARN ("error adding target to table" );
2206+ DMERR ("error adding target to table" );
22072207 goto err_destroy_table ;
22082208 }
22092209 }
@@ -2216,7 +2216,7 @@ int __init dm_early_create(struct dm_ioctl *dmi,
22162216 /* setup md->queue to reflect md's type (may block) */
22172217 r = dm_setup_md_queue (md , t );
22182218 if (r ) {
2219- DMWARN ("unable to set up device queue for new table." );
2219+ DMERR ("unable to set up device queue for new table." );
22202220 goto err_destroy_table ;
22212221 }
22222222
0 commit comments