<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>SD Data Structures</TITLE> <META NAME="description" CONTENT="SD Data Structures"> <META NAME="keywords" CONTENT="developers"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="developers.css"> <LINK REL="previous" HREF="SD_Connections_Sessions.html"> <LINK REL="up" HREF="Storage_Daemon_Design.html"> <LINK REL="next" HREF="Catalog_Services.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html982" HREF="Catalog_Services.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html976" HREF="Storage_Daemon_Design.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html972" HREF="SD_Connections_Sessions.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html978" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html980" HREF="GNU_Free_Documentation_Lice.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html983" HREF="Catalog_Services.html">Catalog Services</A> <B> Up:</B> <A NAME="tex2html977" HREF="Storage_Daemon_Design.html">Storage Daemon Design</A> <B> Previous:</B> <A NAME="tex2html973" HREF="SD_Connections_Sessions.html">SD Connections and Sessions</A> <B> <A NAME="tex2html979" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html981" HREF="GNU_Free_Documentation_Lice.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00940000000000000000"></A> <A NAME="2249"></A> <BR> SD Data Structures </H1> <P> In the Storage daemon, there is a Device resource (i.e. from conf file) that describes each physical device. When the physical device is used it is controled by the DEVICE structure (defined in dev.h), and typically refered to as dev in the C++ code. Anyone writing or reading a physical device must ultimately get a lock on the DEVICE structure - this controls the device. However, multiple Jobs (defined by a JCR structure src/jcr.h) can be writing a physical DEVICE at the same time (of course they are sequenced by locking the DEVICE structure). There are a lot of job dependent "device" variables that may be different for each Job such as spooling (one job may spool and another may not, and when a job is spooling, it must have an i/o packet open, each job has its own record and block structures, ...), so there is a device control record or DCR that is the primary way of interfacing to the physical device. The DCR contains all the job specific data as well as a pointer to the Device resource (DEVRES structure) and the physical DEVICE structure. <P> Now if a job is writing to two devices (it could be writing two separate streams to the same device), it must have two DCRs. Today, the code only permits one. This won't be hard to change, but it is new code. <P> Today three jobs (threads), two physical devices each job writes to only one device: <P> <PRE> Job1 -> DCR1 -> DEVICE1 Job2 -> DCR2 -> DEVICE1 Job3 -> DCR3 -> DEVICE2 </PRE> <P> To be implemented three jobs, three physical devices, but job1 is writing simultaneously to three devices: <P> <PRE> Job1 -> DCR1 -> DEVICE1 -> DCR4 -> DEVICE2 -> DCR5 -> DEVICE3 Job2 -> DCR2 -> DEVICE1 Job3 -> DCR3 -> DEVICE2 Job = job control record DCR = Job contorl data for a specific device DEVICE = Device only control data </PRE> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html982" HREF="Catalog_Services.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html976" HREF="Storage_Daemon_Design.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html972" HREF="SD_Connections_Sessions.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html978" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html980" HREF="GNU_Free_Documentation_Lice.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html983" HREF="Catalog_Services.html">Catalog Services</A> <B> Up:</B> <A NAME="tex2html977" HREF="Storage_Daemon_Design.html">Storage Daemon Design</A> <B> Previous:</B> <A NAME="tex2html973" HREF="SD_Connections_Sessions.html">SD Connections and Sessions</A> <B> <A NAME="tex2html979" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html981" HREF="GNU_Free_Documentation_Lice.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-06-14 </ADDRESS> </BODY> </HTML>