aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-02-11 13:13:10 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-02-11 13:13:10 +0000
commit392d56b4bdfa88bde73d96f8cacd5557135a9d92 (patch)
tree5d3dc97d07618e8b81d54d5151a12cc9968f8218 /sys/geom
parenta0ca480ce6f84ed0ac503150e6e27cc10c68caf7 (diff)
downloadsrc-392d56b4bdfa88bde73d96f8cacd5557135a9d92.tar.gz
src-392d56b4bdfa88bde73d96f8cacd5557135a9d92.zip
Don't short-circuit zero-length requests of they are BIO_[SG]ETATTR.
Notes
Notes: svn path=/head/; revision=110703
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_io.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index f334817e29fa..85ffe335bc86 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -393,16 +393,24 @@ g_io_schedule_down(struct thread *tp __unused)
g_io_deliver(bp, error);
continue;
}
- /* Truncate requests to the end of providers media. */
- excess = bp->bio_offset + bp->bio_length;
- if (excess > bp->bio_to->mediasize) {
- excess -= bp->bio_to->mediasize;
- bp->bio_length -= excess;
- }
- /* Deliver zero length transfers right here. */
- if (bp->bio_length == 0) {
- g_io_deliver(bp, 0);
- continue;
+ switch (bp->bio_cmd) {
+ case BIO_READ:
+ case BIO_WRITE:
+ case BIO_DELETE:
+ /* Truncate requests to the end of providers media. */
+ excess = bp->bio_offset + bp->bio_length;
+ if (excess > bp->bio_to->mediasize) {
+ excess -= bp->bio_to->mediasize;
+ bp->bio_length -= excess;
+ }
+ /* Deliver zero length transfers right here. */
+ if (bp->bio_length == 0) {
+ g_io_deliver(bp, 0);
+ continue;
+ }
+ break;
+ default:
+ break;
}
bp->bio_to->geom->start(bp);
if (pace) {