Re: [PATCH 06/12] storage: On error rmdir created directory in virDirCreate[NoFork]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 09, 2015 at 09:34:05 -0400, John Ferlan wrote:
> After a successful creation of a directory, if some other call results
> in returning a failure, let's remove the directory we created to
> prevent another round trip or confusion in the caller. In particular, this
> function can be called during a storage backend buildVol, so in order
> to ensure that caller doesn't need to distinguish between failed create
> or some other failure after create, just remove the directory we created.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/util/virfile.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index 51198e2..2cb2469 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c

...

> @@ -2420,6 +2420,7 @@ virDirCreateNoFork(const char *path,
> @@ -2465,6 +2469,7 @@ virDirCreate(const char *path,

Please document the semantics in the function comments for the two
functions.

ACK with docs.

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]