diff options
author | Brian Behlendorf <[email protected]> | 2012-10-24 15:22:31 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-10-24 15:25:33 -0700 |
commit | 178e73b376297be44253f7655cd8cba3cf082171 (patch) | |
tree | d5373995bfc02ac2b5afba6d0feac6674f70fa59 /module | |
parent | f21e5c6a17ee7c1a27fdcb93d29d8b7b5a158053 (diff) |
Revert "Don't ashift-align vdev read requests."
This reverts commit a5c20e2a0a9046c06d86615fbf51dc04f12bba14 which
accidentally introduced a regression for real 4k sector devices.
See issue #1065 for details.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1065
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zio.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c index ce76e010c..ece3329d0 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -2438,25 +2438,19 @@ zio_vdev_io_start(zio_t *zio) align = 1ULL << vd->vdev_top->vdev_ashift; - /* - * On Linux, we don't care about read alignment. The backing block - * device driver will take care of that for us. - * The only exception is raidz, which needs a full block for parity. - */ - if (P2PHASE(zio->io_size, align) != 0 && - (zio->io_type != ZIO_TYPE_READ || - vd->vdev_ops == &vdev_raidz_ops)) { + if (P2PHASE(zio->io_size, align) != 0) { uint64_t asize = P2ROUNDUP(zio->io_size, align); char *abuf = zio_buf_alloc(asize); + ASSERT(vd == vd->vdev_top); if (zio->io_type == ZIO_TYPE_WRITE) { bcopy(zio->io_data, abuf, zio->io_size); bzero(abuf + zio->io_size, asize - zio->io_size); } zio_push_transform(zio, abuf, asize, asize, zio_subblock); - ASSERT(P2PHASE(zio->io_size, align) == 0); } ASSERT(P2PHASE(zio->io_offset, align) == 0); + ASSERT(P2PHASE(zio->io_size, align) == 0); VERIFY(zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)); /* |