Project

General

Profile

Actions

Bug #6438

open

write_config_file() calls blocking sync()

Added by laforge 27 days ago. Updated 22 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/21/2024
Due date:
% Done:

0%

Spec Reference:

Description

src/vty/command.c:write_config_file() calls [potentially twice] sync() which globally syncs all files to non-volatile storage. This can take a long time, particularly on systems with a lot of I/O or slow I/O (rotating media like HDD).

As fixeria pointed out on IRC, all we really want is @fsync() semantics, i.e. ensure that this single file is committed to storage.

I'd actually go even further and do that fsync call from a separate, single-purpose thread. Once it completes, we can print a message to the telnet/vty session [if it still exists].

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)