[LU-353] write should return written bytes when it's interrupted Created: 23/May/11  Updated: 19/Dec/11

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.0.0, Lustre 2.1.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Niu Yawei (Inactive) Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 10433

 Description   

When I was investigating on LU-305, I found that ll_file_write() (master code) always return error to user application where error happened, even if there is data be written, which is not POSIX complied. We should return written bytes if there is any written data.



 Comments   
Comment by Andreas Dilger [ 23/May/11 ]

One difficlty withreturning the bytes written is that they may be sent asynchronously to different stripes, leaving a hole before some of the written bytes. It is easier to return an error to the application and have the VFS truncate the file on write error instead of trying to figure out the largest contiguous range of bytes written.

Comment by Niu Yawei (Inactive) [ 23/May/11 ]

Hi, Andreas

As far as I can see, current ll_file_write() write to cache (or synchronously) stripe by stripe sequentially, so there shouldn't be hole problem. Xiong, could you confirm this?

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