http://defect.opensolaris.org/bz/show_bug.cgi?id=2074


Darren J Moffat <darrenm at opensolaris.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |FIXINPROGRESS




--- Comment #2 from Darren J Moffat <darrenm at opensolaris.org>  2008-05-29 
08:19:30 ---
This is similar to the ZIL case.  I believe the fix is to do in
zvol_log_write() what was done in zfs_log_write() which is to never use
WR_INDIRECT when encryption is enabled for the dataset.

diff -r f30d4d60a670 usr/src/uts/common/fs/zfs/zvol.c
--- a/usr/src/uts/common/fs/zfs/zvol.c  Thu May 29 15:40:23 2008 +0100
+++ b/usr/src/uts/common/fs/zfs/zvol.c  Thu May 29 16:15:27 2008 +0100
@@ -1124,8 +1124,12 @@
                ssize_t nbytes = MIN(len, blocksize - P2PHASE(off, blocksize));
                itx_t *itx = zil_itx_create(TX_WRITE, sizeof (*lr));

-               itx->itx_wr_state =
-                   len > zvol_immediate_write_sz ?  WR_INDIRECT :
WR_NEED_COPY;
+               if (len > zvol_immediate_write_sz &&
+                   zv->zv_objset->os_crypt != ZIO_CRYPT_OFF) {
+                       itx->itx_wr_state = WR_INDIRECT;
+               } else {
+                       itx->itx_wr_state = WR_NEED_COPY;
+               }
                itx->itx_private = zv;
                lr = (lr_write_t *)&itx->itx_lr

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to