Skip to content

linux: fall back to fdinfo for missing file locks - #402

Merged
jiegec merged 1 commit into
lsof-org:masterfrom
hja-oss:fix/issue-152-fdinfo-locks
Nov 23, 2026
Merged

jiegec merged 1 commit into
lsof-org:masterfrom
hja-oss:fix/issue-152-fdinfo-locks

Conversation

@hja-oss

@hja-oss hja-oss commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Fix missing lock indicators on Btrfs, where stat() and /proc/locks can report different device numbers.

When the existing lookup misses, use descriptor-specific lock records from /proc/PID/fdinfo/FD without device-number arithmetic.

Extend LTlock to verify that unlocking clears the lock indicator. Verified on Btrfs, ext4, and overlay, including same-inode snapshot checks on Btrfs.

Fixes #152.

@jiegec
jiegec merged commit 49935de into lsof-org:master Nov 23, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LTlock fails on btrfs

2 participants