Added "nowritecache" option to ZFS storage plugin. Turns off write caching on Comstar and Istgt LUNs created by the plugin. Has no effect on IET, as IET always uses write-through caching for blockio volumes not in read-only mode.

Signed-off-by: Chris Allen <Chris Allen>
This commit is contained in:
Chris Allen
2014-03-10 12:07:35 -07:00
committed by Dietmar Maurer
parent a9bd7bdfdc
commit 70986fd9e4
3 changed files with 26 additions and 5 deletions

View File

@ -50,11 +50,15 @@ sub run_lun_command {
};
if ($method eq 'create_lu') {
my $wcd = 'false';
if ($scfg->{nowritecache}) {
$wcd = 'true';
}
my $prefix = '600144f';
my $digest = md5_hex($params[0]);
$digest =~ /(\w{7}(.*))/;
$guid = "$prefix$2";
@params = ('-p', 'wcd=false', '-p', "guid=$guid", @params);
@params = ('-p', "wcd=$wcd", '-p', "guid=$guid", @params);
} elsif ($method eq 'modify_lu') {
@params = ('-s', @params);
} elsif ($method eq 'list_view') {