Skip to content

Commit d745a00

Browse files
committed
pivy-zfs: fix for openzfs 2.3.x
1 parent 3ab66c5 commit d745a00

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pivy-zfs.c

+11
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,18 @@ cmd_unlock(const char *fsname)
332332
zpool_handle_t *pool;
333333
pool = zpool_open_canfail(zfshdl, fsname);
334334
if (pool != NULL) {
335+
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(DMU_DIRECTIO)
336+
/*
337+
* As of OpenZFS 2.3.x this function now has a new
338+
* argument. We don't have a good way to sniff the
339+
* actual version of OpenZFS we're building against,
340+
* so assume if there's DIRECTIO support that it's
341+
* got this change to libzfs as well.
342+
*/
343+
(void) zpool_enable_datasets(pool, NULL, 0, 512);
344+
#else
335345
(void) zpool_enable_datasets(pool, NULL, 0);
346+
#endif
336347
zpool_close(pool);
337348
}
338349
}

0 commit comments

Comments
 (0)