Rework cache store back
[openafs.git] / src / afs / afs.h
index c03c9ca..7659983 100644 (file)
@@ -1083,9 +1083,6 @@ struct buffer {
   char lockers;
   char dirty;
   char hashIndex;
-#if defined(AFS_USEBUFFERS)
-  struct buf *bufp;
-#endif
   afs_rwlock_t lock;          /* the lock for this structure */
 };
 
@@ -1359,6 +1356,16 @@ extern struct brequest afs_brs[NBRS];    /* request structures */
 struct buf;
 #endif
 
+struct rxfs_storeVariables {
+    struct rx_call *call;
+    struct vcache *vcache;
+    char *tbuffer;
+    struct iovec *tiov;
+    afs_int32 tnio;
+    afs_int32 hasNo64bit;
+    struct AFSStoreStatus InStatus;
+};
+
 struct storeOps {
     int (*prepare)(void *rock, afs_uint32 size, afs_uint32 *bytestoxfer);
     int (*read)(void *rock, struct osi_file *tfile, afs_uint32 offset,
@@ -1369,6 +1376,8 @@ struct storeOps {
     int (*close)(void *rock, struct AFSFetchStatus *OutStatus,
         afs_int32 *doProcessFS);
     int (*destroy)(void **rock, afs_int32 error);
+    int (*storeproc)(struct storeOps *, void *, struct dcache *, int *,
+                    afs_size_t *);
 };
 
 struct fetchOps {
@@ -1399,7 +1408,12 @@ extern int afsd_dynamic_vcaches;
 #define afsd_dynamic_vcaches 0
 #endif
 
-/* Wrappers for access to credentials structure members */
+/*
+ * Wrappers for access to credentials structure members
+ * Linux uses the kernel cred structure if available, with the
+ * wrappers defined in LINUX/osi_machdep.h
+ */
+#if !(defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_HAS_CRED))
 #define afs_cr_uid(cred) ((cred)->cr_uid)
 #define afs_cr_gid(cred) ((cred)->cr_gid)
 #define afs_cr_ruid(cred) ((cred)->cr_ruid)
@@ -1421,4 +1435,5 @@ static_inline void
 afs_set_cr_rgid(afs_ucred_t *cred, gid_t gid) {
     cred->cr_rgid = gid;
 }
+#endif
 #endif /* _AFS_H_ */