[LU-4760] New files written to Lustre clients mounted with 'nolock' option are corrupted. Created: 12/Mar/14  Updated: 04/Oct/18  Resolved: 04/Oct/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0, Lustre 2.4.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Omkar Kulkarni (Inactive) Assignee: WC Triage
Resolution: Not a Bug Votes: 1
Labels: client, corruption, nolock
Environment:

Rosso, Shadow


Attachments: Text File console.txt    
Severity: 2
Epic: client
Rank (Obsolete): 13094

 Description   

If I mount Lustre clients with the nolock option, any new files that are created seem to be aligned along the 4K boundary, even if the total length may fall before the boundary. This causes the file to contain garbage data trailing EOF.

Please see the attached console output.

Additional information: Not sure if this is relevant, but Lustre clients were mounted directly on the OSS and MDS. I haven't tested with standalone clients.



 Comments   
Comment by Andreas Dilger [ 17/Mar/14 ]

Just to clarify - there are separate options "flock", "localflock", and "noflock" that enable/disable the flock behaviour for the mountpoint. This is different from the "nolock" feature being tested here, which disables DLM locking entirely and forces the application to handle the file consistency on its own. I believe that this would work if you are doing O_DIRECT page-aligned and page-sized IO.

According to Jinshan, this is just a problem in setting the file size correctly, so maybe it will be a small fix.

Note also that this feature has very rarely been tested, so it will take some work to get into shape.

Generated at Sat Feb 10 01:45:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.