Re: [PATCH v6 3/4] vfs: Add timestamp_truncate() api
From: Deepa Dinamani <hidden>
Date: 2018-01-23 16:25:37
Also in:
linux-fsdevel, lkml
From: Deepa Dinamani <hidden>
Date: 2018-01-23 16:25:37
Also in:
linux-fsdevel, lkml
On Mon, Jan 22, 2018 at 12:25 PM, Linus Torvalds [off-list ref] wrote:
On Sun, Jan 21, 2018 at 6:04 PM, Deepa Dinamani [off-list ref] wrote:quoted
+ t.tv_nsec -= t.tv_nsec % gran;This doesn't actuall ywork if tv_nsec is negative.
Right.
Which may not be an issue in most cases, but did somebody check utimensat() or whatever?
I checked POSIX again. There is no mention of tv_nsec being positive always for utimes. And, the long term plan is to replace all the callers of timespec_trunc() to use this new api instead for filesystems. So this will need to be fixed. I will fix this and post an update.
quoted
+ WARN(1, "illegal file time granularity: %u", gran);.. small nit: we generally should use 'invalid' rather than 'illegal'.
Will update this as well. Thanks, Deepa