sys/src/sysqioreq.c File Reference

QIO - TODO still more doc. More...

#include <linux/spinlock.h>
#include <asm/unistd.h>
#include <acbdef.h>
#include <aqbdef.h>
#include <cdrpdef.h>
#include <ddtdef.h>
#include <dyndef.h>
#include <fdtdef.h>
#include <ipl.h>
#include <internals.h>
#include <iodef.h>
#include <ipldef.h>
#include <irpdef.h>
#include <pridef.h>
#include <ssdef.h>
#include <starlet.h>
#include <system_data_cells.h>
#include <ucbdef.h>
#include <vcbdef.h>
#include <linux/vmalloc.h>
#include <linux/linkage.h>
#include <linux/kernel.h>
#include <asm/hw_irq.h>
#include "../../starlet/src/sysdep.h"
#include <exe_routines.h>
#include <misc_routines.h>
#include <sch_routines.h>
#include <ioc_routines.h>
#include <queue.h>
#include <linux/slab.h>

Go to the source code of this file.

Defines

#define MYDEB_IRP

Functions

void exe_qioqe2ppkt (struct _pcb *p, struct _irp *i)
void exe_qioqxqppkt (struct _pcb *p, struct _irp *i)
 initiating file system i/o for XQP ODS2 - see 5.2 22.2.3
void exe_insertirp (struct _ucb *u, struct _irp *i)
 insert irp in units queue - see 5.2 22.2.1
int exe_std_abortio (struct _irp *i, struct _pcb *p, struct _ucb *u, int qio_sts)
 abort i/o operation - see 5.2 21.6.3.2
void exe_altqueuepkt (void)
int exe_altquepkt (struct _irp *i, struct _pcb *p, struct _ucb *u)
 entering the driver's alternate start i/o routine - see 5.2 22.2.2
int exe_finishio (long status1, long status2, struct _irp *i, struct _pcb *p, struct _ucb *u)
 completing the i/o request in the fdt routine - see 5.2 21.6.3.3
int exe_finishioc (long status, struct _irp *i, struct _pcb *p, struct _ucb *u)
 completing the i/o request in the fdt routine - see 5.2 21.6.3.3
int exe_insioq (struct _irp *i, struct _ucb *u)
 insert irp in units queue - see 5.2 22.2.1
int sys_qio (unsigned int efn, unsigned short int chan, unsigned int func, struct _iosb *iosb, void(*astadr)(__unknown_params), long astprm, void *p1, long p2, long p3, long p4, long p5, long p6)
asmlinkage int exe_qiow (unsigned int efn, unsigned short int chan, unsigned int func, struct _iosb *iosb, void(*astadr)(__unknown_params), long astprm, void *p1, long p2, long p3, long p4, long p5, long p6)
asmlinkage int exe_qio (unsigned int efn, unsigned short int chan, unsigned int func, struct _iosb *iosb, void(*astadr)(__unknown_params), long astprm, void *p1, long p2, long p3, long p4, long p5, long p6)
 initiating device action - see 5.2 21.6.1
int exe_qioacppkt (struct _irp *i, struct _pcb *p, struct _ucb *u)
 initiating file system i/o - see 5.2 22.2.3
int exe_qiodrvpkt (struct _irp *i, struct _pcb *p, struct _ucb *u)
 entering the driver's start i/o routine - see 5.2 22.2.1
int exe_std_qiodrvpkt (struct _irp *i, struct _ucb *u)
 f11b_dispatch ()
 exttwo_dispatch ()
asmlinkage int exe_qiow_wrap (struct struct_qio *s)
 initiating file system i/o for XQP(?) EXT2
asmlinkage int exe_qio_wrap (struct struct_qio *s)


Detailed Description

QIO - TODO still more doc.

Author:
Roar Thronęs

Definition in file sysqioreq.c.


Define Documentation

#define MYDEB_IRP

Definition at line 44 of file sysqioreq.c.


Function Documentation

int exe_altquepkt ( struct _irp i,
struct _pcb *  p,
struct _ucb u 
)

entering the driver's alternate start i/o routine - see 5.2 22.2.2

Parameters:
i irp
p pcb
u ucb

forklock

smp stuff - MISSING

locate ddt_l_altstart

call it

unlock fork

Definition at line 111 of file sysqioreq.c.

References _ddt::ddt_l_altstart, forklock(), forkunlock(), SS__NORMAL, _ucb::ucb_b_flck, and _ucb::ucb_l_ddt.

