[LU-10660] Truncate should revoke lease lock Created: 12/Feb/18 Updated: 18/Dec/18 Resolved: 16/Sep/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.11.0, Lustre 2.10.5 |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Improvement | Priority: | Critical |
| Reporter: | Jinshan Xiong (Inactive) | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Lustre lease lock is usually used to 'stabilize' file data so that it won't be accessed by any entities while certain operations are in progress. Open lock is used on the MDT side for this purpose. However, truncate will change file data but it didn't revoke lease lock. We should grab mot_open_sem and check mot_lease_count to see if there exists any pending lease on the file. If lease exists, it should be broken. |
| Comments |
| Comment by Peter Jones [ 24/Jul/18 ] |
|
Jian Could you please investigate this issue? Thanks Peter |
| Comment by Andreas Dilger [ 24/Jul/18 ] |
|
Jinshan, is this a case where FLR resync could cause a bad replica to be created, and essentially lead to data corruption? |
| Comment by Jinshan Xiong [ 25/Jul/18 ] |
|
Yes, and this would break any programs that uses lease lock for data exclusive access. |
| Comment by Gerrit Updater [ 30/Aug/18 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33093 |
| Comment by Gerrit Updater [ 16/Sep/18 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33093/ |
| Comment by Jian Yu [ 16/Sep/18 ] |
|
Patch landed to master branch for Lustre 2.12.0. |