diff options
author | Milan Broz <mbroz@redhat.com> | 2011-01-13 14:59:55 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-01-13 14:59:55 -0500 |
commit | 810b492375f4aed5ce222982054adc0394a4bd33 (patch) | |
tree | f67808075083d82a9719af4c657100d5d6d5547b | |
parent | 34745785937a2003c144c0d4802fa637470d87af (diff) |
dm ioctl: suppress needless warning messages
The device-mapper should not send warning messages to syslog
if a device is not found. This can be done by userspace
according to the returned dm-ioctl error code.
So move these messages to debug level and use rate limiting
to not flood syslog.
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
-rw-r--r-- | drivers/md/dm-ioctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index f3481d922206..6d12775a1061 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -779,7 +779,7 @@ static int dev_remove(struct dm_ioctl *param, size_t param_size) | |||
779 | hc = __find_device_hash_cell(param); | 779 | hc = __find_device_hash_cell(param); |
780 | 780 | ||
781 | if (!hc) { | 781 | if (!hc) { |
782 | DMWARN("device doesn't appear to be in the dev hash table."); | 782 | DMDEBUG_LIMIT("device doesn't appear to be in the dev hash table."); |
783 | up_write(&_hash_lock); | 783 | up_write(&_hash_lock); |
784 | return -ENXIO; | 784 | return -ENXIO; |
785 | } | 785 | } |
@@ -791,7 +791,7 @@ static int dev_remove(struct dm_ioctl *param, size_t param_size) | |||
791 | */ | 791 | */ |
792 | r = dm_lock_for_deletion(md); | 792 | r = dm_lock_for_deletion(md); |
793 | if (r) { | 793 | if (r) { |
794 | DMWARN("unable to remove open device %s", hc->name); | 794 | DMDEBUG_LIMIT("unable to remove open device %s", hc->name); |
795 | up_write(&_hash_lock); | 795 | up_write(&_hash_lock); |
796 | dm_put(md); | 796 | dm_put(md); |
797 | return r; | 797 | return r; |
@@ -938,7 +938,7 @@ static int do_resume(struct dm_ioctl *param) | |||
938 | 938 | ||
939 | hc = __find_device_hash_cell(param); | 939 | hc = __find_device_hash_cell(param); |
940 | if (!hc) { | 940 | if (!hc) { |
941 | DMWARN("device doesn't appear to be in the dev hash table."); | 941 | DMDEBUG_LIMIT("device doesn't appear to be in the dev hash table."); |
942 | up_write(&_hash_lock); | 942 | up_write(&_hash_lock); |
943 | return -ENXIO; | 943 | return -ENXIO; |
944 | } | 944 | } |
@@ -1265,7 +1265,7 @@ static int table_clear(struct dm_ioctl *param, size_t param_size) | |||
1265 | 1265 | ||
1266 | hc = __find_device_hash_cell(param); | 1266 | hc = __find_device_hash_cell(param); |
1267 | if (!hc) { | 1267 | if (!hc) { |
1268 | DMWARN("device doesn't appear to be in the dev hash table."); | 1268 | DMDEBUG_LIMIT("device doesn't appear to be in the dev hash table."); |
1269 | up_write(&_hash_lock); | 1269 | up_write(&_hash_lock); |
1270 | return -ENXIO; | 1270 | return -ENXIO; |
1271 | } | 1271 | } |