diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-02-26 10:27:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-08-02 17:24:09 +0200 |
commit | 864e406256cd0eb2aed48cfe750efdec9c3d1e3a (patch) | |
tree | fdc0d464070a27f3d0570f930c8da5e1bd4b7fce /src/shared/copy.h | |
parent | 06a40b52d966143aa2d8e61e7fb6336f3f20e515 (diff) | |
download | systemd-864e406256cd0eb2aed48cfe750efdec9c3d1e3a.tar.gz |
copy: add COPY_SYNCFS flag
When copying large directory trees it should be a better idea to sync
the whole fs once when we are done instead of individually for each
file, hence add COPY_SYNCFS.
As opposed to COPY_FSYNC/COPY_FSYNC_FULL this only really applies to the
top-level directory, after completion of the whole copy.
Diffstat (limited to 'src/shared/copy.h')
-rw-r--r-- | src/shared/copy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/copy.h b/src/shared/copy.h index 81990d3743..0c81760d8f 100644 --- a/src/shared/copy.h +++ b/src/shared/copy.h @@ -21,6 +21,7 @@ typedef enum CopyFlags { COPY_HARDLINKS = 1 << 8, /* Try to reproduce hard links */ COPY_FSYNC = 1 << 9, /* fsync() after we are done */ COPY_FSYNC_FULL = 1 << 10, /* fsync_full() after we are done */ + COPY_SYNCFS = 1 << 11, /* syncfs() the *top-level* dir after we are done */ } CopyFlags; typedef int (*copy_progress_bytes_t)(uint64_t n_bytes, void *userdata); |