@@ -434,10 +434,10 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
434
434
hc = __get_name_cell (new );
435
435
436
436
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 );
441
441
dm_put (hc -> md );
442
442
up_write (& _hash_lock );
443
443
kfree (new_data );
@@ -449,8 +449,8 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
449
449
*/
450
450
hc = __get_name_cell (param -> name );
451
451
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 );
454
454
up_write (& _hash_lock );
455
455
kfree (new_data );
456
456
return ERR_PTR (- ENXIO );
@@ -460,9 +460,9 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
460
460
* Does this device already have a uuid?
461
461
*/
462
462
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 );
466
466
dm_put (hc -> md );
467
467
up_write (& _hash_lock );
468
468
kfree (new_data );
@@ -750,7 +750,7 @@ static int get_target_version(struct file *filp, struct dm_ioctl *param, size_t
750
750
static int check_name (const char * name )
751
751
{
752
752
if (strchr (name , '/' )) {
753
- DMWARN ("invalid device name" );
753
+ DMERR ("invalid device name" );
754
754
return - EINVAL ;
755
755
}
756
756
@@ -773,7 +773,7 @@ static struct dm_table *dm_get_inactive_table(struct mapped_device *md, int *src
773
773
down_read (& _hash_lock );
774
774
hc = dm_get_mdptr (md );
775
775
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." );
777
777
goto out ;
778
778
}
779
779
@@ -1026,7 +1026,7 @@ static int dev_rename(struct file *filp, struct dm_ioctl *param, size_t param_si
1026
1026
if (new_data < param -> data ||
1027
1027
invalid_str (new_data , (void * ) param + param_size ) || !* new_data ||
1028
1028
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." );
1030
1030
return - EINVAL ;
1031
1031
}
1032
1032
@@ -1061,21 +1061,21 @@ static int dev_set_geometry(struct file *filp, struct dm_ioctl *param, size_t pa
1061
1061
1062
1062
if (geostr < param -> data ||
1063
1063
invalid_str (geostr , (void * ) param + param_size )) {
1064
- DMWARN ("Invalid geometry supplied." );
1064
+ DMERR ("Invalid geometry supplied." );
1065
1065
goto out ;
1066
1066
}
1067
1067
1068
1068
x = sscanf (geostr , "%lu %lu %lu %lu%c" , indata ,
1069
1069
indata + 1 , indata + 2 , indata + 3 , & dummy );
1070
1070
1071
1071
if (x != 4 ) {
1072
- DMWARN ("Unable to interpret geometry settings." );
1072
+ DMERR ("Unable to interpret geometry settings." );
1073
1073
goto out ;
1074
1074
}
1075
1075
1076
1076
if (indata [0 ] > 65535 || indata [1 ] > 255 ||
1077
1077
indata [2 ] > 255 || indata [3 ] > ULONG_MAX ) {
1078
- DMWARN ("Geometry exceeds range limits." );
1078
+ DMERR ("Geometry exceeds range limits." );
1079
1079
goto out ;
1080
1080
}
1081
1081
@@ -1387,15 +1387,15 @@ static int populate_table(struct dm_table *table,
1387
1387
char * target_params ;
1388
1388
1389
1389
if (!param -> target_count ) {
1390
- DMWARN ("populate_table: no targets specified" );
1390
+ DMERR ("populate_table: no targets specified" );
1391
1391
return - EINVAL ;
1392
1392
}
1393
1393
1394
1394
for (i = 0 ; i < param -> target_count ; i ++ ) {
1395
1395
1396
1396
r = next_target (spec , next , end , & spec , & target_params );
1397
1397
if (r ) {
1398
- DMWARN ("unable to find target" );
1398
+ DMERR ("unable to find target" );
1399
1399
return r ;
1400
1400
}
1401
1401
@@ -1404,7 +1404,7 @@ static int populate_table(struct dm_table *table,
1404
1404
(sector_t ) spec -> length ,
1405
1405
target_params );
1406
1406
if (r ) {
1407
- DMWARN ("error adding target to table" );
1407
+ DMERR ("error adding target to table" );
1408
1408
return r ;
1409
1409
}
1410
1410
@@ -1451,8 +1451,8 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
1451
1451
if (immutable_target_type &&
1452
1452
(immutable_target_type != dm_table_get_immutable_target_type (t )) &&
1453
1453
!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 );
1456
1456
r = - EINVAL ;
1457
1457
goto err_unlock_md_type ;
1458
1458
}
@@ -1461,12 +1461,12 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
1461
1461
/* setup md->queue to reflect md's type (may block) */
1462
1462
r = dm_setup_md_queue (md , t );
1463
1463
if (r ) {
1464
- DMWARN ("unable to set up device queue for new table." );
1464
+ DMERR ("unable to set up device queue for new table." );
1465
1465
goto err_unlock_md_type ;
1466
1466
}
1467
1467
} 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 ));
1470
1470
r = - EINVAL ;
1471
1471
goto err_unlock_md_type ;
1472
1472
}
@@ -1477,7 +1477,7 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
1477
1477
down_write (& _hash_lock );
1478
1478
hc = dm_get_mdptr (md );
1479
1479
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." );
1481
1481
up_write (& _hash_lock );
1482
1482
r = - ENXIO ;
1483
1483
goto err_destroy_table ;
@@ -1686,19 +1686,19 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
1686
1686
1687
1687
if (tmsg < (struct dm_target_msg * ) param -> data ||
1688
1688
invalid_str (tmsg -> message , (void * ) param + param_size )) {
1689
- DMWARN ("Invalid target message parameters." );
1689
+ DMERR ("Invalid target message parameters." );
1690
1690
r = - EINVAL ;
1691
1691
goto out ;
1692
1692
}
1693
1693
1694
1694
r = dm_split_args (& argc , & argv , tmsg -> message );
1695
1695
if (r ) {
1696
- DMWARN ("Failed to split target message parameters" );
1696
+ DMERR ("Failed to split target message parameters" );
1697
1697
goto out ;
1698
1698
}
1699
1699
1700
1700
if (!argc ) {
1701
- DMWARN ("Empty message received." );
1701
+ DMERR ("Empty message received." );
1702
1702
r = - EINVAL ;
1703
1703
goto out_argv ;
1704
1704
}
@@ -1718,12 +1718,12 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
1718
1718
1719
1719
ti = dm_table_find_target (table , tmsg -> sector );
1720
1720
if (!ti ) {
1721
- DMWARN ("Target message sector outside device." );
1721
+ DMERR ("Target message sector outside device." );
1722
1722
r = - EINVAL ;
1723
1723
} else if (ti -> type -> message )
1724
1724
r = ti -> type -> message (ti , argc , argv , result , maxlen );
1725
1725
else {
1726
- DMWARN ("Target type does not support messages" );
1726
+ DMERR ("Target type does not support messages" );
1727
1727
r = - EINVAL ;
1728
1728
}
1729
1729
@@ -1814,11 +1814,11 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
1814
1814
1815
1815
if ((DM_VERSION_MAJOR != version [0 ]) ||
1816
1816
(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 );
1822
1822
r = - EINVAL ;
1823
1823
}
1824
1824
@@ -1927,11 +1927,11 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
1927
1927
1928
1928
if (cmd == DM_DEV_CREATE_CMD ) {
1929
1929
if (!* param -> name ) {
1930
- DMWARN ("name not supplied when creating device" );
1930
+ DMERR ("name not supplied when creating device" );
1931
1931
return - EINVAL ;
1932
1932
}
1933
1933
} 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 );
1935
1935
return - EINVAL ;
1936
1936
}
1937
1937
@@ -1978,7 +1978,7 @@ static int ctl_ioctl(struct file *file, uint command, struct dm_ioctl __user *us
1978
1978
1979
1979
fn = lookup_ioctl (cmd , & ioctl_flags );
1980
1980
if (!fn ) {
1981
- DMWARN ("dm_ctl_ioctl: unknown command 0x%x" , command );
1981
+ DMERR ("dm_ctl_ioctl: unknown command 0x%x" , command );
1982
1982
return - ENOTTY ;
1983
1983
}
1984
1984
@@ -2203,7 +2203,7 @@ int __init dm_early_create(struct dm_ioctl *dmi,
2203
2203
(sector_t ) spec_array [i ]-> length ,
2204
2204
target_params_array [i ]);
2205
2205
if (r ) {
2206
- DMWARN ("error adding target to table" );
2206
+ DMERR ("error adding target to table" );
2207
2207
goto err_destroy_table ;
2208
2208
}
2209
2209
}
@@ -2216,7 +2216,7 @@ int __init dm_early_create(struct dm_ioctl *dmi,
2216
2216
/* setup md->queue to reflect md's type (may block) */
2217
2217
r = dm_setup_md_queue (md , t );
2218
2218
if (r ) {
2219
- DMWARN ("unable to set up device queue for new table." );
2219
+ DMERR ("unable to set up device queue for new table." );
2220
2220
goto err_destroy_table ;
2221
2221
}
2222
2222
0 commit comments