summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/zvol.c
diff options
context:
space:
mode:
authorNeil Perrin <Neil.Perrin@Sun.COM>2009-08-14 11:18:12 -0600
committerNeil Perrin <Neil.Perrin@Sun.COM>2009-08-14 11:18:12 -0600
commite09fa4dacfb671e707d50a55ae9b5cc191e1b8cb (patch)
treec030579dcc87f0eab65e5e5152a6ca3ac6405dd4 /usr/src/uts/common/fs/zfs/zvol.c
parent63f531d1cf94e7ff3e74e15ca709808d96e239f3 (diff)
downloadillumos-gate-e09fa4dacfb671e707d50a55ae9b5cc191e1b8cb.tar.gz
PSARC 2009/423 ZFS logbias property
6832481 ZFS separate intent log bypass property
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zvol.c')
-rw-r--r--usr/src/uts/common/fs/zfs/zvol.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/zvol.c b/usr/src/uts/common/fs/zfs/zvol.c
index 678416dfa3..70d9d1b440 100644
--- a/usr/src/uts/common/fs/zfs/zvol.c
+++ b/usr/src/uts/common/fs/zfs/zvol.c
@@ -990,6 +990,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid,
uint32_t blocksize = zv->zv_volblocksize;
zilog_t *zilog = zv->zv_zilog;
boolean_t slogging;
+ ssize_t immediate_write_sz;
if (zil_disable)
return;
@@ -1001,7 +1002,11 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid,
return;
}
- slogging = spa_has_slogs(zilog->zl_spa);
+ immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT)
+ ? 0 : zvol_immediate_write_sz;
+
+ slogging = spa_has_slogs(zilog->zl_spa) &&
+ (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY);
while (resid) {
itx_t *itx;
@@ -1013,7 +1018,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid,
* Unlike zfs_log_write() we can be called with
* upto DMU_MAX_ACCESS/2 (5MB) writes.
*/
- if (blocksize > zvol_immediate_write_sz && !slogging &&
+ if (blocksize > immediate_write_sz && !slogging &&
resid >= blocksize && off % blocksize == 0) {
write_state = WR_INDIRECT; /* uses dmu_sync */
len = blocksize;