2008-02-20 15:45:59 +00:00
|
|
|
/*
|
|
|
|
* storage_backend_fs.h: storage backend for FS and directory handling
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007-2008 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2007-2008 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_STORAGE_BACKEND_FS_H__
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __VIR_STORAGE_BACKEND_FS_H__
|
2008-02-20 15:45:59 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "storage_backend.h"
|
2008-02-20 15:45:59 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# if WITH_STORAGE_FS
|
2008-02-20 15:45:59 +00:00
|
|
|
extern virStorageBackend virStorageBackendFileSystem;
|
|
|
|
extern virStorageBackend virStorageBackendNetFileSystem;
|
2011-09-16 12:14:15 +00:00
|
|
|
# endif
|
|
|
|
|
storage: Add fs pool formatting
This patch adds the ability to make the filesystem for a filesystem
pool during a pool build.
The patch adds two new flags, no overwrite and overwrite, to control
when mkfs gets executed. By default, the patch preserves the
current behavior, i.e., if no flags are specified, pool build on a
filesystem pool only makes the directory on which the filesystem
will be mounted.
If the no overwrite flag is specified, the target device is checked
to determine if a filesystem of the type specified in the pool is
present. If a filesystem of that type is already present, mkfs is
not executed and the build call returns an error. Otherwise, mkfs
is executed and any data present on the device is overwritten.
If the overwrite flag is specified, mkfs is always executed, and any
existing data on the target device is overwritten unconditionally.
2011-08-31 13:54:07 +00:00
|
|
|
typedef enum {
|
|
|
|
FILESYSTEM_PROBE_FOUND,
|
|
|
|
FILESYSTEM_PROBE_NOT_FOUND,
|
|
|
|
FILESYSTEM_PROBE_ERROR,
|
|
|
|
} virStoragePoolProbeResult;
|
2008-02-20 15:45:59 +00:00
|
|
|
extern virStorageBackend virStorageBackendDirectory;
|
|
|
|
|
|
|
|
#endif /* __VIR_STORAGE_BACKEND_FS_H__ */
|