void exe_altqueuepkt ( void   ) 

Definition at line 102 of file sysqioreq.c.

int exe_finishio ( long  status1,
long  status2,
struct _irp i,
struct _pcb *  p,
struct _ucb u 
)

completing the i/o request in the fdt routine - see 5.2 21.6.3.3

Parameters:
status1 
status2 
i irp
p pcb
u ucb

incr ucb operation count - MISSING

store statuses in irp iost/media

do forklock

insert irp in cpu's postprocessing queue. TODO check if only for the primary cpu

unlock forklock

set ipl 0

SS__NORMAL for QIO return value

Definition at line 138 of file sysqioreq.c.

References forklock(), forkunlock(), _irp::irp_l_iost1, _irp::irp_l_iost2, smp_gl_cpu_data, SS__NORMAL, and _ucb::ucb_b_flck.

Referenced by exe_finishioc(), and mb_fdt_sensemode().

int exe_finishioc ( long  status,
struct _irp i,
struct _pcb *  p,
struct _ucb u 
)

completing the i/o request in the fdt routine - see 5.2 21.6.3.3

Parameters:
status 
i irp
p pcb
u ucb

just go to finish io

Definition at line 164 of file sysqioreq.c.

References exe_finishio().

Referenced by mb_fdt_read(), mb_fdt_setmode(), and mb_fdt_write().

void exe_insertirp ( struct _ucb u,
struct _irp i 
)

insert irp in units queue - see 5.2 22.2.1

Parameters:
u unit cb
i irp

find right pri

insert at that pri

Definition at line 60 of file sysqioreq.c.

References _irp::irp_b_pri, _irp::irp_l_ioqfl, and _ucb::ucb_l_ioqfl.

Referenced by exe_insioq().

int exe_insioq ( struct _irp i,
struct _ucb u 
)

insert irp in units queue - see 5.2 22.2.1

Parameters:
i irp
u ucb unit

forklock and raise ipl

if unit busy, just insert

else mark busy and initiate i/o

restore ipl

release fork lock

Definition at line 175 of file sysqioreq.c.

References exe_insertirp(), forklock(), forkunlock(), ioc_initiate(), SS__NORMAL, _ucb::ucb_b_flck, and _ucb::ucb_l_sts.

Referenced by exe_qiodrvpkt().

asmlinkage int exe_qio ( unsigned int  efn,
unsigned short int  chan,
unsigned int  func,
struct _iosb iosb,
void(*)(__unknown_params)  astadr,
long  astprm,
void *  p1,
long  p2,
long  p3,
long  p4,
long  p5,
long  p6 
)

initiating device action - see 5.2 21.6.1

Parameters:
efn event flag
chan i/o channel
func function
iosb i/o status block
astadr ast routine
astprm ast parameter
p1-p6 

clear event flag

verify channel number TODO redo

access mode check - MISSING

access or deaccess pending in ccb_l_wind stuff - MISSING

device spooled stuff - MISSING

access check verify - MISSING

check fdt mask to get buffer or whatever type - MISSING TODO check

check func code legality - MISSING

some check for offline device - MISSING

if iosb nonzero check iosb writeable - TODO redo

raise ipl

check proc quota - MISSING

allocate irp

initialize irp

do not set bufio if function code does not say buffered - MISSING

set quota bit - MISSING

if astadr nonzero charge quota - MISSING

if ccb_l_wind nonzero store in irp - MISSING

ccb increase outstanding i/o count - MISSING

some more device access checks - MISSING

diagnostic buffer - MISSING

do preprocessing - MISSING TODO check it

TODO does it do one or more functions

call i/o function

invoke event flag poster

if error, do abortio - MISSING

Definition at line 250 of file sysqioreq.c.

References _pcb, ctl_ga_ccb_table, ctl_gl_chindx, exe_clref(), exe_gl_abstim_tics, IPL__ASTDEL, _irp::irp_b_efn, _irp::irp_b_pri, _irp::irp_b_rmod, _irp::irp_b_type, _irp::irp_l_ast, _irp::irp_l_astprm, _irp::irp_l_func, _irp::irp_l_iosb, _irp::irp_l_pid, _irp::irp_l_qio_p1, _irp::irp_l_qio_p2, _irp::irp_l_qio_p3, _irp::irp_l_qio_p4, _irp::irp_l_qio_p5, _irp::irp_l_qio_p6, _irp::irp_l_sts, _irp::irp_l_ucb, _irp::irp_v_fcode, _irp::irp_v_fmod, _irp::irp_w_chan, _irp::irp_w_empty, kmalloc(), sch_postef(), and SS__ILLIOFUNC.

