'Try to lock the mountpoint in a blocking manner.
XXX: this will not raise an IOError unless EBADF, EINVAL, or
EOPNOTSUPP occurs when running flock(3) (unless one has stumbled
across an OS bug). Some portions of FreeNAS incorrectly assume
that IOError will occur with this API if the lock is unavailable.
:raises:
IOError - see the ERRORS section under flock(3) for more details;
skip over the EWOULDBLOCK case.'

def lock(self):

    fcntl.flock(self._fd, fcntl.LOCK_EX)
