fuse: Split up the large lock

By counting the number of commands in flight in nbdfuse (instead of
using nbd_aio_in_flight) we are able to use a much smaller critical
section which improves performance by a small amount.

   READ: bw=309MiB/s (324MB/s), 77.2MiB/s-77.2MiB/s (80.9MB/s-80.9MB/s), io=4096MiB (4295MB), run=13265-13270msec

Updates: commit f1af0e9c
Updates: commit 594d54c8
Updates: commit 3f257eb6
55 jobs for master in 61 minutes and 51 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Containers
passed aarch64-debian-10-container #1270049049

00:01:39

passed aarch64-debian-sid-container #1270049060

00:02:03

passed armv6l-debian-10-container #1270049051

00:01:42

passed armv6l-debian-sid-container #1270049061

00:01:48

passed armv7l-debian-10-container #1270049052

00:01:38

passed armv7l-debian-sid-container #1270049062

00:01:52

passed i686-debian-10-container #1270049053

00:01:40

passed i686-debian-sid-container #1270049063

00:01:53

passed mingw32-fedora-rawhide-container #1270049073

00:01:53

passed mingw64-fedora-rawhide-container #1270049076

00:01:54

passed mips-debian-10-container #1270049054

00:01:40

passed mips64el-debian-10-container #1270049055

00:01:32

passed mips64el-debian-sid-container #1270049065

00:01:45

passed mipsel-debian-10-container #1270049056

00:01:38

passed mipsel-debian-sid-container #1270049068

00:01:45

passed ppc64le-debian-10-container #1270049057

00:01:39

passed ppc64le-debian-sid-container #1270049070

00:01:54

passed s390x-debian-10-container #1270049059

00:01:32

passed s390x-debian-sid-container #1270049072

00:01:45

passed x64-centos-8-container #1270049028

00:01:44

failed x64-centos-stream-8-container #1270049030

01:00:02

passed x64-debian-10-container #1270049032

00:01:37

passed x64-debian-sid-container #1270049034

00:01:48

passed x64-fedora-33-container #1270049035

00:01:56

passed x64-fedora-34-container #1270049037

00:01:51

passed x64-fedora-rawhide-container #1270049040

00:01:51

passed x64-opensuse-leap-152-container #1270049041

00:01:48

passed x64-opensuse-tumbleweed-container #1270049044

00:01:42

passed x64-ubuntu-1804-container #1270049046

00:01:33

passed x64-ubuntu-2004-container #1270049047

00:01:46

 
  Builds
passed aarch64-debian-sid #1270049125

00:02:19

passed armv6l-debian-10 #1270049127

00:01:43

passed armv7l-debian-10 #1270049128

00:01:44

passed i686-debian-sid #1270049130

00:02:11

passed mingw32-fedora-rawhide #1270049152

00:02:04

passed mingw64-fedora-rawhide #1270049155

00:02:06

passed mips-debian-10 #1270049132

00:01:49

passed mips64el-debian-sid #1270049135

00:01:55

passed mipsel-debian-10 #1270049139

00:01:53

passed ppc64le-debian-10 #1270049143

00:01:48

passed s390x-debian-sid #1270049147

00:02:04

failed x64-centos-8 #1270049091

00:03:36

failed x64-centos-8-clang #1270049095

00:03:51

skipped x64-centos-stream-8 #1270049098
failed x64-debian-10 #1270049080

00:02:09

failed x64-debian-10-clang #1270049083

00:02:10

passed x64-debian-sid #1270049087

00:04:58

failed x64-fedora-33 #1270049102

00:05:11

passed x64-fedora-34 #1270049106

00:04:51

failed x64-fedora-rawhide #1270049109

00:05:02

failed x64-fedora-rawhide-clang #1270049114

00:05:30

failed x64-opensuse-leap-152 #1270049117

01:00:02

failed x64-opensuse-tumbleweed #1270049120

00:06:14

failed x64-ubuntu-1804 #1270049122

01:00:02

passed x64-ubuntu-2004 #1270049123

