• M
    virtio-9p: Do not reset atime · 74bc02b2
    M. Mohan Kumar 提交于
        Current code resets file's atime to 0 when there is a change in mtime.
        This results in resetting the atime to "1970-01-01 05:30:00". For
        example, truncate -s 0 filename results in changing the mtime to the
        truncate time, but resets the atime to "1970-01-01 05:30:00". utime
        system call does not have any provision to set only mtime or atime. So
        change v9fs_wstat_post_chmod function to use utimensat function to change
        the atime and mtime fields. If tv_nsec field is set to the special value
        "UTIME_OMIT", corresponding file time stamp is not updated.
    Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
    Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
    74bc02b2
virtio-9p-local.c 12.4 KB