0013-wal_decoding-copydir-make-fsync_fname-public.patch
text/x-patch
Filename: 0013-wal_decoding-copydir-make-fsync_fname-public.patch
Type: text/x-patch
Part: 12
Message:
logical changeset generation v4
Patch
Format: unified
Series: patch 0013
| File | + | − |
|---|---|---|
| src/backend/storage/file/copydir.c | 1 | 4 |
| src/include/storage/copydir.h | 1 | 0 |
>From f026cb457c41b197dee9dca294d955851a64baf6 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Wed, 9 Jan 2013 17:36:20 +0100
Subject: [PATCH 13/19] wal_decoding: copydir: make fsync_fname public
This probably should be somewhere else, its a generally useful function, not
really related to copying directories. fd.[ch]?
---
src/backend/storage/file/copydir.c | 5 +----
src/include/storage/copydir.h | 1 +
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c
index 7f94f50..a86a35d 100644
--- a/src/backend/storage/file/copydir.c
+++ b/src/backend/storage/file/copydir.c
@@ -28,9 +28,6 @@
#include "miscadmin.h"
-static void fsync_fname(char *fname, bool isdir);
-
-
/*
* copydir: copy a directory
*
@@ -216,7 +213,7 @@ copy_file(char *fromfile, char *tofile)
* Try to fsync directories but ignore errors that indicate the OS
* just doesn't allow/require fsyncing directories.
*/
-static void
+void
fsync_fname(char *fname, bool isdir)
{
int fd;
diff --git a/src/include/storage/copydir.h b/src/include/storage/copydir.h
index a087cce..3bccf3b 100644
--- a/src/include/storage/copydir.h
+++ b/src/include/storage/copydir.h
@@ -15,5 +15,6 @@
extern void copydir(char *fromdir, char *todir, bool recurse);
extern void copy_file(char *fromfile, char *tofile);
+extern void fsync_fname(char *fname, bool isdir);
#endif /* COPYDIR_H */
--
1.7.12.289.g0ce9864.dirty