mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 09:11:11 +08:00
vfs,local: Log an ERROR if we fail to set the file to be sparse
See: https://forum.rclone.org/t/rclone-1-53-release/18880/73
This commit is contained in:
parent
96299629b4
commit
6a56ac1032
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 set
|
||||
too 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 Performance
|
||||
|
||||
These flags may be used to enable/disable features of the VFS for
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user