On Fri, Jun 10, 2022 at 04:15:58PM -0500, Eric Blake wrote:
> On Fri, Jun 10, 2022 at 10:03:23PM +0100, Richard W.M. Jones wrote:
> > After your patch series, the two lines just do nothing at all.
> 
> No, they are still useful. If we don't call them during handshake,
> then the later call to next->can_zero in io.c may fail without setting
> errno.  Any time we want to guarantee a next->can_* function will
> succeed at all later points where we need a sane errno, we do so by
> pre-caching it during handshake.

OK, I see - it's because of the specific behaviour of io_zeroout which
calls next->can_zero / next->zero.  Not obvious at all!

> > 
> > Anyway, I will remove them.
> 
> Please don't. But adding comments for why they are important is okay.

I'll leave them.

> I also fixed another bug today: the eval plugin is smart enough to
> synthesize several .can_* helpers if the corresponding function exists
> (for example, with sh, you have to explicitly implement can_flush to
> get flush called, but not with eval); but the eval plugin wasn't doing
> a good synthesis for .can_cache.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to