00:04:58

 
Name Stage Failure
failed
x64-debian-10-clang Builds
+ echo /builds/nbdkit/libnbd/info/info-atomic-output.sh: run cleanup hooks: exit code 77
/builds/nbdkit/libnbd/info/info-atomic-output.sh: run cleanup hooks: exit code 77
+ (( _i = 0 ))
+ (( _i < 0 ))
+ exit 77
SKIP info-atomic-output.sh (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-fedora-rawhide Builds
SKIP: interop-nbdkit-tls-psk-allow-fallback
===========================================

requires test -f ../tests/keys.psk
Test skipped because prerequisite is missing or not working.
SKIP interop-nbdkit-tls-psk-allow-fallback (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-centos-stream-8-container Containers The script exceeded the maximum execution time set for the job
Using docker image sha256:b0757c55a1fdbb59c378fd34dde3e12bd25f68094dd69546cf5ca00ddbaa7a33 for docker:stable with digest docker@sha256:fd4d028713fd05a1fb896412805daed82c4a0cc84331d8dad00cb596d7ce3e3a ...
Preparing environment
Running on runner-0277ea0f-project-24336857-concurrent-0 via runner-0277ea0f-srm-1621323195-b1612e7b...
Getting source from Git repository
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 100...
Initialized empty Git repository in /builds/nbdkit/libnbd/.git/
Created fresh repository.
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
x64-ubuntu-1804 Builds The script exceeded the maximum execution time set for the job
mv -f .deps/structured_read-structured-read.Tpo .deps/structured_read-structured-read.Po
/bin/bash ../libtool --tag=CC --mode=link gcc -Wall -Wvla -Werror -g -O2 -o structured-read structured_read-structured-read.o ../lib/libnbd.la
libtool: link: gcc -Wall -Wvla -Werror -g -O2 -o .libs/structured-read structured_read-structured-read.o ../lib/.libs/libnbd.so -pthread
make[3]: Leaving directory '/builds/nbdkit/libnbd/interop'
/usr/bin/make check-TESTS
make[3]: Entering directory '/builds/nbdkit/libnbd/interop'
make[4]: Entering directory '/builds/nbdkit/libnbd/interop'
FAIL: interop-nbd-server
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
x64-centos-8 Builds
+ echo /builds/nbdkit/libnbd/info/info-map-qemu-allocation-depth.sh: run cleanup hooks: exit code 77
/builds/nbdkit/libnbd/info/info-map-qemu-allocation-depth.sh: run cleanup hooks: exit code 77
+ (( _i = 0 ))
+ (( _i < 0 ))
+ exit 77
SKIP info-map-qemu-allocation-depth.sh (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-debian-10 Builds
+ echo /builds/nbdkit/libnbd/info/info-atomic-output.sh: run cleanup hooks: exit code 77
/builds/nbdkit/libnbd/info/info-atomic-output.sh: run cleanup hooks: exit code 77
+ (( _i = 0 ))
+ (( _i < 0 ))
+ exit 77
SKIP info-atomic-output.sh (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-centos-8-clang Builds
+ echo /builds/nbdkit/libnbd/info/info-map-qemu-allocation-depth.sh: run cleanup hooks: exit code 77
/builds/nbdkit/libnbd/info/info-map-qemu-allocation-depth.sh: run cleanup hooks: exit code 77
+ (( _i = 0 ))
+ (( _i < 0 ))
+ exit 77
SKIP info-map-qemu-allocation-depth.sh (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-opensuse-tumbleweed Builds
++ (( _i < 1 ))
++ rm -f qemu-storage-daemon-disk.qcow2 /tmp/interop-qsd.XVRrcA
++ (( ++_i ))
++ (( _i < 1 ))
++ exit 1
FAIL interop-qemu-storage-daemon.sh (exit status: 1)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-opensuse-leap-152 Builds The script exceeded the maximum execution time set for the job
mv -f .deps/structured_read-structured-read.Tpo .deps/structured_read-structured-read.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Wvla -Werror -g -O2 -o structured-read structured_read-structured-read.o ../lib/libnbd.la
libtool: link: gcc -Wall -Wvla -Werror -g -O2 -o .libs/structured-read structured_read-structured-read.o ../lib/.libs/libnbd.so -lgnutls /usr/lib64/libxml2.so -ldl -lz -llzma -lm -pthread -Wl,-rpath -Wl,/usr/lib64
make[3]: Leaving directory '/builds/nbdkit/libnbd/interop'
/usr/bin/make check-TESTS
make[3]: Entering directory '/builds/nbdkit/libnbd/interop'
make[4]: Entering directory '/builds/nbdkit/libnbd/interop'
FAIL: interop-nbd-server
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
x64-fedora-rawhide-clang Builds
SKIP: interop-nbdkit-tls-psk-allow-fallback
===========================================

requires test -f ../tests/keys.psk
Test skipped because prerequisite is missing or not working.
SKIP interop-nbdkit-tls-psk-allow-fallback (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
x64-fedora-33 Builds
SKIP: interop-nbdkit-tls-psk-allow-fallback
===========================================

requires test -f ../tests/keys.psk
Test skipped because prerequisite is missing or not working.
SKIP interop-nbdkit-tls-psk-allow-fallback (exit status: 77)

Cleaning up file based variables
ERROR: Job failed: exit code 1