linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 0/4] fat: timestamp updates
@ 2018-09-26 22:43 Frank Sorenson
  2018-09-26 22:43 ` [PATCH V4 1/4] fat: create a function to calculate the timezone offest Frank Sorenson
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Frank Sorenson @ 2018-09-26 22:43 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: hirofumi

fat/msdos timestamps are stored on-disk with several different
granularities, some of them lower resolution than timespec64_trunc()
can provide.  In addition, they are only truncated as they are
written to disk, so the timestamps in-memory for new or modified
files/directories may be different from the same timestamps after
a remount, as the now-truncated times are re-read from the on-disk
format.

These patches allow finer granularity for the timestamps where
possible and add fat-specific ->update_time inode operation and
fat_truncate_time functions to truncate each timestamp correctly,
giving consistent times across remounts.


V4 changes
  corrected to use fat_truncate_time() and keep mark_inode_dirty()
  set s_time_gran to 1ns unconditionally
  add i_version support to update_time()
  fix atime bug with localtime


Frank Sorenson (4):
  fat: create a function to calculate the timezone offest
  fat: add functions to update and truncate timestamps appropriately
  fat: change timestamp updates to use fat_truncate_time
  fat: truncate inode timestamp updates in setattr

 fs/fat/dir.c         |  2 +-
 fs/fat/fat.h         |  2 ++
 fs/fat/file.c        | 17 ++++++++--
 fs/fat/inode.c       |  9 ++++--
 fs/fat/misc.c        | 91 ++++++++++++++++++++++++++++++++++++++++++++++++----
 fs/fat/namei_msdos.c | 17 +++++-----
 fs/fat/namei_vfat.c  | 15 +++++----
 7 files changed, 126 insertions(+), 27 deletions(-)

-- 
2.14.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-28 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 22:43 [PATCH V4 0/4] fat: timestamp updates Frank Sorenson
2018-09-26 22:43 ` [PATCH V4 1/4] fat: create a function to calculate the timezone offest Frank Sorenson
2018-09-26 22:43 ` [PATCH V2 2/4] fat: add functions to update and truncate timestamps appropriately Frank Sorenson
2018-09-28 10:31   ` OGAWA Hirofumi
2018-09-26 22:43 ` [PATCH V4 3/4] fat: change timestamp updates to use fat_truncate_time Frank Sorenson
2018-09-26 22:43 ` [PATCH V4 4/4] fat: truncate inode timestamp updates in setattr Frank Sorenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).