summaryrefslogtreecommitdiff
path: root/ufs/mapbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ufs/mapbuf.c')
-rw-r--r--ufs/mapbuf.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/ufs/mapbuf.c b/ufs/mapbuf.c
index a323bdbc..edf432a5 100644
--- a/ufs/mapbuf.c
+++ b/ufs/mapbuf.c
@@ -21,13 +21,16 @@
#include "ufs.h"
-#define MAXMAPMEM (1024 * 1024 * 1024) /* one Gb */
+struct mapbuf *mblist;
+spin_lock_t mblistlock = SPIN_LOCK_INITIALIZER;
-struct mapbuf
+struct mapbuf *
+map_region (vm_offset_t diskloc, vm_size_t length)
{
- vm_size_t length;
- vm_offset_t diskaddr;
-};
+ struct mapbuf *mb;
+
+ /* Check to see if we are already mapping this region */
+ spin_lock (&mblistlock);
+ for (mb = mblist; mb; mb = mb->next)
+ {
-void *
-map_region