Re: [PATCH 3/6] storage: split fs storage file code from storage driver backend

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

 



On Wed, Apr 25, 2018 at 16:52:40 +0100, Daniel Berrange wrote:
> The storage file code needs to be run in the hypervisor drivers, while
> the storage backend code needs to be run in the storage driver. Split
> the source code as a preparatory step for creating separate loadable
> modules.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/storage/Makefile.inc.am      |   2 +
>  src/storage/storage_backend_fs.c | 210 +-------------------------------
>  src/storage/storage_file_fs.c    | 251 +++++++++++++++++++++++++++++++++++++++
>  src/storage/storage_file_fs.h    |  29 +++++
>  4 files changed, 285 insertions(+), 207 deletions(-)
>  create mode 100644 src/storage/storage_file_fs.c
>  create mode 100644 src/storage/storage_file_fs.h

[...]

> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
> index 9b0fcf92c5..bface86b43 100644
> --- a/src/storage/storage_backend_fs.c
> +++ b/src/storage/storage_backend_fs.c
> @@ -1,7 +1,7 @@
>  /*
>   * storage_backend_fs.c: storage backend for FS and directory handling
>   *
> - * Copyright (C) 2007-2015 Red Hat, Inc.
> + * Copyright (C) 2007-2018 Red Hat, Inc.

Does just deleting a bunch of code warrant a copyright bump?

>   * Copyright (C) 2007-2008 Daniel P. Berrange
>   *
>   * This library is free software; you can redistribute it and/or
> @@ -28,21 +28,15 @@
>  #include <stdio.h>
>  #include <errno.h>
>  #include <fcntl.h>
> -#include <unistd.h>
>  #include <string.h>
>  
> -#include <libxml/parser.h>
> -#include <libxml/tree.h>
> -#include <libxml/xpath.h>

These are not added in the src/storage/storage_file_fs.c, so they are a
separate cleanup.

> -
>  #include "virerror.h"
>  #include "storage_backend_fs.h"
> +#include "storage_file_fs.h"
>  #include "storage_util.h"
>  #include "storage_conf.h"
> -#include "virstoragefilebackend.h"
>  #include "vircommand.h"
>  #include "viralloc.h"
> -#include "virxml.h"
>  #include "virfile.h"
>  #include "virlog.h"
>  #include "virstring.h"

[...]

> diff --git a/src/storage/storage_file_fs.c b/src/storage/storage_file_fs.c
> new file mode 100644
> index 0000000000..c8d87514eb
> --- /dev/null
> +++ b/src/storage/storage_file_fs.c
> @@ -0,0 +1,251 @@
> +/*
> + * storage_file_fs.c: storage file code for FS and directory handling
> + *
> + * Copyright (C) 2007-2018 Red Hat, Inc.
> + * Copyright (C) 2007-2008 Daniel P. Berrange

AFAIK there's no code moved which the last line would apply to.

> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library.  If not, see
> + * <http://www.gnu.org/licenses/>.
> + *
> + * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
> + */
> +
> +#include <config.h>

[...]

> diff --git a/src/storage/storage_file_fs.h b/src/storage/storage_file_fs.h
> new file mode 100644
> index 0000000000..c5d748c64d
> --- /dev/null
> +++ b/src/storage/storage_file_fs.h
> @@ -0,0 +1,29 @@
> +/*
> + * storage_file_fs.h: storage file code for FS and directory handling
> + *
> + * Copyright (C) 2007-2018 Red Hat, Inc.
> + * Copyright (C) 2007-2008 Daniel P. Berrange

As previously, the only added function is new in this commit.

> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library.  If not, see
> + * <http://www.gnu.org/licenses/>.
> + *
> + * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
> + */


ACK

Attachment: signature.asc
Description: PGP 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]

  Powered by Linux