mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
all: Remove "large blocks" config (#5763)
We now always use large / variable blocks.
This commit is contained in:
parent
ca2fa8de4e
commit
997bb5e7e1
@ -78,7 +78,6 @@ angular.module('syncthing.core')
|
||||
externalCommand: "",
|
||||
autoNormalize: true,
|
||||
path: "",
|
||||
useLargeBlocks: true,
|
||||
};
|
||||
|
||||
$scope.localStateTotal = {
|
||||
|
@ -155,8 +155,6 @@
|
||||
<div class="col-md-6">
|
||||
<input type="checkbox" ng-model="currentFolder.fsWatcherEnabled" ng-change="fsWatcherToggled()" tooltip data-original-title="{{'Use notifications from the filesystem to detect changed items.' | translate }}"> <span translate>Watch for Changes</span>
|
||||
<p translate class="help-block">Watching for changes discovers most changes without periodic scanning.</p>
|
||||
<input type="checkbox" ng-model="currentFolder.useLargeBlocks"> <span translate>Variable Size Blocks</span>
|
||||
<p translate class="help-block">Variable size blocks (also "large blocks") are more efficient for large files.</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="rescanIntervalS" translate>Full Rescan Interval (s)</label>
|
||||
|
@ -52,7 +52,6 @@ type FolderConfiguration struct {
|
||||
Paused bool `xml:"paused" json:"paused"`
|
||||
WeakHashThresholdPct int `xml:"weakHashThresholdPct" json:"weakHashThresholdPct"` // Use weak hash if more than X percent of the file has changed. Set to -1 to always use weak hash.
|
||||
MarkerName string `xml:"markerName" json:"markerName"`
|
||||
UseLargeBlocks bool `xml:"useLargeBlocks" json:"useLargeBlocks" default:"true"`
|
||||
CopyOwnershipFromParent bool `xml:"copyOwnershipFromParent" json:"copyOwnershipFromParent"`
|
||||
|
||||
cachedFilesystem fs.Filesystem
|
||||
|
@ -349,7 +349,6 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
||||
Hashers: f.model.numHashers(f.ID),
|
||||
ShortID: f.shortID,
|
||||
ProgressTickIntervalS: f.ScanProgressIntervalS,
|
||||
UseLargeBlocks: f.UseLargeBlocks,
|
||||
LocalFlags: f.localFlags,
|
||||
})
|
||||
|
||||
|
@ -52,8 +52,6 @@ type Config struct {
|
||||
// Optional progress tick interval which defines how often FolderScanProgress
|
||||
// events are emitted. Negative number means disabled.
|
||||
ProgressTickIntervalS int
|
||||
// Whether to use large blocks for large files or the old standard of 128KiB for everything.
|
||||
UseLargeBlocks bool
|
||||
// Local flags to set on scanned files
|
||||
LocalFlags uint32
|
||||
}
|
||||
@ -326,10 +324,7 @@ func (w *walker) handleItem(ctx context.Context, path string, toHashChan chan<-
|
||||
func (w *walker) walkRegular(ctx context.Context, relPath string, info fs.FileInfo, toHashChan chan<- protocol.FileInfo) error {
|
||||
curFile, hasCurFile := w.CurrentFiler.CurrentFile(relPath)
|
||||
|
||||
blockSize := protocol.MinBlockSize
|
||||
|
||||
if w.UseLargeBlocks {
|
||||
blockSize = protocol.BlockSize(info.Size())
|
||||
blockSize := protocol.BlockSize(info.Size())
|
||||
|
||||
if hasCurFile {
|
||||
// Check if we should retain current block size.
|
||||
@ -344,7 +339,6 @@ func (w *walker) walkRegular(ctx context.Context, relPath string, info fs.FileIn
|
||||
blockSize = curBlockSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f, _ := CreateFileInfo(info, relPath, nil)
|
||||
f = w.updateFileInfo(f, curFile)
|
||||
|
@ -471,7 +471,6 @@ func walkDir(fs fs.Filesystem, dir string, cfiler CurrentFiler, matcher *ignore.
|
||||
Subs: []string{dir},
|
||||
AutoNormalize: true,
|
||||
Hashers: 2,
|
||||
UseLargeBlocks: true,
|
||||
CurrentFiler: cfiler,
|
||||
Matcher: matcher,
|
||||
LocalFlags: localFlags,
|
||||
|
Loading…
Reference in New Issue
Block a user