Revision f6a1ed10864b7540fa758bbccf3433fe17070329 authored by Mikulas Patocka on 04 September 2009, 19:40:22 UTC, committed by Alasdair G Kergon on 04 September 2009, 19:40:22 UTC
The logic to check for valid device areas is inverted relative to proper use with iterate_devices. The iterate_devices method calls its callback for every underlying device in the target. If any callback returns non-zero, iterate_devices exits immediately. But the callback device_area_is_valid() returns 0 on error and 1 on success. The overall effect without is that an error is issued only if every device is invalid. This patch renames device_area_is_valid to device_area_is_invalid and inverts the logic so that one invalid device is sufficient to raise an error. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
1 parent 8811f46
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.5 KB |
Kconfig.iosched | -rw-r--r-- | 1.9 KB |
Makefile | -rw-r--r-- | 569 bytes |
as-iosched.c | -rw-r--r-- | 38.7 KB |
blk-barrier.c | -rw-r--r-- | 9.7 KB |
blk-core.c | -rw-r--r-- | 63.8 KB |
blk-exec.c | -rw-r--r-- | 2.6 KB |
blk-integrity.c | -rw-r--r-- | 9.9 KB |
blk-ioc.c | -rw-r--r-- | 4.0 KB |
blk-map.c | -rw-r--r-- | 8.1 KB |
blk-merge.c | -rw-r--r-- | 9.8 KB |
blk-settings.c | -rw-r--r-- | 22.1 KB |
blk-softirq.c | -rw-r--r-- | 4.1 KB |
blk-sysfs.c | -rw-r--r-- | 11.7 KB |
blk-tag.c | -rw-r--r-- | 9.9 KB |
blk-timeout.c | -rw-r--r-- | 5.7 KB |
blk.h | -rw-r--r-- | 4.5 KB |
bsg.c | -rw-r--r-- | 23.4 KB |
cfq-iosched.c | -rw-r--r-- | 63.9 KB |
compat_ioctl.c | -rw-r--r-- | 21.6 KB |
deadline-iosched.c | -rw-r--r-- | 11.4 KB |
elevator.c | -rw-r--r-- | 24.9 KB |
genhd.c | -rw-r--r-- | 29.1 KB |
ioctl.c | -rw-r--r-- | 8.6 KB |
noop-iosched.c | -rw-r--r-- | 2.6 KB |
scsi_ioctl.c | -rw-r--r-- | 18.0 KB |
Computing file changes ...