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

Re: datalog including written data?



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.

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.

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

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply to: