Add outline first slide of talk.
[libguestfs-talks.git] / 2019-kvm-forum / papers / NBD-changes.tex
1 \documentclass[12pt,a4paper]{article}
2 \usepackage[utf8x]{inputenc}
3 \usepackage{parskip}
4 \usepackage{hyperref}
5 \usepackage{xcolor}
6 \hypersetup{
7     colorlinks,
8     linkcolor={red!50!black},
9     citecolor={blue!50!black},
10     urlcolor={blue!80!black}
11 }
12 %\usepackage{abstract}
13 %\usepackage{graphicx}
14 %\DeclareGraphicsExtensions{.pdf,.png,.jpg}
15 \usepackage{float}
16 \floatstyle{boxed}
17 \restylefloat{figure}
18 \usepackage{fancyhdr}
19   \pagestyle{fancy}
20   %\fancyhead{}
21   %\fancyfoot{}
22
23 \title{Summary of changes in NBD-related projects since mid 2016}
24
25 \begin{document}
26 \maketitle
27
28 \section{NBD protocol}
29 \url{https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md}
30
31 \begin{description}
32 \item[2016]
33
34 \verb|WRITE_ZEROES|
35
36 \verb|NBD_OPT_INFO| and \verb|NBD_OPT_GO| (finalized)
37
38 TLS support (finalized)
39
40 \verb|NBD_OPT_BLOCK_SIZE|
41
42 \verb|NBD_FLAG_CAN_MULTI_CONN|
43
44 \item[2017]
45
46 \verb|STRUCTURED_REPLY| merged
47
48 \item[2018]
49
50 \verb|NBD_CMD_BLOCK_STATUS|, metadata contexts, \verb|base:|
51 namespace, etc. merged
52
53 Preferred block size specified as 512 bytes.  Document maximum
54 request size limits.
55
56 \verb|NBD_CMD_CACHE|
57
58 \item[2019]
59
60 \verb|NBD_CMD_FLAG_FAST_ZERO|
61
62 Recommend use of \verb|TCP_NODELAY|
63
64 \end{description}
65
66 \subsection{URIs}
67
68 \begin{description}
69 \item[2019]
70 NBD URI specification was introduced.
71 \url{https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md}
72 \end{description}
73
74 \f
75 \section{qemu client, qemu-nbd}
76
77 \begin{description}
78
79 \item[2.8, Dec 2016]
80
81 QMP \verb|nbd-server-add|
82
83 \verb|NBD_CMD_WRITE_ZEROES|
84
85 \item[2.9, Apr 2017]
86
87 Systemd socket activation
88
89 \item[3.0, Aug 2018]
90
91 \item[3.1, Dec 2018]
92
93 \item[4.0, Apr 2019]
94
95 Interop improvements with nbdkit
96
97 Various fixes related to request alignment
98
99 \verb|qemu-nbd --bitmap|
100
101 \verb|qemu-nbd --list|
102
103 \verb|qemu-nbd --partition| deprecated
104
105 \verb|qemu-nbd --tls-authz|
106
107 \item[4.1, Aug 2019]
108
109 \verb|qemu-nbd --pid-file|
110
111 \item[4.2, later in 2019]
112
113 \verb|NBD_CMD_CACHE|
114
115 \verb|NBD_FLAG_CAN_MULTI_CONN| set automatically in some
116 circumstances
117
118 \verb|NBD_CMD_FLAG_FAST_ZERO|
119
120 \end{description}
121
122 \f
123 \section{nbdkit}
124
125 \begin{description}
126
127 \item[1.4, July 2018]
128
129 \url{https://www.redhat.com/archives/libguestfs/2018-July/msg00023.html}
130
131 New plugins: Tcl, ext2, random, zero
132
133 New filters: blocksize, fua, log, nozero
134
135 TLS-PSK
136
137 TRIM support
138
139 \item[1.6, Aug 2018]
140
141 \url{https://www.redhat.com/archives/libguestfs/2018-August/msg00279.html}
142
143 New plugins: Lua, pattern, data
144
145 New filters: truncate, error
146
147 \verb|NBD_OPT_GO| supported
148
149 FreeBSD port
150
151 \verb|-D| options for debugging
152
153 \item[1.8, Nov 2018]
154
155 \url{https://www.redhat.com/archives/libguestfs/2018-November/msg00111.html}
156
157 New plugins: sh, iso, floppy, partitioning
158
159 Haiku port
160
161 \item[1.10, Jan 2019]
162
163 \url{https://www.redhat.com/archives/libguestfs/2019-January/msg00135.html}
164
165 New plugins: full
166
167 New filters: cache, delay, xz
168
169 Multi-conn support
170
171 \verb|NBD_OPT_INFO|
172
173 Fuzz testing
174
175 \item[1.12, Apr 2019]
176
177 \url{https://www.redhat.com/archives/virt-tools-list/2019-April/msg00045.html}
178
179 New plugins: ssh, linuxdisk, rust
180
181 New filters: rate, readahead, noextents
182
183 \verb|NBD_CMD_BLOCK_STATUS|
184
185 \item[1.14, Aug 2019]
186
187 \url{https://www.redhat.com/archives/libguestfs/2019-August/msg00375.html}
188
189 New filters: stats, nocache, noparallel, cacheextents
190
191 Many performance improvements
192
193 \verb|NBD_CMD_CACHE|
194
195 \end{description}
196
197 \f
198 \section{libnbd}
199
200 Project started last day of April 2019.
201
202 \begin{description}
203
204 \item[May 2019]
205
206 Most \verb|NBD_CMD_| implemented, and working connection to nbdkit,
207 within first 10 days.  Interoperating with qemu-nbd within 2 weeks.
208 TLS implemented and interoperating with qemu-nbd within 16 days.
209
210 Generated C API, Python 3 bindings and \verb|nbdsh|, OCaml bindings,
211 hierarchical state machine.
212
213 Export names
214
215 Subprocess server (\verb|nbd_connect_command|)
216
217 Structured replies
218
219 \verb|NBD_CMD_BLOCK_STATUS| and \verb|base:allocation|
220
221 Multiple commands ready to issue and in flight
222
223 Callbacks
224
225 ``Internal'' multi-conn support added then removed
226
227 Valgrinding
228
229 Some API calls can be handled without taking the lock
230
231 libnbd $0.1.2$ was released on May $30^{th}$ 2019.
232
233 \item[June 2019]
234
235 NBD URIs supported
236
237 \verb|nbdsh -c| parameter
238
239 \verb|MSG_MORE| optimization
240
241 Better handling of multiple in-flight commands, a lot of
242 optimization, and finessing of the API.
243
244 Python bindings custom exception \verb|nbd.Error|
245
246 \item[July 2019]
247
248 Port to FreeBSD
249
250 Further work on callbacks
251
252 Optimize command queue to be $O(1)$ instead of $O(n)$
253
254 Symbol versions
255
256 libnbd $0.9.6$ was released on Jul $30^{th}$ 2019.
257
258 \item[August 2019]
259
260 More tests
261
262 Debug output includes function names, parameters, return values
263
264 Optional function parameters
265
266 Man pages for every API
267
268 Port to RHEL 7
269
270 First stable version $1.0$ was released on August $27^{th}$ 2019.
271
272 \item[September 2019]
273
274 Support for \verb|FAST_ZERO|
275
276 New APIs for testing servers without Structured Replies and explicitly
277 setting handshake flags.  New APIs for finding out if TLS was
278 negotiated, and what NBD protocol is being used.
279
280 Reproducible build
281
282 Two CVEs found
283
284 Share \verb|nbd-protocol.h| file with nbdkit
285
286 \item[October 2019]
287
288 Systemd socket activation
289
290 Fuzz testing (discovers one serious CVE)
291
292 New API to connect directly to socket
293
294 New \verb|nbdfuse| tool
295
296 \end{description}
297
298 \end{document}