Tag Archives: win32

nbdkit Windows port contd.

We ported nbdkit to Windows. That port is now upstream and should appear in the next stable release (1.24). There is also a new native file plugin for Windows which supports Windows files and volumes, hole punching for sparse files, querying file sparseness, and efficient zeroing.

2 Comments

Filed under Uncategorized

nbdkit now ported to Windows

This week I ported nbdkit, our high performance plugin-based Network Block Device server, to Windows. Currently it’s not upstream but you can download the Windows branch from here.

There were several possible ways we could have done this including Cygwin which might have been easier, but in the end I did a port to the raw Win32/Winsock APIs. You can compile it on Fedora using the mingw-w64-based Fedora Windows Cross Compiler and run it using Wine. Familiar commands like this work:

$ ./nbdkit.exe -f -v memory 1G

Windows is such a trash pile of awful APIs it’s a wonder how anyone can use it. Like what, and huh and WTF having to split a 64 bit int across two fields in a struct?? Not to mention the whole mess which is HANDLEs vs SOCKETs vs file descriptors and errno handling in Winsock. But I got there in the end.

I got many existing plugins and filters compiled. Not all of those listed will be working, but the main features are fine. You can also write your own plugins to the same API as Linux ones. I’m hoping that someone can write a Windows block device plugin (especially one which integrates with features like VSS).

$ find \( -name '*.exe' -o -name '*.dll' \) -a -printf "%f\n" | sort -u
nbdkit-blocksize-filter.dll
nbdkit-cacheextents-filter.dll
nbdkit-cow-filter.dll
nbdkit-data-plugin.dll
nbdkit-ddrescue-filter.dll
nbdkit-delay-filter.dll
nbdkit-error-filter.dll
nbdkit-example1-plugin.dll
nbdkit.exe
nbdkit-exitlast-filter.dll
nbdkit-extentlist-filter.dll
nbdkit-file-plugin.dll
nbdkit-fua-filter.dll
nbdkit-full-plugin.dll
nbdkit-gzip-filter.dll
nbdkit-gzip-plugin.dll
nbdkit-info-plugin.dll
nbdkit-ip-filter.dll
nbdkit-limit-filter.dll
nbdkit-memory-plugin.dll
nbdkit-nocache-filter.dll
nbdkit-noextents-filter.dll
nbdkit-nofilter-filter.dll
nbdkit-noparallel-filter.dll
nbdkit-nozero-filter.dll
nbdkit-null-plugin.dll
nbdkit-offset-filter.dll
nbdkit-partition-filter.dll
nbdkit-partitioning-plugin.dll
nbdkit-pattern-plugin.dll
nbdkit-random-plugin.dll
nbdkit-rate-filter.dll
nbdkit-readahead-filter.dll
nbdkit-retry-filter.dll
nbdkit-split-plugin.dll
nbdkit-stats-filter.dll
nbdkit-swab-filter.dll
nbdkit-tls-fallback-filter.dll
nbdkit-truncate-filter.dll
nbdkit-zero-plugin.dll

5 Comments

Filed under Uncategorized