diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-02-16 16:35:49 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-02-16 16:35:49 +0900 |
commit | 0bc4568c4b69ef6535079bedda4a578f4e375aeb (patch) | |
tree | 3b6c2c08031225e8f6cc9032b4ee0ba78512538b /fileio.c | |
parent | 7acd85d65ef52b08be9cf5cdf057239aa7a21e85 (diff) | |
download | rsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.tar.gz rsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.tar.bz2 rsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.zip |
Imported Upstream version 3.2.0upstream/3.2.0
Diffstat (limited to 'fileio.c')
-rw-r--r-- | fileio.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -3,7 +3,7 @@ * * Copyright (C) 1998 Andrew Tridgell * Copyright (C) 2002 Martin Pool - * Copyright (C) 2004-2018 Wayne Davison + * Copyright (C) 2004-2020 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,12 +26,12 @@ #define ENODATA EAGAIN #endif -/* We want all reads to be aligned on 1K boundries. */ -#define ALIGN_BOUNDRY 1024 +/* We want all reads to be aligned on 1K boundaries. */ +#define ALIGN_BOUNDARY 1024 /* How far past the boundary is an offset? */ -#define ALIGNED_OVERSHOOT(oft) ((oft) & (ALIGN_BOUNDRY-1)) +#define ALIGNED_OVERSHOOT(oft) ((oft) & (ALIGN_BOUNDARY-1)) /* Round up a length to the next boundary */ -#define ALIGNED_LENGTH(len) ((((len) - 1) | (ALIGN_BOUNDRY-1)) + 1) +#define ALIGNED_LENGTH(len) ((((len) - 1) | (ALIGN_BOUNDARY-1)) + 1) extern int sparse_files; @@ -44,6 +44,8 @@ int sparse_end(int f, OFF_T size) { int ret; + sparse_past_write = 0; + if (!sparse_seek) return 0; @@ -322,7 +324,9 @@ int unmap_file(struct map_struct *map) map->p = NULL; } ret = map->status; - memset(map, 0, sizeof map[0]); +#if 0 /* I don't think we really need this. */ + force_memzero(map, sizeof map[0]); +#endif free(map); return ret; |