[lvm-devel] [RFC PATCH] lvmlockd: purge the lock resources left in previous lockspace

David Teigland teigland at redhat.com
Fri Sep 30 15:32:51 UTC 2022


On Fri, Sep 30, 2022 at 09:57:08PM +0800, Lidong Zhong wrote:
>      /* FIXME: purge any remaining orphan locks in each rejoined ls? */

You're fixing it, so we can drop the comment.

> +                file = fopen(ls_comms_path, "r");
> +                if (!file)
> +                    continue;
> +                if (fgets(line, LOCK_LINE_MAX, file)) {
> +                    rv = sscanf(line, "%d", &val);
> +                    if (rv == 1)
> +                        return val;

Is this missing an fclose?

Please confirm that this works for your test case and I'll include it.

Thanks,
Dave


More information about the lvm-devel mailing list