hugelgupf / p9

Idiomatic Go 9P2000.L client and server, extracted from gVisor for general use
Apache License 2.0
90 stars 19 forks source link

p9: handlers: support extended attributes #66

Closed Lencerf closed 1 year ago

Lencerf commented 1 year ago

This commit adds 3 methods to the File interface:

With these methods we can implement the support for extended attributes in handlers.

An example of the implementation can be found at https://github.com/Lencerf/cpu/commit/60e29909302e815dfb4f6f4889b40c712c92feb6, which simply calls the related system APIs.

I am new to the 9p fs implementations. Suggestions are much appreciated!

CC: @rminnich

hugelgupf commented 1 year ago

@Lencerf I think we're about ready!

I added some tests, finding 2 cases that were missed: removal of xattrs didn't work & transmitting (get, list, set) values larger than msize was broken as well.

In the course of that, I decided not to implement the client file cause it was a bit too much for now and we don't have canonical tests for them at the moment.

rminnich commented 1 year ago

I'll now need to update cpu :-)