summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>1999-09-23 08:41:48 +0000
committerMatthew Dillon <dillon@FreeBSD.org>1999-09-23 08:41:48 +0000
commit25d1a00bc07308e848846b62cb13cca6d8f251a9 (patch)
tree4e15abd065d389b535c43f7918625d4a1e18b550
parent6f83979d1fb6cb59480314f63406ae210b253274 (diff)
Notes
-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 4037f793174c..19d765c53010 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 4037f793174c..19d765c53010 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);
/*