-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-onedrive.example.toml
81 lines (70 loc) · 3.3 KB
/
config-onedrive.example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This is an example configuration serving OneDrive storage as a block device.
# Note that login credentials are not passed here, see README.md for details.
#
# Commented options are not required and have default values as in the comment.
# Uncommented options are required and values are given as examples.
# Device parameters and geometry.
# Sizes below can be written as integers for byte unit, or a string with usual
# SI-units. They must be multiples of logical sectors (512B).
[device]
# Total device size, must be a multiple of `zone_size`.
dev_size = "4GiB"
# The size of a zone, the minimal reset (delete) unit. It cannot be changed
# without losing all the data. Some filesystems have requirement on it, eg.
# BTRFS requires it to be `4MiB..=4GiB`.
zone_size = "256MiB"
# The minimal size for a standalone chunk to minimize fragmentation, must be
# less than `max_chunk_size`. Chunks smaller than it will be fully rewritten on
# committing until they grow larger than this limit.
min_chunk_size = "1MiB"
# The maximum size a chunk can be, also the maximum buffer size for each zone,
# must be less than `zone_size`. When a trailing chunk in a zone is grown
# exceeding this size, following write requests will wait the chunk to be
# committed to backend before continue.
max_chunk_size = "128MiB"
# The maximum number of concurrenct download streams.
#max_concurrent_streams = 16
# The maximum number of concurrent upload streams. The maximum buffer memory
# consumption can be calculated by `max_concurrent_commits * max_chunk_size`.
# Further WRITE/APPEND/FINISH will block until some buffers being committed.
#max_concurrent_commits = 8
# ublk device and queue configurations.
[ublk]
# The device id, ie. the integer part in `/dev/ublk{b,c}X`, to use.
# A negative id indicates auto-allocation.
#id = -1
# Create an unprivileged block device, this requires a custom udev rules to
# change permission automatically. An unprivileged device also have a hard
# limit 10 seconds to complete any requests, or the service process will be
# killed by the ublk_drv driver. Using unprivileged block device also disables
# IO_FLUSHER state setting (see prctl(2)), which can potentially cause kernel
# deadlock under memory pressure.
#
# See:
# https://github.com/ublk-org/ublksrv?tab=readme-ov-file#use-unprivileged-ublk-in-docker
# https://man7.org/linux/man-pages/man2/prctl.2.html
#unprivileged = false
# The max concurrency of the request queue.
#queue_depth = 64
# Use 'onedrive' backend.
# Exact one backend must be chosen.
[backend.onedrive]
# The remote directory path for storing data. It must have no trailing slashes.
# It must not be root, to keep this application scoped.
remote_dir = "/orb"
# The directory to store states, including credentials. It is taken verbatimly
# if it is non-empty. Otherwise, following values are checked with environment
# substitution:
# 1. `$STATE_DIRECTORY`, if it is set.
# 2. `$XDG_STATE_HOME/orb`, if `$XDG_STATE_HOME` is set.
# 3. `$HOME/.local/state/orb`, if `$HOME` is set or can be inferred.
# 4. Fail.
#
# The directory will be created recursively if not exists, and it should be
# writable.
#state_dir = ""
# Connection timeout in seconds.
#connect_timeout_sec = 15
# The size of each part request for large uploads.
# It will be clamped to [4MB, 60MiB] and aligned to 320KiB.
#upload_part_max_size = "60MiB"