Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164196306
D58472.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
791 B
Referenced Files
None
Subscribers
None
D58472.diff
View Options
diff --git a/sys/geom/zero/g_zero.c b/sys/geom/zero/g_zero.c
--- a/sys/geom/zero/g_zero.c
+++ b/sys/geom/zero/g_zero.c
@@ -83,11 +83,6 @@
size_t length;
vm_offset_t offset;
- aiovec.iov_base = g_zero_buffer;
- aiovec.iov_len = PAGE_SIZE;
- auio.uio_iov = &aiovec;
- auio.uio_iovcnt = 1;
- auio.uio_offset = 0;
auio.uio_segflg = UIO_SYSSPACE;
auio.uio_rw = UIO_WRITE;
auio.uio_td = curthread;
@@ -101,6 +96,12 @@
bp->bio_resid = bp->bio_length;
offset = bp->bio_ma_offset & PAGE_MASK;
for (int i = 0; i < bp->bio_ma_n && bp->bio_resid > 0; i++) {
+ aiovec.iov_base = g_zero_buffer;
+ aiovec.iov_len = PAGE_SIZE;
+ auio.uio_iov = &aiovec;
+ auio.uio_iovcnt = 1;
+ auio.uio_offset = 0;
+
length = MIN(PAGE_SIZE - offset, bp->bio_resid);
auio.uio_resid = length;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 30, 1:26 PM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35619232
Default Alt Text
D58472.diff (791 B)
Attached To
Mode
D58472: geom_zero(4): reset the uio vector on each uiomove()
Attached
Detach File
Event Timeline
Log In to Comment