def METHOD_NAME(path):
    try:
        log.debug("Rescanning device %s", path)
        with utils.stopwatch("Rescanned device %s" % path, log=log):
            fd = os.open(path, os.O_WRONLY)
            try:
                os.write(fd, b"1")
            finally:
                os.close(fd)
        return True
    except OSError as e:
        log.error("Rescanning %s failed: %s", path, e)
        return False
    except Exception:
        log.exception("Rescanning %s failed", path)
        return False