]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common source files; not applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:51 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:51 +0000 (11:23 -0700)
open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/include/fileIO.h
open-vm-tools/lib/include/vm_product_versions.h

index c8ed342014c4ff09569a168c5e243cea089397b4..1d16075a7c3e5d2ac07873e3f40c799073924db5 100644 (file)
@@ -834,7 +834,9 @@ FileIOCreateRetry(FileIODescriptor *file,   // OUT:
    }
 #elif defined(__linux__)
    if (HostType_OSIsVMK()) {
-      if ((access & FILEIO_OPEN_MULTIWRITER_LOCK) != 0) {
+      if ((access & FILEIO_OPEN_SWMR_LOCK) != 0) {
+         flags |= O_SWMR_LOCK;
+      } else if ((access & FILEIO_OPEN_MULTIWRITER_LOCK) != 0) {
          flags |= O_MULTIWRITER_LOCK;
       } else if ((access & FILEIO_OPEN_LOCK_MANDATORY) != 0) {
          flags |= O_EXCLUSIVE_LOCK;
index 47f9f1a626ad278c7c4844bcab8854158f4b1412..3da90143f9319a64fc48c4e96b9b18fa3826ef8c 100644 (file)
@@ -140,7 +140,7 @@ typedef enum {
  * unshare the flags between the two at which point this could be fixed.
  * --Tommy
  */
-#define  FILEIO_OPEN_PRIVILEGED_IOCTL  (1 << 12)
+#define  FILEIO_OPEN_PRIVILEGED_IOCTL    (1 << 12)
 /*
  * Lock the file on open with a exclusive leased lock that can be broken
  * (supported on ESX file systems)
@@ -151,6 +151,11 @@ typedef enum {
  * (supported on ESX file systems)
  */
 #define FILEIO_OPEN_MULTIWRITER_LOCK     (1 << 14)
+/*
+ * Lock the file on open with an SWMR leased lock that can be broken
+ * (supported on ESX file systems)
+ */
+#define FILEIO_OPEN_SWMR_LOCK            (1 << 15)
 /*
  * Valid only for MacOS. It eventually results into O_EXLOCK flag passed to open
  * system call.
@@ -173,11 +178,11 @@ typedef enum {
 /*
  * Valid only on POSIXen. Don't follow a symbolic link.
  */
-#define FILEIO_OPEN_ACCESS_NOFOLLOW (1 << 18)
+#define FILEIO_OPEN_ACCESS_NOFOLLOW      (1 << 18)
 /*
  * Valid only on Windows. Set FILE_SHARE_DELETE.
  */
-#define FILEIO_OPEN_SHARE_DELETE (1 << 19)
+#define FILEIO_OPEN_SHARE_DELETE         (1 << 19)
 /*
  * Strengths of file lock.
  * Advisory:
@@ -190,9 +195,15 @@ typedef enum {
  *   Adaptively picks between mandatory and advisory.
  * Almost all cases should use the "best" lock.
  */
-#define FILEIO_OPEN_LOCK_BEST         FILEIO_OPEN_LOCKED /* historical */
-#define FILEIO_OPEN_LOCK_ADVISORY     (1 << 20)
-#define FILEIO_OPEN_LOCK_MANDATORY    (1 << 21)
+#define FILEIO_OPEN_LOCK_BEST            FILEIO_OPEN_LOCKED /* historical */
+#define FILEIO_OPEN_LOCK_ADVISORY        (1 << 20)
+#define FILEIO_OPEN_LOCK_MANDATORY       (1 << 21)
+
+/*
+ * Flag passed to open() to enable use of swmr-reader locks on VMFS.  This
+ * definition must match USEROBJ_OPEN_SWMR_LOCK in user_vsiTypes.h.
+ */
+#define O_SWMR_LOCK                      (1 << 21)  // 0x00200000
 
 /*
  * OPTIMISTIC is an alternative to EXCLUSIVE and MANDATORY. It applies
@@ -200,19 +211,19 @@ typedef enum {
  * called "optimistic" to speed up opens. Rule-of-thumb is to use it
  * only for read-only opens of small files (< 1KB).
  */
-#define FILEIO_OPEN_OPTIMISTIC_LOCK   (1 << 22)  // 0x00400000
+#define FILEIO_OPEN_OPTIMISTIC_LOCK      (1 << 22)  // 0x00400000
 
 /*
  * Flag passed to open() to enable use of oplocks on VMFS.  This definition
  * must match USEROBJ_OPEN_OPTIMISTIC_LOCK in user_vsiTypes.h.
  */
-#define O_OPTIMISTIC_LOCK             (1 << 22)  // 0x00400000
+#define O_OPTIMISTIC_LOCK                (1 << 22)  // 0x00400000
 
 /*
  * POSIX specific close the file descriptor when the program uses a variant
  * of the exec system call capability. This is useful in fork/exec scenarios.
  */
-#define FILEIO_OPEN_CLOSE_ON_EXEC     (1 << 23)  // 0x00800000
+#define FILEIO_OPEN_CLOSE_ON_EXEC        (1 << 23)  // 0x00800000
 
 /*
  * Flag passed to open() to not attempt to get the LUN attributes as part of
@@ -220,21 +231,21 @@ typedef enum {
  * definition must match the definition of USEROBJ_OPEN_NOATTR in
  * user_vsiTypes.h and FS_OPEN_NOATTR in fs_public.h
  */
-#define O_NOATTR                      (1 << 26)  // 0x04000000
+#define O_NOATTR                         (1 << 26)  // 0x04000000
 
 /*
  * Flag passed to open() to get multiwriter VMFS lock.  This definition must
  * match USEROBJ_OPEN_MULTIWRITER_LOCK in user_vsiTypes.h.
  */
 
-#define O_MULTIWRITER_LOCK            (1 << 27)  // 0x08000000
+#define O_MULTIWRITER_LOCK               (1 << 27)  // 0x08000000
 
 /*
  * Flag passed to open() to get exclusive VMFS lock.  This definition must
  * match USEROBJ_OPEN_EXCLUSIVE_LOCK in user_vsiTypes.h.
  */
 
-#define O_EXCLUSIVE_LOCK              (1 << 28)  // 0x10000000
+#define O_EXCLUSIVE_LOCK                 (1 << 28)  // 0x10000000
 
 /* File Access check args */
 #define FILEIO_ACCESS_READ       (1 << 0)
index b37db8d73cdec67789789a7e07453b09485a36f7..2dbd67307ec1d3a76b55443ed31016ec4d1b1d63 100644 (file)
@@ -37,7 +37,7 @@
  * versioning is correct.
  */
 #if defined(VMX86_VIEWCLIENT)
-   #define PRODUCT_VERSION    4,5,1,PRODUCT_BUILD_NUMBER_NUMERIC
+   #define PRODUCT_VERSION    4,6,0,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */
    #define PRODUCT_VERSION    10,0,1,PRODUCT_BUILD_NUMBER_NUMERIC   /* VMRC_VERSION_NUMBER below has to match this */
 #elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */
 #define PRECHECK_VERSION "e.x.p"
 #define VIEW_FEATUREPACK_VERSION "5.2.0"
 #define VIEW_CLIENT_VERSION_NUMBER "4.5.1"
-#define VIEW_CLIENT_VERSION "4.5.1"
+#define VIEW_CLIENT_VERSION "4.6.0"
 #define VHSESDK_VERSION "1.0.0"
 #define RDE_RFT_ALL_VERSION "4.0.0"
 #define RDESDK_VERSION "2.0.0"