From: VMware, Inc <> Date: Thu, 27 Oct 2011 18:48:01 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.10.26-514583~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73044c5fd09ecb9bcf29a71d2a8c295cd594e97a;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/file/fileIO.c b/open-vm-tools/lib/file/fileIO.c index 3dc93285f..c85565f1f 100644 --- a/open-vm-tools/lib/file/fileIO.c +++ b/open-vm-tools/lib/file/fileIO.c @@ -676,17 +676,24 @@ FileIO_AtomicTempFile(FileIODescriptor *fileFD, // IN: } #if !defined(_WIN32) - if (fchmod(tempFD->posix, stbuf.st_mode)) { - Log("%s: Failed to chmod temporary file, errno: %d\n", - __FUNCTION__, errno); - ASSERT(!vmx86_server); // For APD, hosted can fall-back and write directly - goto bail; - } - if (fchown(tempFD->posix, stbuf.st_uid, stbuf.st_gid)) { - Log("%s: Failed to chown temporary file, errno: %d\n", - __FUNCTION__, errno); - ASSERT(!vmx86_server); // For APD, hosted can fall-back and write directly - goto bail; + /* + * On ESX we always use the vmkernel atomic file swap primitive, so + * there's no need to set the permissions and owner of the temp file. + */ + + if (!HostType_OSIsVMK()) { + if (fchmod(tempFD->posix, stbuf.st_mode)) { + Log("%s: Failed to chmod temporary file, errno: %d\n", + __FUNCTION__, errno); + status = FILEIO_ERROR; + goto bail; + } + if (fchown(tempFD->posix, stbuf.st_uid, stbuf.st_gid)) { + Log("%s: Failed to chown temporary file, errno: %d\n", + __FUNCTION__, errno); + status = FILEIO_ERROR; + goto bail; + } } #endif diff --git a/open-vm-tools/lib/include/fileIO.h b/open-vm-tools/lib/include/fileIO.h index b8666bf3d..6bae0b6fa 100644 --- a/open-vm-tools/lib/include/fileIO.h +++ b/open-vm-tools/lib/include/fileIO.h @@ -147,6 +147,10 @@ typedef enum { * (supported on ESX file systems) */ #define FILEIO_OPEN_MULTIWRITER_LOCK (1 << 14) +/* + * Flag the file to be cached by the vBlob caching layer + */ +#define FILEIO_OPEN_USE_AIO_CACHE (1 << 15) /* * Valid only for MacOS. It eventually results into O_EXLOCK flag passed to open * system call. diff --git a/open-vm-tools/lib/include/loglevel_user.h b/open-vm-tools/lib/include/loglevel_user.h index f5519e2f5..6ee6135b2 100644 --- a/open-vm-tools/lib/include/loglevel_user.h +++ b/open-vm-tools/lib/include/loglevel_user.h @@ -77,6 +77,7 @@ LOGLEVEL_VAR(vusbkeyboard), \ LOGLEVEL_VAR(vusbhid), \ LOGLEVEL_VAR(vusbtablet), \ + LOGLEVEL_VAR(vusbaudio), \ LOGLEVEL_VAR(hidQueue), \ LOGLEVEL_VAR(pci_1394), \ LOGLEVEL_VAR(1394), \ @@ -249,6 +250,13 @@ LOGLEVEL_VAR(serviceUser), /* lib/serviceUser */ \ LOGLEVEL_VAR(ssl), \ LOGLEVEL_VAR(vmrc), \ + LOGLEVEL_VAR(namespaceDb), \ + LOGLEVEL_VAR(namespaceMgr), \ + LOGLEVEL_VAR(blobMgr), \ + LOGLEVEL_VAR(vblobbe), \ + LOGLEVEL_VAR(blobFileBE), \ + LOGLEVEL_VAR(blobPythonBE), \ + LOGLEVEL_VAR(grainTrack), \ /* end of list */ LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER); diff --git a/open-vm-tools/lib/include/mutexRankLib.h b/open-vm-tools/lib/include/mutexRankLib.h index fa7bae9ad..3ce5541fb 100644 --- a/open-vm-tools/lib/include/mutexRankLib.h +++ b/open-vm-tools/lib/include/mutexRankLib.h @@ -66,6 +66,12 @@ */ #define RANK_slpv2GlobalLock (RANK_libLockBase + 0x4305) +/* + * vigor (must be < VMDB range and < disklib, see bug 741290) + */ +#define RANK_vigorClientLock (RANK_libLockBase + 0x4400) +#define RANK_vigorOfflineClientLock (RANK_libLockBase + 0x4410) + /* * NFC lib lock */ @@ -76,12 +82,6 @@ */ #define RANK_popPendingListLock (RANK_libLockBase + 0x4605) -/* - * vigor (must be < VMDB range and < disklib, see bug 741290) - */ -#define RANK_vigorClientLock (RANK_libLockBase + 0x4700) -#define RANK_vigorOfflineClientLock (RANK_libLockBase + 0x4710) - /* * disklib and I/O related locks */