* GPL HEADER END
*/
/*
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
* Use is subject to license terms.
- *
*/
/*
* Author: Brian Behlendorf <behlendorf1@llnl.gov>
/*
* Create the ZFS filesystem with any required mkfs options:
* - canmount=off is set to prevent zfs automounting
- * - version=4 is set because SA are not yet handled by the osd
+ * - xattr=sa is set to use system attribute based xattrs
*/
memset(mkfs_cmd, 0, PATH_MAX);
snprintf(mkfs_cmd, PATH_MAX,
"zfs create -o canmount=off -o xattr=sa%s %s",
- zfs_mkfs_opts(mop, mkfs_tmp, PATH_MAX),
- ds);
+ zfs_mkfs_opts(mop, mkfs_tmp, PATH_MAX), ds);
vprint("mkfs_cmd = %s\n", mkfs_cmd);
ret = run_command(mkfs_cmd, PATH_MAX);
{
int ret = 0;
- /* If the ZFS libs are not installed, don't print an error to avoid
- * spamming ldiskfs users. An error message will still be printed if
- * someone tries to do some real work involving a ZFS backend */
-
- if (libzfs_load_module("zfs") != 0) {
- /* The ZFS modules are not installed */
- ret = EINVAL;
- goto out;
- }
-
g_zfs = libzfs_init();
if (g_zfs == NULL) {
fprintf(stderr, "Failed to initialize ZFS library\n");
ret = EINVAL;
+ } else {
+ osd_zfs_setup = 1;
}
-out:
- osd_zfs_setup = 1;
- if (ret)
- zfs_fini();
+
return ret;
}