summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 79bf19c..71d0365 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -205,9 +205,6 @@ struct md_s {
vm_object_t object;
};
-/* Used for BIO_DELETE on MD_VNODE */
-static u_char zero[PAGE_SIZE];
-
static struct indir *
new_indir(u_int shift)
{
@@ -560,7 +557,8 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
* that the two cases end up having very little in common.
*/
if (bp->bio_cmd == BIO_DELETE) {
- zerosize = sizeof(zero) - (sizeof(zero) % sc->sectorsize);
+ zerosize = ZERO_REGION_SIZE -
+ (ZERO_REGION_SIZE % sc->sectorsize);
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_offset = (vm_ooffset_t)bp->bio_offset;
@@ -573,7 +571,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = 0;
while (auio.uio_offset < end) {
- aiov.iov_base = zero;
+ aiov.iov_base = __DECONST(void *, zero_region);
aiov.iov_len = end - auio.uio_offset;
if (aiov.iov_len > zerosize)
aiov.iov_len = zerosize;
OpenPOWER on IntegriCloud