Re: [libvirt] [PATCHv3 09/19] storage: don't require caller to pre-allocate metadata struct

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Requiring pre-allocation was an unusual idiom. It allowed iteration > over the backing chain to use fewer mallocs, but made one-shot > clients harder to read. Also, this makes it easier for a future > patch to move away from opening fds on every iterati

[libvirt] [PATCHv3 09/19] storage: don't require caller to pre-allocate metadata struct

2012-10-17 Thread Eric Blake
Requiring pre-allocation was an unusual idiom. It allowed iteration over the backing chain to use fewer mallocs, but made one-shot clients harder to read. Also, this makes it easier for a future patch to move away from opening fds on every iteration over the chain. * src/util/storage_file.h (vir