From 0aa4ce9b7d04c3197dfc27b3eefccd0d6c799896 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 25 Jul 2014 18:41:56 +0000 Subject: [PATCH] Transform the I/O when vdev_physical_ashift is greater than SPA_MINBLOCKSHIFT. MFC after: 2 weeks --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c index 96e8cac4255f..dfd9f29dee06 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c @@ -2622,7 +2622,8 @@ zio_vdev_io_start(zio_t **ziop) align = 1ULL << vd->vdev_top->vdev_ashift; - if (!(zio->io_flags & ZIO_FLAG_PHYSICAL) && + if ((!(zio->io_flags & ZIO_FLAG_PHYSICAL) || + (vd->vdev_top->vdev_physical_ashift > SPA_MINBLOCKSHIFT)) && P2PHASE(zio->io_size, align) != 0) { /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align);