Referenced by exe_qio_wrap().

asmlinkage int exe_qio_wrap ( struct struct_qio s  ) 

int exe_qioacppkt ( struct _irp i,
struct _pcb *  p,
struct _ucb u 
)

initiating file system i/o - see 5.2 22.2.3

Parameters:
i irp
p pcb
u ucb unit

locate vcb

locate aqb

if pid zero use XQP

one temporary FreeVMS hacks in the if for ext2

insert irp into aqbs i/o queue

return if it was not empty before insert

spinlock and unlock TODO specified where?

invoke wakeup

TODO check ipl 0

TODO return val from sch_wake

Definition at line 365 of file sysqioreq.c.

References _aqb::aqb_l_acppid, _aqb::aqb_l_acpqfl, exe_qioqe2ppkt(), exe_qioqxqppkt(), IPL__SCHED, sch_wake(), SPIN_SCHED, SS__NORMAL, _ucb::ucb_l_vcb, and _vcb::vcb_l_aqb.

Referenced by acp_std_access(), acp_std_deaccess(), acp_std_modify(), acp_std_mount(), acp_std_readblk(), and acp_std_writeblk().

int exe_qiodrvpkt ( struct _irp i,
struct _pcb *  p,
struct _ucb u 
)

entering the driver's start i/o routine - see 5.2 22.2.1

Parameters:
i irp
p pcb
u ucb

insert irp in ucb

setipl 0

Definition at line 406 of file sysqioreq.c.

References exe_insioq(), and SS__NORMAL.

Referenced by acp_std_readblk(), acp_std_writeblk(), and exe_std_qiodrvpkt().

void exe_qioqe2ppkt ( struct _pcb *  p,
struct _irp i 
)

Referenced by exe_qioacppkt().

void exe_qioqxqppkt ( struct _pcb *  p,
struct _irp i 
)

initiating file system i/o for XQP ODS2 - see 5.2 22.2.3

Parameters:
i irp
p pcb

getting the xqp data area is not used anymore?

get address of dispatch routine and fill out acb

call sch_qast to queue ast

set ipl 0

Definition at line 428 of file sysqioreq.c.

References _acb::acb_b_rmod, _acb::acb_l_ast, _acb::acb_l_astprm, _acb::acb_l_pid, and sch_qast().

Referenced by exe_qioacppkt().

asmlinkage int exe_qiow ( unsigned int  efn,
unsigned short int  chan,
unsigned int  func,
struct _iosb iosb,
void(*)(__unknown_params)  astadr,
long  astprm,
void *  p1,
long  p2,
long  p3,
long  p4,
long  p5,
long  p6 
)

asmlinkage int exe_qiow_wrap ( struct struct_qio s  ) 

int exe_std_abortio ( struct _irp i,
struct _pcb *  p,
struct _ucb u,
int  qio_sts 
)

abort i/o operation - see 5.2 21.6.3.2

Parameters:
i irp
p pcb
u ucb
qio_sts 

acquire forklock etc

clear iosb

inc process ast quota if v_quota was set - MISSING

insert irp in cpu's postprocessing queue

request iopost softint

release forklock

set ipl 0 - MISSING

Definition at line 79 of file sysqioreq.c.

References forklock(), forkunlock(), _irp::irp_b_rmod, _irp::irp_l_iosb, smp_gl_cpu_data, and _ucb::ucb_b_flck.

Referenced by mb_fdt_read(), and mb_fdt_write().

int exe_std_qiodrvpkt ( struct _irp i,
struct _ucb u 
)

Definition at line 414 of file sysqioreq.c.

References exe_qiodrvpkt().

exttwo_dispatch (  ) 

f11b_dispatch (  ) 

int sys_qio ( unsigned int  efn,
unsigned short int  chan,
unsigned int  func,
struct _iosb iosb,
void(*)(__unknown_params)  astadr,
long  astprm,
void *  p1,
long  p2,
long  p3,
long  p4,
long  p5,
long  p6 
)

Definition at line 285 of file starlet.c.

Referenced by exe_qiow().


Generated on Fri Oct 9 10:26:04 2009 for FreeVMS by  doxygen 1.5.5