Skip to content

Commit

Permalink
Fix intermittent EINVAL in ZFSPool.sync
Browse files Browse the repository at this point in the history
Sometimes ZFSPool.sync doesn't pass the pool_name argument to lzc_sync
correctly.  lzc_sync sees an empty string.  Replacing the self.name
property access with the self.handle instance variable access seems to
fix the problem, though I don't understand why.

Fixes truenas#193
  • Loading branch information
asomers committed Jul 14, 2022
1 parent bf5e7a1 commit 7d9cfc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2892,7 +2892,7 @@ cdef class ZFSPool(object):
IF HAVE_LZC_SYNC:
def sync(self, force=False):
cdef int ret
cdef const char *c_name = self.name
cdef const char *c_name = libzfs.zpool_get_name(self.handle)
cdef NVList innvl = NVList()

innvl["force"] = force
Expand Down

0 comments on commit 7d9cfc5

Please sign in to comment.