From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/3] mountfs: Remove excessive sync-ing before umount Date: Tue, 15 Aug 2023 10:19:35 +0000 Message-ID: <20230815101936.261078-2-michael.tremer@ipfire.org> In-Reply-To: <20230815101936.261078-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1324239043495220338==" List-Id: --===============1324239043495220338== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The system should perform all write operations when sync is called and only return when the write queues are empty. There is no additional benefit for calling sync again as the buffers should be empty. If data is still being lost, then that is a bug in either the storage device or driver. As the (re-)boot process is already so slow, I would like to get rid of any unnecessary delays. Signed-off-by: Michael Tremer --- src/initscripts/system/mountfs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/initscripts/system/mountfs b/src/initscripts/system/mountfs index 2e2ff0b5b..8975eb02c 100644 --- a/src/initscripts/system/mountfs +++ b/src/initscripts/system/mountfs @@ -45,9 +45,7 @@ case "${1}" in stop) boot_mesg "Syncing discs..." - sync && sync - sleep 2 - sync && sync + sync evaluate_retval # ExtraHD -- 2.39.2 --===============1324239043495220338==--