[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: datalog including written data?



Hi Eric,

On 1/11/22 21:42, Eric Blake wrote:
On Fri, Dec 31, 2021 at 01:14:43PM +0200, Wouter Verhelst wrote:
b) As first observation:

https://github.com/NetworkBlockDevice/nbd/blob/master/nbd-server.c#L294

The server supports

NBD_CMD_READ, NBD_CMD_WRITE, NBD_CMD_DISC, NBD_CMD_FLUSH, NBD_CMD_TRIM,
NBD_CMD_WRITE_ZEROES

https://github.com/NetworkBlockDevice/nbd/blob/master/nbd-trdump.c#L71

The trace dump utility supports

NBD_CMD_READ, NBD_CMD_WRITE, NBD_CMD_DISC, NBD_CMD_FLUSH

-> TRIM and WRITE_ZEROES is missing.


Should I create a patch that adds TRIM and WRITE_ZEROES to nbd-trdump?
Yes, that might be nice. nbd-trdump hasn't been looked at in a while,
which is why TRIM and WRITE_ZEROES haven't been added to it yet.
It may also be worth adding NBD_CMD_CACHE trace support, even if that
is not yet implemented in nbd-server.
I'll add that for the next version of the changes.
That said, it looks like your use of nbd-server transactionlog and
nbd-trdump is to analyze what happened after the fact.  It would also
be possible to achieve the same goal (with trim and write_zeroes
support already working) by using nbdkit's log filter[1], where you
may also use nbdkit's nbd plugin[2] as an intermediary between any NBD
server and client in order to inject arbitrary nbdkit filters in the
chain.
Interesting, I was not aware of nbdkit.

But I would like to concentrate first on one stable implementation.

But I will keep in mind that nbd-trplay should support (in the future) multiple log file formats as input.

[1] https://libguestfs.org/nbdkit-log-filter.1.html
[2] https://libguestfs.org/nbdkit-nbd-plugin.1.html

--

    Manfred


Reply to: