Return back checking file for sparseness. Use lseek(SEEK_HOLE) if supported by the system, otherwise fallback to block check. This allows to workaround bugs with SMB client and not introduce new bugs for filesystems with compression and deduplication.
This has theoretical bug if our collection spans different filesystems and some filesystems support holes, and some not. If this ever encountered we should use pathconf(2) and cache its result for directories.
This commit is contained in:
committed by
Justin Maggard
parent
debb502ff3
commit
3e8da9bb1a
@@ -68,6 +68,7 @@ AC_C_BIGENDIAN
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select sendfile setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
|
||||
AC_CHECK_DECLS([SEEK_HOLE])
|
||||
|
||||
#
|
||||
# Check for struct ip_mreqn
|
||||
|
||||
Reference in New Issue
Block a user