windows-byte-range-locks-20050816
[openafs.git] / src / WINNT / afsd / cm_vnodeops.h
index fc5a5e5..569f698 100644 (file)
@@ -114,6 +114,10 @@ extern long cm_Link(cm_scache_t *dscp, char *namep, cm_scache_t *sscp,
 extern long cm_SymLink(cm_scache_t *dscp, char *namep, char *contentsp,
        long flags, cm_attr_t *attrp, cm_user_t *userp, cm_req_t *reqp);
 
+extern long cm_AssembleLink(cm_scache_t *linkScp, char *pathSuffixp,
+                            cm_scache_t **newRootScpp, cm_space_t **newSpaceBufferp,
+                            cm_user_t *userp, cm_req_t *reqp);
+
 extern int cm_ExpandSysName(char *inp, char *outp, long outSize,
                             unsigned int sysNameIndex);
 
@@ -141,18 +145,43 @@ extern long cm_CheckNTDelete(cm_scache_t *dscp, cm_scache_t *scp,
 extern long cm_EvaluateSymLink(cm_scache_t *dscp, cm_scache_t *linkScp,
        cm_scache_t **outScpp, cm_user_t *userp, cm_req_t *reqp);
 
-extern long cm_Lock(cm_scache_t *scp, unsigned char LockType,
-       LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
-       u_long Timeout, cm_user_t *userp, cm_req_t *reqp,
-       void **lockpp);
+extern long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
+        LARGE_INTEGER LOffset, LARGE_INTEGER LLength, cm_key_t key,
+       int allowWait, cm_user_t *userp, cm_req_t *reqp,
+       cm_file_lock_t **lockpp);
+
+#define CM_UNLOCK_BY_FID 1
 
-extern long cm_Unlock(cm_scache_t *scp, unsigned char LockType,
-       LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
+extern long cm_UnlockByKey(cm_scache_t * scp,
+        cm_key_t key,
+        int flags,
+        cm_user_t * userp,
+        cm_req_t * reqp);
+
+extern long cm_Unlock(cm_scache_t *scp, unsigned char sLockType,
+        LARGE_INTEGER LOffset, LARGE_INTEGER LLength, cm_key_t key,
        cm_user_t *userp, cm_req_t *reqp);
 
+extern long cm_LockCheckRead(cm_scache_t *scp, 
+        LARGE_INTEGER LOffset, 
+        LARGE_INTEGER LLength, 
+        cm_key_t key);
+
+extern long cm_LockCheckWrite(cm_scache_t *scp,
+        LARGE_INTEGER LOffset,
+        LARGE_INTEGER LLength,
+        cm_key_t key);
+
 extern void cm_CheckLocks();
 
-extern long cm_RetryLock(cm_file_lock_t *oldFileLock, int vcp_is_dead);
+extern long cm_RetryLock(cm_file_lock_t *oldFileLock, int client_is_dead);
+
+#define CM_SESSION_SMB      0xffff
+#define CM_SESSION_IFS      0xfffe
+#define CM_SESSION_CMINT    0xfffd
+#define CM_SESSION_RESERVED 0xfff0
+
+extern cm_key_t cm_GenerateKey(unsigned int session, unsigned long process_id, unsigned int file_id);
 
 #define MAX_SYMLINK_COUNT 16
 #endif /*  __CM_VNODEOPS_H_ENV__ */