On Tue, Aug 03, 2021 at 01:22:09PM +0100, Dr. David Alan Gilbert wrote: > * Jason Wang (jasowang@redhat.com) wrote: > > > > 在 2021/8/3 下午6:37, Stefan Hajnoczi 写道: > > > On Tue, Aug 03, 2021 at 02:33:20PM +0800, Jason Wang wrote: > > > > 在 2021/7/26 下午11:07, Stefan Hajnoczi 写道: > > > > > I guess this is just a summary of what we've already discussed and not > > > > > new information. I think an implementation today would use DBus VMState > > > > > to transfer implementation-specific device state (an opaque blob). > > > > > > > > Instead of trying to migrate those opaque stuffs which is kind of tricky, I > > > > wonder if we can avoid them by recording the mapping in the shared > > > > filesystem itself. > > > The problem is that virtiofsd has no way of reopening the exact same > > > files without Linux file handles. > > > > > > I believe if we want to support live migration of the passthrough > > filesystem. The filesystem itself must be shared? (like NFS) > > > > Assuming this is true. Can we store those mapping (e.g fuse inode -> host > > inode) in a known path/file in the passthrough filesystem itself and hide > > that file from the guest? > > That's pretty dangerous; it assumes that the filesystem is only used > together with virtiofs; as a *shared* filesystem it's possible that it's > being used directly by normal NFS clients as well. > It's also very racy; trying to make sure those mappings reflect the > *current* meaning of inodes even while they're changing under your feet > is non-trivial. Right, it's impossible to guarantee that you will reopen or even be able to find the same inode for the reasons I've mentioned (deleting and renaming files) plus more (inode number reuse). Stefan