summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2013-04-06 10:34:02 +0000
committertrasz <trasz@FreeBSD.org>2013-04-06 10:34:02 +0000
commitf25063da0770fd0a9b4ed6ffdd6687e7de116255 (patch)
tree2c4c3cb88ea1289ae10b0cc74dc096cdcb1ade11 /sys/cam
parent249764dd66251ac0382f8f102cacbb4ecb012195 (diff)
downloadFreeBSD-src-f25063da0770fd0a9b4ed6ffdd6687e7de116255.zip
FreeBSD-src-f25063da0770fd0a9b4ed6ffdd6687e7de116255.tar.gz
Make SYNCHRONIZE CACHE work with LUNs backed by device files (as opposed
to regular files, which already worked fine). With this change, it's no longer neccessary to use "ctladm realsync off" workaround.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl_backend_block.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index dc097db..9a13fb5 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -950,6 +950,7 @@ ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
switch (io->scsiio.cdb[0]) {
case SYNCHRONIZE_CACHE:
case SYNCHRONIZE_CACHE_16:
+ beio->bio_cmd = BIO_FLUSH;
beio->ds_trans_type = DEVSTAT_NO_DATA;
beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
beio->io_len = 0;
OpenPOWER on IntegriCloud