afs: Do not always ignore errors in afs_GetDSlot
[openafs.git] / src / afs / afs_chunkops.h
index df6b4e6..1a4d38b 100644 (file)
@@ -60,7 +60,7 @@ struct afs_cacheOps {
     int (*close) (struct osi_file * fp);
     int (*vreadUIO) (afs_dcache_id_t *, struct uio *);
     int (*vwriteUIO) (struct vcache *, afs_dcache_id_t *, struct uio *);
-    struct dcache *(*GetDSlot) (afs_int32 aslot);
+    struct dcache *(*GetDSlot) (afs_int32 aslot, int needvalid);
     struct volume *(*GetVolSlot) (void);
     int (*HandleLink) (struct vcache * avc, struct vrequest * areq);
 };
@@ -71,7 +71,8 @@ struct afs_cacheOps {
 #define        afs_CFileRead(file, offset, data, size) (*(afs_cacheType->fread))(file, offset, data, size)
 #define        afs_CFileWrite(file, offset, data, size) (*(afs_cacheType->fwrite))(file, offset, data, size)
 #define        afs_CFileClose(handle)          (*(afs_cacheType->close))(handle)
-#define        afs_GetDSlot(slot)              (*(afs_cacheType->GetDSlot))(slot)
+#define        afs_GetValidDSlot(slot) (*(afs_cacheType->GetDSlot))(slot, 1)
+#define        afs_GetNewDSlot(slot)   (*(afs_cacheType->GetDSlot))(slot, 0)
 #define        afs_GetVolSlot()                (*(afs_cacheType->GetVolSlot))()
 #define        afs_HandleLink(avc, areq)       (*(afs_cacheType->HandleLink))(avc, areq)