mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-11 13:01:07 +00:00
Scoutfs can get into a situation where it wants to acquire a lock twice. This happens when we have a parent and child in the same inode group. A create operation will lock that group twice, once for each inode. Instead of forcing callers to remember which inode groups they've locked, we handle this internally within dlmglue. Add a dlmglue lock type flag that indicates we might recursively lock a resource. During locking, when dlmglue sees that flag and we already have the lock at an appropriate level, it will allow the lock operation to continue even when the lock is marked blocking. Signed-off-by: Mark Fasheh <mfasheh@versity.com>