[LU-3868] lockless IO does not update inode timestamps Created: 30/Aug/13 Updated: 20/May/14 Resolved: 20/May/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.5.0 |
| Fix Version/s: | Lustre 2.6.0, Lustre 2.5.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | osc, patch | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 10036 | ||||||||
| Description |
|
In osc_io_read_start() and osc_io_write_start() if the lockless IO bit is set in the osc_io then the inode timestamps are not updated by the IO. Is there any reason for this? In osc_io_write_start() we have the following unnecessary attr get before we set the m- and c-times? result = cl_object_attr_get(env, obj, attr);
if (result == 0) {
attr->cat_mtime = attr->cat_ctime =
LTIME_S(CFS_CURRENT_TIME);
result = cl_object_attr_set(env, obj, attr,
CAT_MTIME | CAT_CTIME);
}
|
| Comments |
| Comment by John Hammond [ 30/Aug/13 ] |
|
Vladimir and Vitaly, I see that you wrote and inspected this code. Could you explain why we would not update timestamps for lockless IO? |
| Comment by Vitaly Fertman [ 03/Sep/13 ] |
|
timestamps cached on client, as well as other attributes, have no sense without locks, so no need to set it for lockless IO, client just passes attributes to server. |
| Comment by Andreas Dilger [ 04/Sep/13 ] |
|
There is no requirement that the server clocks are in sync with the client clocks, so all file timestamps should be generated by the client. In the case of lockless IO, there should be a timestamp update sent by the client with each RPC, regardless of whether it is cached under a DLM lock by the client or not. |
| Comment by Swapnil Pimpale (Inactive) [ 10/Jan/14 ] |
| Comment by Peter Jones [ 20/May/14 ] |
|
Landed for 2.5.2 and 2.6 |