@@ -43,7 +43,7 @@ function setup_sshfs() {
4343 fi
4444 # Reset atime flags. "diratime" is quite a strange flag, so we need to make
4545 # sure it's cleared before we apply the requested flags.
46- mount --bind -o remount,diratime,strictatime " $DIR "
46+ mount --bind -o remount,diratime,atime, strictatime " $DIR "
4747 # We need to set the mount flags separately on the mount because some mount
4848 # flags (such as "ro") are set on the superblock if you do them in the
4949 # initial mount, which means that they cannot be cleared by bind-mounts.
@@ -393,7 +393,11 @@ function fail_sshfs_bind_flags() {
393393 pass_sshfs_bind_flags " nodiratime" " bind"
394394 run -0 grep -wq nodiratime <<< " $mnt_flags"
395395 # MS_DIRATIME implies MS_RELATIME by default.
396- run -0 grep -wq relatime <<< " $mnt_flags"
396+ # Let's check either relatime is set or no other option that removes
397+ # relatime semantics is set.
398+ # The latter case is needed in debian. For more info, see issue: #4093
399+ run -0 grep -wq relatime <<< " $mnt_flags" ||
400+ (run ! grep -wqE ' strictatime|norelatime|noatime' <<< " $mnt_flags" )
397401
398402 pass_sshfs_bind_flags " noatime,nodiratime" " bind"
399403 run -0 grep -wq noatime <<< " $mnt_flags"
0 commit comments