* Issue fsync recursively on the given directory and all its contents. * * This is a convenient wrapper on top of walkdir(). */
| 125 | * This is a convenient wrapper on top of walkdir(). |
| 126 | */ |
| 127 | void |
| 128 | fsync_dir_recurse(const char *dir) |
| 129 | { |
| 130 | /* |
| 131 | * If possible, hint to the kernel that we're soon going to fsync the data |
| 132 | * directory and its contents. |
| 133 | */ |
| 134 | #ifdef PG_FLUSH_DATA_WORKS |
| 135 | walkdir(dir, pre_sync_fname, false); |
| 136 | #endif |
| 137 | |
| 138 | walkdir(dir, fsync_fname, false); |
| 139 | } |
| 140 | |
| 141 | /* |
| 142 | * walkdir: recursively walk a directory, applying the action to each |
no test coverage detected