Skip to contentSkip to conversation

virtfs/9p duplicate inodes

Qemu-devel Christian Schoenebeck 2 participants 3 messages Apr 20, 2019 – Apr 23, 2019 3 messages not in the archive

lore
Share & tools
lore
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · On Samstag, 30. März 2019 21:01:28 CEST Christian Schoenebeck wrote:
Quoted 3 lines · On Samstag, 30. März 2019 17:47:51 CET Greg Kurz wrote:

Maybe have a look at this tentative to fix QID collisions:

https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html

[snip]

Quoted 4 lines

Question: so far I just had a look at that patch set, but haven't tried it yet. Am I correct that the inode numbers (of the same file) would actually change on guest side with every reboot (i.e. depending on the precise sequence individual files would be accessed by guest after each reboot)?

I intended to extend Antonios' patch set regarding 9p QID collisions with the goal to make the ids constant beyond reboots by storing the qpp_table as fs xattr.

My plan was to load the qpp_table in v9fs_device_realize_common() and save the table only once in v9fs_device_unrealize_common(), instead of storing the table on every new insertion. The problem though is that none of the 9p unrealize functions is called on guest shutdowns.

Is there any callback that is guaranteed to be called on guest shutdowns?

Best regards,
Christian Schoenebeck

#4 lore raw

Hi Christian,

Sorry for the late response. I'm quite busy on other topics these days...

Quoted 11 lines · On Sun, 21 Apr 2019 00:41:01 +0200 Christian Schoenebeck…
Quoted 4 lines · On Samstag, 30. März 2019 21:01:28 CEST Christian Schoenebeck wrote:
Quoted 3 lines · On Samstag, 30. März 2019 17:47:51 CET Greg Kurz wrote:

Maybe have a look at this tentative to fix QID collisions:

https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html

[snip]

Quoted 4 lines

Question: so far I just had a look at that patch set, but haven't tried it yet. Am I correct that the inode numbers (of the same file) would actually change on guest side with every reboot (i.e. depending on the precise sequence individual files would be accessed by guest after each reboot)?

I have not checked.

Quoted 4 lines

I intended to extend Antonios' patch set regarding 9p QID collisions with the goal to make the ids constant beyond reboots by storing the qpp_table as fs xattr.

Hmm... why would you do that ? Even if some filesystems do have persistant inode numbers, it isn't mandatory AFAIK.

Quoted 5 lines

My plan was to load the qpp_table in v9fs_device_realize_common() and save the table only once in v9fs_device_unrealize_common(), instead of storing the table on every new insertion. The problem though is that none of the 9p unrealize functions is called on guest shutdowns.

The unrealize function is called when the device is unplugged from it's parent bus. It isn't related to guest shutdown.

Quoted 2 lines

Is there any callback that is guaranteed to be called on guest shutdowns?

There's no such thing.

Quoted 2 lines

Best regards,
Christian Schoenebeck

Cheers,

--
Greg

#5 lore raw
Quoted 3 lines · On Dienstag, 23. April 2019 13:44:42 CEST Greg Kurz wrote:

Hi Christian,

Sorry for the late response. I'm quite busy on other topics these days...

Absolutely no problem. We probably all share the same fate of constant work load on endless battle fields popping up everywhere. :-)

Quoted 6 lines
Quoted 3 lines

I intended to extend Antonios' patch set regarding 9p QID collisions with the goal to make the ids constant beyond reboots by storing the qpp_table as fs xattr.

Hmm... why would you do that ? Even if some filesystems do have persistant inode numbers, it isn't mandatory AFAIK.

Mja, unfortunately I found that necessary, see my comment in patch 3 for the background / reason:

https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg03755.html

And sorry that my patch set did not go out as one thread today. I vow emendation. ;-)

Best regards,
Christian Schoenebeck