summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ccd/ccd.c11
-rw-r--r--sys/geom/geom_ccd.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 4037f79..19d765c 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -1007,7 +1007,16 @@ ccdiodone(cbp)
return;
}
- count = cbp->cb_buf.b_bcount;
+ /*
+ * use b_bufsize to determine how big the original request was rather
+ * then b_bcount, because b_bcount may have been truncated for EOF.
+ *
+ * XXX We check for an error, but we do not test the resid for an
+ * aligned EOF condition. This may result in character & block
+ * device access not recognizing EOF properly when read or written
+ * sequentially, but will not effect filesystems.
+ */
+ count = cbp->cb_buf.b_bufsize;
putccdbuf(cbp);
/*
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 4037f79..19d765c 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -1007,7 +1007,16 @@ ccdiodone(cbp)
return;
}
- count = cbp->cb_buf.b_bcount;
+ /*
+ * use b_bufsize to determine how big the original request was rather
+ * then b_bcount, because b_bcount may have been truncated for EOF.
+ *
+ * XXX We check for an error, but we do not test the resid for an
+ * aligned EOF condition. This may result in character & block
+ * device access not recognizing EOF properly when read or written
+ * sequentially, but will not effect filesystems.
+ */
+ count = cbp->cb_buf.b_bufsize;
putccdbuf(cbp);
/*
OpenPOWER on IntegriCloud