mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
virtiofsd: Handle hard reboot
Handle a mount hard reboot (without unmount) mount we get another 'init' which FUSE doesn't normally expect. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
c806d6435f
commit
e8556f4909
1 changed files with 15 additions and 1 deletions
|
@ -2433,7 +2433,21 @@ void fuse_session_process_buf_int(struct fuse_session *se,
|
||||||
goto reply_err;
|
goto reply_err;
|
||||||
}
|
}
|
||||||
} else if (in->opcode == FUSE_INIT || in->opcode == CUSE_INIT) {
|
} else if (in->opcode == FUSE_INIT || in->opcode == CUSE_INIT) {
|
||||||
goto reply_err;
|
if (fuse_lowlevel_is_virtio(se)) {
|
||||||
|
/*
|
||||||
|
* TODO: This is after a hard reboot typically, we need to do
|
||||||
|
* a destroy, but we can't reply to this request yet so
|
||||||
|
* we can't use do_destroy
|
||||||
|
*/
|
||||||
|
fuse_log(FUSE_LOG_DEBUG, "%s: reinit\n", __func__);
|
||||||
|
se->got_destroy = 1;
|
||||||
|
se->got_init = 0;
|
||||||
|
if (se->op.destroy) {
|
||||||
|
se->op.destroy(se->userdata);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
goto reply_err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = EACCES;
|
err = EACCES;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue