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

Re: Linux kernel NBD driver support for structured replies?



On Wed, Sep 08, 2021 at 02:24:07PM +0200, Wouter Verhelst wrote:
> It's been on my low-priority TODO list since essentially when we
> hammered down the spec, and even had a half-baked preliminary patch at
> one point, but other things just keep being more urgent than that. I
> won't complain if you implement it instead of me :)

:)

> Some thoughts you'll want to consider:
> 
> The kernel doesn't do the negotiation phase, only the transmission
> phase; the negotiation phase is done in user space. This means the
> client needs to figure out whether the currently-running kernel even
> supports structured replies before it can negotiate them (otherwise the
> kernel will be horribly confused). My half-baked patch would create a
> driver sysfs attribute called "features" which just shows
> "structured_replies" if they are supported by this kernel (the idea
> being that the file could be extended in the future to also show
> "metadata" if that ends up being supported, etc).

There's precedent for something similar: /sys/fs/ext4/features/ , a
directory with a file for each supported ext4 feature. I think a
comparable approach for nbd would be more convenient than doing text
parsing, and more consistent with the general sysfs philosophy (one file
per value).

- Josh Triplett


Reply to: