On 02/01/11 15:48, Adam Litke wrote: > On Tue, 2011-02-01 at 11:58 +0100, jes.soren...@redhat.com wrote: >> +/* >> + * va_fsfreeze(): Walk list of mounted file systems in the guest, and >> + * freeze the ones which are real local file systems. >> + * rpc return values: Number of file systems frozen, -1 on error. >> + */ >> +static xmlrpc_value *va_fsfreeze(xmlrpc_env *env, >> + xmlrpc_value *params, >> + void *user_data) >> +{ >> + xmlrpc_int32 ret = 0, i = 0; >> + xmlrpc_value *result; >> + struct direntry *entry; >> + int fd; >> + SLOG("va_fsfreeze()"); >> + >> + if (fsfreeze_status == FREEZE_FROZEN) { >> + ret = 0; >> + goto out; >> + } >> + >> + ret = build_mount_list(); >> + if (ret < 0) { >> + goto out; >> + } >> + >> + fsfreeze_status = FREEZE_INPROGRESS; >> + >> + entry = mount_list; >> + while(entry) { >> + fd = qemu_open(entry->dirname, O_RDONLY); >> + if (fd == -1) { >> + ret = errno; >> + goto error; >> + } >> + ret = ioctl(fd, FIFREEZE); >> + if (ret < 0 && ret != EOPNOTSUPP) { >> + goto error; >> + } > > Here we silently ignore filesystems that do not support the FIFREEZE > ioctl. Do we need to have a more complex return value so that we can > communicate which mount points could not be frozen? Otherwise, an > unsuspecting host could retrieve a corrupted snapshot of that > filesystem, right?
That is correct, however most Linux file systems do support it, and for the ones that don't, there really isn't anything we can do. Cheers, Jes