Locks xlator doesn't allow tracking individual posix locks
Description of problem:
Since posix locks are defined in a way that can be naturally merged (multiple overlapping locks can be removed by a single unlock on the range, instead of one unlock for each lock), locks xlator uses a similar approach for granted locks. However this makes it impossible to cancel or "undo" a previous lock.
In normal circumstances this is not necessary, but for volumes with redundancy, like replicated and dispersed, it may be necessary to undo a lock that has been granted on one brick but fails on others. Without this feature, it's not possible to correctly restore the old state for a failed lock acquisition.
This is the source of some dangerous problems, like #3179.
We should treat posix locks like inodelks and entrylks, where each lock is an independent entity. To correctly handle the "merge" nature of posix locks we should do special management during unlock.
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.