Skip to content

Commit 553292a

Browse files
committed
cifs: clarify comment about timestamp granularity for old servers
It could be confusing why we set granularity to 1 seconds rather than 2 seconds (1 second is the max the VFS allows) for these mounts to very old servers ... Signed-off-by: Steve French <[email protected]>
1 parent d532cc7 commit 553292a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/cifs/cifsfs.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ cifs_read_super(struct super_block *sb)
169169
else
170170
sb->s_maxbytes = MAX_NON_LFS;
171171

172-
/* Some very old servers like DOS and OS/2 used 2 second granularity */
172+
/*
173+
* Some very old servers like DOS and OS/2 used 2 second granularity
174+
* (while all current servers use 100ns granularity - see MS-DTYP)
175+
* but 1 second is the maximum allowed granularity for the VFS
176+
* so for old servers set time granularity to 1 second while for
177+
* everything else (current servers) set it to 100ns.
178+
*/
173179
if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) &&
174180
((tcon->ses->capabilities &
175181
tcon->ses->server->vals->cap_nt_find) == 0) &&

0 commit comments

Comments
 (0)