From nobody Mon Dec 4 06:51:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SkDq73tGVz530bZ; Mon, 4 Dec 2023 06:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkDq73SXnz3MqQ; Mon, 4 Dec 2023 06:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701672707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F73m7R1zlSMoa91IamvaK3ni/EerSy0czi9x7nknFzA=; b=uXyM7h5PiTEWl6vWHDVDPxeS3UF37xfFo82XO+D+ukHUIFoBS3WVpWRJdhJlPmyvTVrIK8 Ou1t1iFAPEH78BmX0Cls4V2QQ6ZI7h2aLZHwCagJ0geSaKXkDzBuLlEwvwD5i1PVpv4UhI k6CGRXsEUKSCHGVgXoJ70yrN7+vbyYSwaUOcKiO9VlOYhCvIonE7bjf+yLJR+5Dt/rZDay 7ZYfHGuddl2ATkEHm1qPkCcCWmPsz5gmql6KlBZELLlhUTsl6bDuRHiJCphZ7z+HCTudLA fZvoMp2rA2cvgJ50tmdOgiAZWPO2Z9eyBbg62ZXTLnDy7FiKhovbF9cQ6Mg/tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701672707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F73m7R1zlSMoa91IamvaK3ni/EerSy0czi9x7nknFzA=; b=ApSCPXqbQ8Be8zpnMu4nuw+EOobY9M7Cvqnd8Hm9JzTs43lQn4mCU1E+G6II4hX/MWTiY3 o4NodaPuOeimO8sbDyNpTM1MrweBuc08xOzv/MsTNWK7kBAUOEWpFWOr2dkh40OmPmChyq wluorRgqqlgugCdeAm2OHUC5r5rbqke5iWv+l+aKJiXEqLd0vRQt6gnvlDHOUhIcEFQuSv qsMlVADZc9b2H45BpsI7U5mx/xGHhx8vBG8JVIziGzbM49V/0wJIylkWLGYps9rP4xBZTz UZi3ISwhMOS1JgnymrufRDVN90H5rVJwCIYEhe93INqdGpctvJGB93MMlbpcfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701672707; a=rsa-sha256; cv=none; b=D+/OnXhUAzSuH4HHso/kWgvZ/1XeqpgnZRZ89ys1lhP96VDiOATrAyC8uSNGNUBIZb3cbA Fku8yNWOXSozG08njZdjKjlv+UFQF0HbxrOCN+ghxaoH2hu6mKVh3rqVboPoJOCWcFY2bW WEvXL4ugNbOW7RpkSJQjjSC1zAoeDVv7oUVKyBDcaHV/oUu3tvlk8iUr4FpnDcm+cQXht4 aIRyZpZaSo+jr2DmG87iEqupxdqemucHl6PfdGgRF+6Cg2zSJRyVdkhWt28jK5K0HJP5/f 8d2In6q79pFq5nk7ZAgVWhzlBF8Sf2YS51B/0JLT1TK8u9/ByMyAPIIPSykOPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SkDq72YtFz1dh; Mon, 4 Dec 2023 06:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B46plMj039601; Mon, 4 Dec 2023 06:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B46plqI039598; Mon, 4 Dec 2023 06:51:47 GMT (envelope-from git) Date: Mon, 4 Dec 2023 06:51:47 GMT Message-Id: <202312040651.3B46plqI039598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 094abb6fb41c - main - autofs: media: Always use sync option for fat* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 094abb6fb41c07c0266a5cae84a7439289a978e9 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=094abb6fb41c07c0266a5cae84a7439289a978e9 commit 094abb6fb41c07c0266a5cae84a7439289a978e9 Author: Emmanuel Vadot AuthorDate: 2023-12-01 09:27:59 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-04 06:51:33 +0000 autofs: media: Always use sync option for fat* Users of autofs for removable media expect to be able to copy files and directly remove the media without having the need to call sync(8) or umount(8). Only do that for fat/ntfs filesystems. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D42494 Reviewed by: rew (older version) --- usr.sbin/autofs/autofs/special_media | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/autofs/autofs/special_media b/usr.sbin/autofs/autofs/special_media index 33fa4544d028..b397a8889623 100755 --- a/usr.sbin/autofs/autofs/special_media +++ b/usr.sbin/autofs/autofs/special_media @@ -40,7 +40,7 @@ print_map_entry() { case "${_fstype}" in "exfat") if [ -f "/usr/local/sbin/mount.exfat" ]; then - echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype} :/dev/${_p}" + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},sync :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" @@ -49,14 +49,17 @@ print_map_entry() { ;; "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype} :/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},sync :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi ;; - "ext2fs" | "msdosfs") + "msdosfs") + echo "-fstype=${_fstype},sync :/dev/${_p}" + ;; + "ext2fs") echo "-fstype=${_fstype},async :/dev/${_p}" ;; *)