Hello,
I was thinking about how to implement the following APIs in the test driver:
-virDomainFSFreeze
-virDomainFSThaw
-virDomainFSTrim
The first two are conceptually paired. They both get a mountpoints
argument. The QEMU driver (which is the only driver implementing this
currently) ignores this completely.
However, I thought that we can allow it and pretend that the only
available mountpoints are "/" and "/boot" (like in a default Fedora
installation). The following questions arise though:
- Should we keep some kind of temporary or permanent state on the test
driver about this? Because it makes sense for virDomainFSThaw to
succeed only on mountpoints for which previously virDomainFSFreeze has
been called. If so, *where* exactly should we keep this state?
- In case a non-existing mountpoint is passed to either of the first 2
APIs. Should we fail? If so, a new error code should be introduced for
this. Also for the cases above where e.g. Thaw is called on a fs that
isn't frozen probably yet another different error code must be used.
Should we add all these new error codes?
Or maybe all the above is more complicated than necessary and it's
fine if we ignore mountpoints completely like the QEMU driver does and
make all 3 APIs above to always succeed no matter what in the test
driver?
Thanks,
Ilias