Details
-
Technical task
-
Resolution: Fixed
-
Critical
-
Lustre 2.5.0
-
None
-
9904
Description
I find two issues with osc_io_read_start(). It updates the i_atime without checking O_NOATIME in f_flags. It calls cl_object_attr_get() for no reason that I can discern.
static int osc_io_read_start(const struct lu_env *env, const struct cl_io_slice *slice) { struct osc_io *oio = cl2osc_io(env, slice); struct cl_object *obj = slice->cis_obj; struct cl_attr *attr = &osc_env_info(env)->oti_attr; int result = 0; ENTRY; if (oio->oi_lockless == 0) { cl_object_attr_lock(obj); result = cl_object_attr_get(env, obj, attr); if (result == 0) { attr->cat_atime = LTIME_S(CFS_CURRENT_TIME); result = cl_object_attr_set(env, obj, attr, CAT_ATIME); } cl_object_attr_unlock(obj); } RETURN(result); }
The upper layer will also update i_atime if this is appropriate, so I propose adding a noatime bit to struct cl_io and only updating the LVB atime for the current OSC object if that bit is set.
osc_io_write_start() similarly calls cl_object_attr_get() before doing
attr->cat_mtime = attr->cat_ctime = LTIME_S(CFS_CURRENT_TIME); result = cl_object_attr_set(env, obj, attr, CAT_MTIME | CAT_CTIME);
I cannot find any reason for first calling cl_object_attr_get() here. Am I missing something?
Attachments
Issue Links
- is related to
-
LU-3868 lockless IO does not update inode timestamps
-
- Resolved
-
Activity
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Parent |
New:
|
|
Severity | Original: 3 [ 10022 ] | |
Issue Type | Original: Bug [ 1 ] | New: Technical task [ 7 ] |
Parent |
Original:
|
|
Severity | New: 3 [ 10022 ] | |
Issue Type | Original: Technical task [ 7 ] | New: Bug [ 1 ] |
Fix Version/s | New: Lustre 2.5.0 [ 10295 ] | |
Priority | Original: Blocker [ 1 ] | New: Critical [ 2 ] |
Priority | Original: Minor [ 4 ] | New: Blocker [ 1 ] |
Parent |
New:
|
|
Severity | Original: 3 [ 10022 ] | |
Issue Type | Original: Bug [ 1 ] | New: Technical task [ 7 ] |
Assignee | Original: WC Triage [ wc-triage ] | New: John Hammond [ jhammond ] |