zipl/src: Prepare for global sync(2) removal

zipl tool calls sync(2) before exit, which may hang on attempts to
flush not relevant problematic mounts (e.g. nfs) [1].

Complete any modification performed by zipl(8) tool with calling
fsync(2), or syncfs(2). This allows to get rid of the mentioned
sync(2) call.

[1] https://github.com/openshift/os/issues/1720
Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/186
Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Eduard Shishkin
2025-05-16 14:24:24 +02:00
committed by Jan Höppner
parent 06e0d569f1
commit 95e4b3413a
4 changed files with 41 additions and 5 deletions
+1
View File
@@ -34,6 +34,7 @@ int misc_asprintf(char **out, const char *fmt, ...);
void* misc_calloc(size_t n, size_t size);
char* misc_strdup(const char* s);
int misc_open_device(const char *filename, struct misc_fd *mfd, int simulate);
int misc_fsync(struct misc_fd *mfd, const char *filename);
int misc_read(int fd, void* buffer, size_t count);
int misc_read_file(const char* filename, char** buffer, size_t* size,
int nil_terminate);