libkrun: Refactor VirtioFsTable to VirtioFsLookup trait#44
Conversation
|
Hi @valpackett wdyt? |
6a5ed09 to
50ca991
Compare
|
Oh wow, I didn't even realize the previous thing was merged and released- oh, on a temporary Actual substance: LGTM 👍 |
77a9cf2 to
0a2ead1
Compare
mtjhrc
left a comment
There was a problem hiding this comment.
I would remove the default impl, otherwise this LGTM.
0a2ead1 to
13c9793
Compare
|
How does everyone feel about modifying the |
yeah, I think it makes sense consolidating to a generic RutabagaCallback - it's cleaner. One small issue though: VirtioFsLookup takes two u64 parameters (fs_id and handle), so it should probably be: |
13c9793 to
289e53d
Compare
Ack, you can also do: leave it up to you if you prefer the pair or struct |
864bcde to
d477dd4
Compare
|
But now we're back to just a single callback type that can't be easily extended.. Well I can extend everything "not-easily", sure :) Why do we need the double |
|
Hmm, thinking about it, I think the trait was better, we could extend it like Val wants by adding methods with default impl quite easily. |
|
I could bring back the VirtioFsLookup trait and still keep the RutabagaCallback for simple handlers. |
d477dd4 to
bde4788
Compare
|
IMHO just the simple specific-purpose trait without any of the |
|
Sure if the separate trait is better, no problem supporting that. We can probably optimize later anyways, |
bde4788 to
7c2c936
Compare
Introduce a trait-based abstraction for VirtioFS file descriptor lookup. The trait design enables future extensions like inode-based lookups for O_PATH file descriptors (needed for D-Bus over virtgpu with file transfer support) Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
7c2c936 to
2596a71
Compare
|
Fixed, Thanks all! |
|
https://crates.io/crates/rutabaga_gfx/0.1.76-libkrun.1 <-- cut release with this commit |
Introduce a trait-based abstraction for VirtioFS file descriptor lookup. The trait design enables future extensions like inode-based lookups for O_PATH file descriptors (needed for D-Bus over virtgpu with file transfer support). Provides DefaultVirtioFsLookup for backward compatibility.
This supersedes #43