Skip to content

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

Open
hja-oss wants to merge 1 commit into
lsof-org:masterfrom
hja-oss:fix/issue-152-fdinfo-locks
Open

hja-oss wants to merge 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.

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

1 participant