- 26 2月, 2010 1 次提交
-
-
由 David Allan 提交于
* We are reverting this patch pending a discussion of the right way to implement.
-
- 24 2月, 2010 1 次提交
-
-
由 Dave Allan 提交于
Create the filesystem on the partition used by the pool * configure.ac: check for mkfs availability * libvirt.spec.in: add extra require on util-linux for mkfs * src/storage/storage_backend_fs.c: run mkfs with the expected fs type when creating a filesystem pool
-
- 22 2月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Recently we introduced O_DSYNC flag when creating raw storage files to avoid filling all disk cache with dirty pages. However, the patch got lost when virStorageBackendCreateRaw was reworked using virFileOperation. Let's use O_DSYNC again.
-
- 20 2月, 2010 2 次提交
-
-
由 Laine Stump 提交于
There were a few operations on the storage volume file that were still being done as root, which will fail if the file is on a root-squashed NFS share. The result was that attempts to create a storage volume of type "raw" on a root-squashed NFS share would fail. This patch uses the newly introduced "hook" function in virFileOperation to execute all those file operations in the child process that's run under the uid that owns the file (and, presumably, has permission to write to the NFS share) * src/storage/storage_backend.c: use virFileOperation() in virStorageBackendCreateRaw, turning virStorageBackendCreateRaw() into a new createRawFileOpHook() hook
-
由 Laine Stump 提交于
It turns out it is also useful to be able to perform other operations on a file created while running as a different uid (eg, write things to that file), and possibly to do this to a file that already exists. This patch adds an optional hook function to the renamed (for more accuracy of purpose) virFileOperation; the hook will be called after the file has been opened (possibly created) and gid/mode checked/set, before closing it. As with the other operations on the file, if the VIR_FILE_OP_AS_UID flag is set, this hook function will be called in the context of a child process forked from the process that called virFileOperation. The implication here is that, while all data in memory is available to this hook function, any modification to that data will not be seen by the caller - the only indication in memory of what happened in the hook will be the return value (which the hook should set to 0 on success, or one of the standard errno values on failure). Another piece of making the function more flexible was to add an "openflags" argument. This arg should contain exactly the flags to be passed to open(2), eg O_RDWR | O_EXCL, etc. In the process of adding the hook to virFileOperation, I also realized that the bits to fix up file owner/group/mode settings after creation were being done in the parent process, which could fail, so I moved them to the child process where they should be. * src/util/util.[ch]: rename and rework virFileCreate-->virFileOperation, and redo flags in virDirCreate * storage/storage_backend.c, storage/storage_backend_fs.c: update the calls to virFileOperation/virDirCreate to reflect changes in the API, but don't yet take advantage of the hook.
-
- 17 2月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/storage/storage_backend_mpath.c (virStorageBackendIsMultipath): The result of dm_get_next_target was never used (and isn't needed), so don't store it.
-
- 12 2月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/conf/storage_conf.c (virStoragePoolDefParseSourceString): * src/storage/storage_backend_fs.c: (virStorageBackendFileSystemNetFindPoolSourcesFunc): (virStorageBackendFileSystemNetFindPoolSources): * src/test/test_driver.c (testStorageFindPoolSources):
-
- 10 2月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is no longer required for error reporting since that is recorded in a thread local. Remove use of virConnectPtr from all APIs in secret_conf.{h,c} and update all callers to match
-
由 Daniel P. Berrange 提交于
The virConnectPtr is no longer required for error reporting since that is recorded in a thread local. Remove use of virConnectPtr from all APIs in storage_conf.{h,c} and storage_encryption_conf.{h,c} and update all callers to match
-
- 09 2月, 2010 5 次提交
-
-
由 Jiri Denemark 提交于
When creating preallocated large raw files opening them with O_DSYNC prevents long delays in reading because cache pages can be immediately reused without writing them on a disk first.
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
-
- 05 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 02 2月, 2010 3 次提交
-
-
由 Jim Meyering 提交于
* src/storage/storage_backend.c (virStorageBackendRunProgRegex): Don't close a negative (read-only) file descriptor.
-
由 Jim Meyering 提交于
* src/qemu/qemu_monitor_text.c (qemuMonitorTextGetAllPCIAddresses): Use %s. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * tools/virsh.c (cmdSecretSetValue): Likewise.
-
由 Eric Blake 提交于
* src/internal.h (STREQ, STRCASEEQ, STRNEQ, STRCASENEQ, STREQLEN) (STRCASEEQLEN, STRNEQLEN, STRCASENEQLEN, STRPREFIX): Avoid redundant parenthesis. * examples/domain-events/events-c/event-test.c (STREQ): Likewise. * src/storage/parthelper.c (STREQ): Likewise.
-
- 22 1月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 1月, 2010 3 次提交
-
-
由 David Allan 提交于
Allows the initiator to use a variety of IQNs rather than just the system IQN when creating iSCSI pools. * docs/schemas/storagepool.rng: extends the syntax with <iqn name="..."/> * src/conf/storage_conf.[ch]: read and stores the iqn name * src/storage/storage_backend_iscsi.[ch]: implement the IQN selection when detected
-
由 Laine Stump 提交于
Previously the uid/gid/mode in the xml was ignored when creating new storage pool directories. This commit attempts to honor the requested permissions, and spits out an error if it can't. Note that when creating the directory, the rest of the path leading up to the final element is created using current uid/gid/mode, and the final element gets the settings from xml. It is NOT an error for the directory to already exist; in this case, the perms for the existing directory are just set (if necessary). * src/storage/storage_backend_fs.c: update the virStorageBackendFileSystemBuild function to check the directory hierarchy separately then create the leaf directory with the right attributes
-
由 Laine Stump 提交于
In order to avoid problems trying to chown files that were created by root on a root-squashing nfs server, fork a new process that setuid's to the desired uid before creating the file. (It's only done this way if the pool containing the new volume is of type 'netfs', otherwise the old method of creating the file followed by chown() is used.) This changes the semantics of the "create_func" slightly - previously it was assumed that this function just created the file, then the caller would chown it to the desired uid. Now, create_func does both operations. There are multiple functions that can take on the role of create_func: createFileDir - previously called mkdir(), now calls virDirCreate(). virStorageBackendCreateRaw - previously called open(), now calls virFileCreate(). virStorageBackendCreateQemuImg - use virRunWithHook() to setuid/gid. virStorageBackendCreateQcowCreate - same. virStorageBackendCreateBlockFrom - preserve old behavior (but attempt chown when necessary even if not root) * src/storage/storage_backend.[ch] src/storage/storage_backend_disk.c src/storage/storage_backend_fs.c src/storage/storage_backend_logical.c src/storage/storage_driver.c: change the create_func implementations, also propagate the pool information to be able to detect NETFS ones.
-
- 18 1月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
* src/storage/storage_backend_fs.c (virStorageBackendFileSystemRefresh): Correct parentheses. The documented intent is to ignore non-regular files, yet due to a parenthesization error all errors were handled that way.
-
由 Jim Meyering 提交于
* src/storage/storage_backend.h: Include <stdint.h>.
-
- 07 1月, 2010 1 次提交
-
-
由 David Allan 提交于
This patch removes the call to vol update after the volume build completes. The update call is currently meaningless anyway because the vol build is passed a copy of the definition, so the update result is thrown away. More importantly, if the user specified a selinux label for the volume, the update call results in a double free of the label * src/storage/storage_backend_fs.c: remove the update call
-
- 18 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/storage/storage_driver.c: Fix IsPersistent() and IsActivE() methods on storage pools to use 'storagePrivateData' instead of 'privateData'. Also fix naming convention of objects
-
- 14 12月, 2009 1 次提交
-
-
由 Laine Stump 提交于
* src/storage/storage_backend_fs.c: virStorageBackendFileSystemDelete was incorrectly calling unlink() in an attempt to remove a directory. It should be calling rmdir() instead.
-
- 11 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 10 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
-
- 11 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
This implements the virConnectIsSecure, virConnectIsEncrypted, virDomainIsPersistent, virDomainIsActive, virNetworkIsActive, virNetworkIsPersistent, virStoragePoolIsActive, virStoragePoolIsPersistent, virInterfaceIsActive APIs in (nearly) all drivers. Exceptions are: phyp: missing domainIsActive/Persistent esx: missing domainIsPersistent opennebula: missing domainIsActive/Persistent * src/remote/remote_protocol.x: Define remote wire ABI for newly added APIs. * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/remote/remote_driver.c, src/storage/storage_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c, src/xen/xen_inotify.h: Implement all the new APIs where possible
-
由 Daniel Veillard 提交于
* src/libvirt.c src/lxc/lxc_conf.c src/lxc/lxc_container.c src/lxc/lxc_controller.c src/node_device/node_device_hal.c src/openvz/openvz_conf.c src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.c src/remote/remote_driver.c src/storage/storage_backend_disk.c src/storage/storage_driver.c src/util/logging.c src/xen/sexpr.c src/xen/xend_internal.c src/xen/xm_internal.c: Steve Grubb <sgrubb@redhat.com> sent a code review and those are the fixes correcting the problems
-
- 10 11月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 03 11月, 2009 3 次提交
-
-
由 Chris Lalancette 提交于
When building with --disable-nls, I got a few messages like this: storage/storage_backend.c: In function 'virStorageBackendCreateQemuImg': storage/storage_backend.c:571: warning: format not a string literal and no format arguments Fix these up. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Daniel P. Berrange 提交于
The LXC driver was mistakenly returning -1 for lxcStartup() in scenarios that are not an error. This caused the libvirtd to quit for unprivileged users. This fixes the return code of LXC driver, and also adds a "name" field to the virStateDriver struct and logging to make it easier to find these problems in the future * src/driver.h: Add a 'name' field to state driver to allow easy identification during failures * src/libvirt.c: Log name of failed driver for virStateInit failures * src/lxc/lxc_driver.c: Don't return a failure code for lxcStartup() if LXC is not available on this host, simply disable the driver. * src/network/bridge_driver.c, src/node_device/node_device_devkit.c, src/node_device/node_device_hal.c, src/opennebula/one_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/secret/secret_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Fill in name field in virStateDriver struct
-
由 Daniel P. Berrange 提交于
Nearly all of the methods in src/util/util.h have error codes that must be checked by the caller to correct detect & report failure. Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of this * daemon/libvirtd.c: Add explicit check on return value of virAsprintf * src/conf/domain_conf.c: Add missing check on virParseMacAddr return value status & report error * src/network/bridge_driver.c: Add missing OOM check on virAsprintf and report error * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return value status & report error * src/security/security_selinux.c: Remove call to virRandomInitialize that's done in libvirt.c already * src/storage/storage_backend_logical.c: Add check & log on virRun return status * src/util/util.c: Add missing checks on virAsprintf/Run status * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK if they return an error status code * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr * src/xen/xm_internal.c: Add missing checks on virAsprintf * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
-
- 28 10月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
This will simplify adding FindPoolSources support to more pool backends in the future (as well as the test driver).
-
由 Cole Robinson 提交于
Similar in theory to *AssignDef type functions, this duplicate functionality will be used by an future FindPoolSources implementations.
-
- 13 10月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
-
- 30 9月, 2009 2 次提交
-
-
由 Mark McLoughlin 提交于
Finally, we get to the point of all this. Move virStorageGetMetadataFromFD() to virStorageFileGetMetadataFromFD() and move to src/util/storage_file.[ch] There's no functional changes in this patch, just code movement * src/storage/storage_backend_fs.c: move code from here ... * src/util/storage_file.[ch]: ... to here * src/libvirt_private.syms: export virStorageFileGetMetadataFromFD()
-
由 Mark McLoughlin 提交于
Introduce a metadata structure and make virStorageGetMetadataFromFD() fill it in. * src/util/storage_file.h: add virStorageFileMetadata * src/backend/storage_backend_fs.c: virStorageGetMetadataFromFD() now fills in the virStorageFileMetadata structure
-