This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master in repository sanlock.
commit ca76b929ffea1f2f3b6c41a2ef8af782abe6ee6f Author: David Teigland teigland@redhat.com AuthorDate: Fri Jun 27 15:45:37 2025 -0500
sanlock: make delta_read_lockspace_sizes compare host_id
to the owner field of the delta lease to ensure the expected values are being read. --- src/delta_lease.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/delta_lease.c b/src/delta_lease.c index 9e98d3b..82b2ef8 100644 --- a/src/delta_lease.c +++ b/src/delta_lease.c @@ -236,9 +236,12 @@ int delta_read_lockspace_sizes(struct task *task, if ((leader.version & 0xFFFF0000) != DELTA_DISK_VERSION_MAJOR) goto next;
- if (leader.sector_size != 512) + if (leader.owner_id != host_id) goto next;
+ if (leader.sector_size != 512) + return SANLK_LEADER_SECTORSIZE; + *sector_size = leader.sector_size;
*align_size = leader_align_size_from_flag(leader.flags); @@ -261,6 +264,9 @@ int delta_read_lockspace_sizes(struct task *task, if ((leader.version & 0xFFFF0000) != DELTA_DISK_VERSION_MAJOR) return SANLK_LEADER_VERSION;
+ if (leader.owner_id != host_id) + return SANLK_LEADER_DIFF; + if (leader.sector_size != 4096) return SANLK_LEADER_SECTORSIZE;
sanlock-devel@lists.fedorahosted.org