On Apr 25, 2019, at 10:14 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: > > On Thu, Apr 25, 2019 at 02:04:59PM -0400, Jeff Layton wrote: >> More bikeshedding: should we have a "states" file instead of an "opens" >> file and print a different set of output for each stateid type? > > Sure. The format of the file could be something like > > <stateid> open rw -- <openowner>... > <stateid> lock r 0-EOF <lockowner>... > <stateid> deleg r > > I wonder if we could put owners on separate lines and do some > heirarchical thing to show owner-stateid relationships? Hm. That's > kind of appealing but more work. My suggestion here would be to use YAML-formatted output rather than space/tab separated positional fields. That can still be made human readable, but also machine parseable and extensible if formatted properly. Something like the following (use https://yaml-online-parser.appspot.com/ to validate the formatting): - <stateid>: { state: open, mode: rw, owner: <openowner> } - <stateid>: { state: lock, mode: r, start: 0, end: EOF, owner: <openowner> } > I was only planning to do opens for the first iteration, and I think > extending later in separate files is slightly safer. > > More trivial, but: it'd lengthen lines and make columns line up less > often. But if we include a lot of long variable-length fields then > that's kinda hopeless anyway. > > --b. Cheers, Andreas
Attachment:
signature.asc
Description: Message signed with OpenPGP