[LU-2586] Need a way to request "good to have" lock bits Created: 07/Jan/13 Updated: 16/Sep/17 Resolved: 16/Sep/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | Lustre 2.11.0 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 6029 | ||||||||
| Description |
|
Seeing as how server side layout lock code invents some way to sidestep this, we really need to implement a "good to have" lock properties alongside of "absolute must subset of lock properties" requested. Obvious first candidate would be inodebit locks with two sets of bits, mandatory and "nice to have". This probably would couple nice with lock conversion too. |
| Comments |
| Comment by Jinshan Xiong (Inactive) [ 09/Jan/13 ] |
|
Another useful feature for inodebits lock is to provide a reason why a lock is cancelled. By adding this feature, we need to pack one more field in blocking_ast and client may handle it differently |
| Comment by Oleg Drokin [ 10/Jan/13 ] |
|
What do you mean by "why"? |
| Comment by Jinshan Xiong (Inactive) [ 06/Aug/14 ] |
|
To indicate the reason for the cancellation of the lock - for example, when a layout lock is being cancelled, it'll be useful to tell the clients the reason as the layout lock may be cancelled because of false sharing, or there is real layout change happening. It turned out to be useful also in file unlink case in patch http://review.whamcloud.com/7942 where a file is unlinked by one client so MDT revokes namespace lock but other clients have no idea what's happening. If the MDT could transfer this information to the clients, the clients would take the inode out of cache. |
| Comment by Andreas Dilger [ 16/Sep/17 ] |
|
This is fixed as part of patch https://review.whamcloud.com/28022 for the DoM project. LU-9184 ldlm: selective IBITS lock trying here is code to get lock without blocking, e.g. 'try' to get it. It enqueues lock with all wanted bits and get it only when all bits are not conflicting. The new code allows to get as much 'tried' bits as possible. It also doesn't require extra locking attempt for that. Patch intoduces new inodebits field try_bits which contains optinal bits to get if possible without blocking. Those bits are checked along with the required bits and only non-blocked are added to the new IBITS lock. |