00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 #include <linux/kernel.h>
00012 #include <asmlink.h>
00013 #include <linux/smp.h>
00014 #include <linux/sched.h>
00015 #include <asm/hw_irq.h>
00016 #include <asm/current.h>
00017 #include <system_data_cells.h>
00018 #include <internals.h>
00019 #include<queue.h>
00020 #include<ddtdef.h>
00021 #include<ucbdef.h>
00022 #include<irpdef.h>
00023 #include<ipldef.h>
00024 #include<wcbdef.h>
00025 #include<ssdef.h>
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 int ioc_std_mapvblk (unsigned int vbn, unsigned int numbytes, struct _wcb *wcb, struct _irp *irp, struct _ucb *ucb, unsigned int *lbn_p, unsigned *notmapped_p, struct _ucb **new_ucb_p) {
00040   struct _wcb * head=wcb;
00041   struct _wcb * tmp=head->wcb_l_wlfl;
00042   while (tmp!=head) {
00043     if (vbn>=tmp->wcb_l_stvbn && vbn<(tmp->wcb$l_stvbn+tmp->wcb$l_p1_count)) {
00044       *lbn_p=tmp->wcb_l_p1_lbn+(vbn-tmp->wcb$l_stvbn);
00045       return SS__NORMAL;
00046     }
00047     tmp=tmp->wcb_l_wlfl;
00048   }
00049   return 0;
00050 }
00051