syncthing/lib
Jakob Borg d6fbfc3545 lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965)
The folder already knew how to stop properly, but the fs.Walk() didn't
and can potentially take a very long time. This adds context support to
Walk and the underlying scanning stuff, and passes in an appropriate
context from above. The stop channel in model.folder is replaced with a
context for this purpose.

To test I added an infiniteFS that represents a large amount of data
(not actually infinite, but close) and verify that walking it is
properly stopped. For that to be implemented smoothly I moved out the
Walk function to it's own type, as typically the implementer of a new
filesystem type might not need or want to reimplement Walk.

It's somewhat tricky to test that this actually works properly on the
actual sendReceiveFolder and so on, as those are started from inside the
model and the filesystem isn't easily pluggable etc. Instead I've tested
that part manually by adding a huge folder and verifying that pause,
resume and reconfig do the right things by looking at debug output.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4117
2017-04-26 00:15:23 +00:00
..
auto all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
beacon all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
config lib/model: Create root directory for paused folders (fixes #4094) 2017-04-23 23:50:56 +00:00
connections lib/connections: Allow negative ACL entries on devices (fixes #4096) 2017-04-13 17:43:29 +00:00
db lib/db: Don't panic 2017-04-25 22:52:37 +00:00
dialer all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
discover all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
events cmd/syncthing: Allow custom event subscriptions (fixes #1879) 2017-04-13 17:14:34 +00:00
fs lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965) 2017-04-26 00:15:23 +00:00
ignore lib/model, gui: Allow creating and editing ignores of paused folders (fixes #3608) 2017-04-01 09:58:06 +00:00
logger cmd/syncthing: Extract interfaces for things the API depends on 2016-03-21 19:36:08 +00:00
model lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965) 2017-04-26 00:15:23 +00:00
nat all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
osutil all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol lib/protocol: Accept invalid files without blocks (fixes #4093) 2017-04-12 11:28:12 +02:00
rand all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
rc all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
relay all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
scanner lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965) 2017-04-26 00:15:23 +00:00
sha256 all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sync lib/sync: Make some tests not depend on real clock 2017-04-01 11:03:11 +00:00
tlsutil all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
upgrade all: Correct various typos 2017-02-25 08:12:13 +00:00
upnp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
util all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
versioner all: Correct various typos 2017-02-25 08:12:13 +00:00
weakhash all: Correct various typos 2017-02-25 08:12:13 +00:00