"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
vfs,local: Log an ERROR if we fail to set the file to be sparse
Nick Craig-Wood6a56ac1032bf
diff --git a/backend/local/local.go b/backend/local/local.goindex 887c66725..d785fee85 100644--- a/backend/local/local.go+++ b/backend/local/local.go@@ -1213,7 +1213,7 @@ func (f *Fs) OpenWriterAt(ctx context.Context, remote string, size int64) (fs.Wr// Set the file to be a sparse file (important on Windows)err = file.SetSparse(out)if err != nil {- fs.Debugf(o, "Failed to set sparse: %v", err)+ fs.Errorf(o, "Failed to set sparse: %v", err)}}diff --git a/vfs/help.go b/vfs/help.goindex d191b9a17..7e34e6038 100644--- a/vfs/help.go+++ b/vfs/help.go@@ -166,6 +166,11 @@ whereas the --vfs-read-ahead is buffered on disk.When using this mode it is recommended that --buffer-size is not settoo big and --vfs-read-ahead is set large if required.+**IMPORTANT** not all file systems support sparse files. In particular+FAT/exFAT do not. Rclone will perform very badly if the cache+directory is on a filesystem which doesn't support sparse files and it+will log an ERROR message if one is detected.+### VFS PerformanceThese flags may be used to enable/disable features of the VFS fordiff --git a/vfs/vfscache/item.go b/vfs/vfscache/item.goindex 1606237ff..e828b9cb8 100644--- a/vfs/vfscache/item.go+++ b/vfs/vfscache/item.go@@ -249,7 +249,7 @@ func (item *Item) _truncate(size int64) (err error) {err = file.SetSparse(fd)if err != nil {- fs.Debugf(item.name, "vfs cache: truncate: failed to set as a sparse file: %v", err)+ fs.Errorf(item.name, "vfs cache: truncate: failed to set as a sparse file: %v", err)}}@@ -446,7 +446,7 @@ func (item *Item) _createFile(osPath string) (err error) {}err = file.SetSparse(fd)if err != nil {- fs.Debugf(item.name, "vfs cache: failed to set as a sparse file: %v", err)+ fs.Errorf(item.name, "vfs cache: failed to set as a sparse file: %v", err)}item.fd = fd