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

Re: datalog including written data?



On Tue, Jan 11, 2022 at 02:42:14PM -0600, 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.

Yeah, sounds like a good idea.

> That said, it looks like your use of nbd-server transactionlog and
> nbd-trdump is to analyze what happened after the fact.

That is the main use, yes, although it can also be used to debug issues
live, and it's used in the test suite as well.

> 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.

While this is no doubt accurate, I think nbd-server should be
self-contained; that is, features implemented in nbd-server should not
depend on other NBD implementations :)

-- 
     w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}


Reply to: