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

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 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 iteration

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

2012-10-13 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