* If 'trunc' is true, any existing file with the same name is truncated.
*/
static void
-copy_file_range(const char *path, off_t begin, off_t end, bool trunc)
+rewind_copy_file_range(const char *path, off_t begin, off_t end, bool trunc)
{
char buf[BLCKSZ];
char srcpath[MAXPGPATH];
break;
case FILE_ACTION_COPY:
- copy_file_range(entry->path, 0, entry->newsize, true);
+ rewind_copy_file_range(entry->path, 0, entry->newsize, true);
break;
case FILE_ACTION_TRUNCATE:
break;
case FILE_ACTION_COPY_TAIL:
- copy_file_range(entry->path, entry->oldsize, entry->newsize, false);
+ rewind_copy_file_range(entry->path, entry->oldsize,
+ entry->newsize, false);
break;
case FILE_ACTION_CREATE:
while (datapagemap_next(iter, &blkno))
{
offset = blkno * BLCKSZ;
- copy_file_range(path, offset, offset + BLCKSZ, false);
+ rewind_copy_file_range(path, offset, offset + BLCKSZ, false);
/* Ok, this block has now been copied from new data dir to old */
}
pg_free(iter);