Displaying 5 results from an estimated 5 matches for "seek_byt".
Did you mean:
seek_bytes
2020 Aug 17
3
[nbdkit PATCH] sh: Prefer dd bs=1 over iflag=count_bytes
...):
nbdkit eval \
config='ln -sf "$(realpath "$3")" $tmpdir/file' \
get_size='stat -Lc %s $tmpdir/file' \
- pread='dd if=$tmpdir/file skip=$4 count=$3 iflag=count_bytes,skip_bytes' \
- pwrite='dd of=$tmpdir/file seek=$4 conv=notrunc oflag=seek_bytes' \
+ pread='dd bs=1 if=$tmpdir/file skip=$4 count=$3' \
+ pwrite='dd bs=1 of=$tmpdir/file seek=$4 conv=notrunc' \
file=disk.img
=head1 PARAMETERS
diff --git a/plugins/sh/nbdkit-sh-plugin.pod b/plugins/sh/nbdkit-sh-plugin.pod
index 07d90b57..70741139 100644
--- a/plug...
2019 Aug 02
5
[nbdkit PATCH 0/3] sh plugin fixes
I'm pushing the first one as blatantly obvious.
The second one is also simple enough, but not enough of a bug for me
to push tonight.
The third is something I noticed while working on sh, but is really
more about docs vs. plugins in general. There, we could either change
the code to match the docs (breaking backwards behavior for a plugin
that set .errno_is_preserved=2) [what my patch did],
2019 Aug 02
0
[nbdkit PATCH v2 15/17] sh: Enable parallel thread model, when possible
...n/env bash
+f=test-parallel-sh.data
+if ! test -f \$f; then
+ echo "can't locate test-parallel-sh.data" >&2; exit 5
+fi
+case \$1 in
+ get_size) stat -L -c %s \$f || exit 1 ;;
+ pread) dd iflag=skip_bytes,count_bytes skip=\$4 count=\$3 if=\$f || exit 1 ;;
+ pwrite) dd oflag=seek_bytes conv=notrunc seek=\$4 of=\$f || exit 1 ;;
+ can_write) ;;
+ *) exit 2 ;;
+esac
+exit 0
+EOF
+chmod +x test-parallel-sh.script
+
+# With --threads=1, the write should complete first because it was issued first
+nbdkit -v -t 1 -U - --filter=delay sh test-parallel-sh.script \
+ wdelay=2 rdelay=1...
2019 Aug 02
2
Re: [nbdkit PATCH v2 15/17] sh: Enable parallel thread model, when possible
...> +if ! test -f \$f; then
> + echo "can't locate test-parallel-sh.data" >&2; exit 5
> +fi
> +case \$1 in
> + get_size) stat -L -c %s \$f || exit 1 ;;
> + pread) dd iflag=skip_bytes,count_bytes skip=\$4 count=\$3 if=\$f || exit 1 ;;
> + pwrite) dd oflag=seek_bytes conv=notrunc seek=\$4 of=\$f || exit 1 ;;
> + can_write) ;;
> + *) exit 2 ;;
> +esac
> +exit 0
> +EOF
> +chmod +x test-parallel-sh.script
> +
> +# With --threads=1, the write should complete first because it was issued first
> +nbdkit -v -t 1 -U - --filter=delay sh te...
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):