%!
%%BoundingBox: (atend)
%%Pages: (atend)
%%DocumentFonts: (atend)
%%EndComments
%
% FrameMaker PostScript Prolog 3.0, for use with FrameMaker 3.0
% Copyright (c) 1986,87,89,90,91 by Frame Technology Corporation.
% All rights reserved.
%
% Known Problems:
% Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1
/FMversion (3.0) def
% Set up Color vs. Black-and-White
/FMPrintInColor systemdict /colorimage known
systemdict /currentcolortransfer known or def
% Uncomment this line to force b&w on color printer
% /FMPrintInColor false def
/FrameDict 295 dict def
systemdict /errordict known not {/errordict 10 dict def
errordict /rangecheck {stop} put} if
% The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk
FrameDict /tmprangecheck errordict /rangecheck get put
errordict /rangecheck {FrameDict /bug true put} put
FrameDict /bug false put
mark
% Some PS machines read past the CR, so keep the following 3 lines together!
currentfile 5 string readline
00
0000000000
cleartomark
errordict /rangecheck FrameDict /tmprangecheck get put
FrameDict /bug get {
/readline {
/gstring exch def
/gfile exch def
/gindex 0 def
{
gfile read pop
dup 10 eq {exit} if
dup 13 eq {exit} if
gstring exch gindex exch put
/gindex gindex 1 add def
} loop
pop
gstring 0 gindex getinterval true
} def
} if
/FMVERSION {
FMversion ne {
/Times-Roman findfont 18 scalefont setfont
100 100 moveto
(FrameMaker version does not match postscript_prolog!)
dup =
show showpage
} if
} def
/FMLOCAL {
FrameDict begin
0 def
end
} def
/gstring FMLOCAL
/gfile FMLOCAL
/gindex FMLOCAL
/orgxfer FMLOCAL
/orgproc FMLOCAL
/organgle FMLOCAL
/orgfreq FMLOCAL
/yscale FMLOCAL
/xscale FMLOCAL
/manualfeed FMLOCAL
/paperheight FMLOCAL
/paperwidth FMLOCAL
/FMDOCUMENT {
array /FMfonts exch def
/#copies exch def
FrameDict begin
0 ne dup {setmanualfeed} if
/manualfeed exch def
/paperheight exch def
/paperwidth exch def
/yscale exch def
/xscale exch def
currenttransfer cvlit /orgxfer exch def
currentscreen cvlit /orgproc exch def
/organgle exch def /orgfreq exch def
setpapername
manualfeed {true} {papersize} ifelse
{manualpapersize} {false} ifelse
{desperatepapersize} if
end
} def
/pagesave FMLOCAL
/orgmatrix FMLOCAL
/landscape FMLOCAL
/FMBEGINPAGE {
FrameDict begin
/pagesave save def
3.86 setmiterlimit
/landscape exch 0 ne def
landscape {
90 rotate 0 exch neg translate pop
}
{pop pop}
ifelse
xscale yscale scale
/orgmatrix matrix def
gsave
} def
/FMENDPAGE {
grestore
pagesave restore
end
showpage
} def
/FMFONTDEFINE {
FrameDict begin
findfont
ReEncode
1 index exch
definefont
FMfonts 3 1 roll
put
end
} def
/FMFILLS {
FrameDict begin
array /fillvals exch def
end
} def
/FMFILL {
FrameDict begin
fillvals 3 1 roll put
end
} def
/FMNORMALIZEGRAPHICS {
newpath
0.0 0.0 moveto
1 setlinewidth
0 setlinecap
0 0 0 sethsbcolor
0 setgray
} bind def
/fx FMLOCAL
/fy FMLOCAL
/fh FMLOCAL
/fw FMLOCAL
/llx FMLOCAL
/lly FMLOCAL
/urx FMLOCAL
/ury FMLOCAL
/FMBEGINEPSF {
end
/FMEPSF save def
/showpage {} def
FMNORMALIZEGRAPHICS
[/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
fx fy translate
rotate
fw urx llx sub div fh ury lly sub div scale
llx neg lly neg translate
} bind def
/FMENDEPSF {
FMEPSF restore
FrameDict begin
} bind def
FrameDict begin
/setmanualfeed {
%%BeginFeature *ManualFeed True
statusdict /manualfeed true put
%%EndFeature
} def
/max {2 copy lt {exch} if pop} bind def
/min {2 copy gt {exch} if pop} bind def
/inch {72 mul} def
/pagedimen {
paperheight sub abs 16 lt exch
paperwidth sub abs 16 lt and
{/papername exch def} {pop} ifelse
} def
/papersizedict FMLOCAL
/setpapername {
/papersizedict 14 dict def
papersizedict begin
/papername /unknown def
/Letter 8.5 inch 11.0 inch pagedimen
/LetterSmall 7.68 inch 10.16 inch pagedimen
/Tabloid 11.0 inch 17.0 inch pagedimen
/Ledger 17.0 inch 11.0 inch pagedimen
/Legal 8.5 inch 14.0 inch pagedimen
/Statement 5.5 inch 8.5 inch pagedimen
/Executive 7.5 inch 10.0 inch pagedimen
/A3 11.69 inch 16.5 inch pagedimen
/A4 8.26 inch 11.69 inch pagedimen
/A4Small 7.47 inch 10.85 inch pagedimen
/B4 10.125 inch 14.33 inch pagedimen
/B5 7.16 inch 10.125 inch pagedimen
end
} def
/papersize {
papersizedict begin
/Letter {lettertray letter} def
/LetterSmall {lettertray lettersmall} def
/Tabloid {11x17tray 11x17} def
/Ledger {ledgertray ledger} def
/Legal {legaltray legal} def
/Statement {statementtray statement} def
/Executive {executivetray executive} def
/A3 {a3tray a3} def
/A4 {a4tray a4} def
/A4Small {a4tray a4small} def
/B4 {b4tray b4} def
/B5 {b5tray b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
/FMdicttop countdictstack 1 add def
statusdict begin stopped end
countdictstack -1 FMdicttop {pop end} for
} def
/manualpapersize {
papersizedict begin
/Letter {letter} def
/LetterSmall {lettersmall} def
/Tabloid {11x17} def
/Ledger {ledger} def
/Legal {legal} def
/Statement {statement} def
/Executive {executive} def
/A3 {a3} def
/A4 {a4} def
/A4Small {a4small} def
/B4 {b4} def
/B5 {b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
stopped
} def
/desperatepapersize {
statusdict /setpageparams known
{
paperwidth paperheight 0 1
statusdict begin
{setpageparams} stopped pop
end
} if
} def
/savematrix {
orgmatrix currentmatrix pop
} bind def
/restorematrix {
orgmatrix setmatrix
} bind def
/dmatrix matrix def
/dpi 72 0 dmatrix defaultmatrix dtransform
dup mul exch dup mul add sqrt def
/freq dpi 18.75 div 8 div round dup 0 eq {pop 1} if 8 mul dpi exch div def
/sangle 1 0 dmatrix defaultmatrix dtransform exch atan def
/DiacriticEncoding [
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl
/numbersign /dollar /percent /ampersand /quotesingle /parenleft
/parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
/two /three /four /five /six /seven /eight /nine /colon /semicolon
/less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K
/L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash
/bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h
/i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar
/braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute
/Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis
/atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis
/iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve
/ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex
/udieresis /dagger /.notdef /cent /sterling /section /bullet
/paragraph /germandbls /registered /copyright /trademark /acute
/dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef
/yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown
/exclamdown /logicalnot /.notdef /florin /.notdef /.notdef
/guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde
/Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright
/quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis
/fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl
/periodcentered /quotesinglbase /quotedblbase /perthousand
/Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute
/Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve
/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron
/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
] def
/ReEncode {
dup
length
dict begin
{
1 index /FID ne
{def}
{pop pop} ifelse
} forall
0 eq {/Encoding DiacriticEncoding def} if
currentdict
end
} bind def
/graymode true def
/bwidth FMLOCAL
/bpside FMLOCAL
/bstring FMLOCAL
/onbits FMLOCAL
/offbits FMLOCAL
/xindex FMLOCAL
/yindex FMLOCAL
/x FMLOCAL
/y FMLOCAL
/setpattern {
/bwidth exch def
/bpside exch def
/bstring exch def
/onbits 0 def /offbits 0 def
freq sangle landscape {90 add} if
{/y exch def
/x exch def
/xindex x 1 add 2 div bpside mul cvi def
/yindex y 1 add 2 div bpside mul cvi def
bstring yindex bwidth mul xindex 8 idiv add get
1 7 xindex 8 mod sub bitshift and 0 ne
{/onbits onbits 1 add def 1}
{/offbits offbits 1 add def 0}
ifelse
}
setscreen
{} settransfer
offbits offbits onbits add div FMsetgray
/graymode false def
} bind def
/grayness {
FMsetgray
graymode not {
/graymode true def
orgxfer cvx settransfer
orgfreq organgle orgproc cvx setscreen
} if
} bind def
/HUE FMLOCAL
/SAT FMLOCAL
/BRIGHT FMLOCAL
/Colors FMLOCAL
FMPrintInColor
{
/HUE 0 def
/SAT 0 def
/BRIGHT 0 def
% array of arrays Hue and Sat values for the separations [HUE BRIGHT]
/Colors
[[0 0 ] % black
[0 0 ] % white
[0.00 1.0] % red
[0.37 1.0] % green
[0.60 1.0] % blue
[0.50 1.0] % cyan
[0.83 1.0] % magenta
[0.16 1.0] % comment / yellow
] def
/BEGINBITMAPCOLOR {
BITMAPCOLOR} def
/BEGINBITMAPCOLORc {
BITMAPCOLORc} def
/BEGINBITMAPTRUECOLOR {
BITMAPTRUECOLOR } def
/BEGINBITMAPTRUECOLORc {
BITMAPTRUECOLORc } def
/K {
Colors exch get dup
0 get /HUE exch store
1 get /BRIGHT exch store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
{HUE SAT BRIGHT sethsbcolor}
ifelse
} def
/FMsetgray {
/SAT exch 1.0 exch sub store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
{HUE SAT BRIGHT sethsbcolor}
ifelse
} bind def
}
{
/BEGINBITMAPCOLOR {
BITMAPGRAY} def
/BEGINBITMAPCOLORc {
BITMAPGRAYc} def
/BEGINBITMAPTRUECOLOR {
BITMAPTRUEGRAY } def
/BEGINBITMAPTRUECOLORc {
BITMAPTRUEGRAYc } def
/FMsetgray {setgray} bind def
/K {
pop
} def
}
ifelse
/normalize {
transform round exch round exch itransform
} bind def
/dnormalize {
dtransform round exch round exch idtransform
} bind def
/lnormalize {
0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop
} bind def
/H {
lnormalize setlinewidth
} bind def
/Z {
setlinecap
} bind def
/fillvals FMLOCAL
/X {
fillvals exch get
dup type /stringtype eq
{8 1 setpattern}
{grayness}
ifelse
} bind def
/V {
gsave eofill grestore
} bind def
/N {
stroke
} bind def
/M {newpath moveto} bind def
/E {lineto} bind def
/D {curveto} bind def
/O {closepath} bind def
/n FMLOCAL
/L {
/n exch def
newpath
normalize
moveto
2 1 n {pop normalize lineto} for
} bind def
/Y {
L
closepath
} bind def
/x1 FMLOCAL
/x2 FMLOCAL
/y1 FMLOCAL
/y2 FMLOCAL
/rad FMLOCAL
/R {
/y2 exch def
/x2 exch def
/y1 exch def
/x1 exch def
x1 y1
x2 y1
x2 y2
x1 y2
4 Y
} bind def
% The following commented out code did not work for tangent lines of zero
% length. The code following it was provided by Frame to patch this error.
%
%/RR {
% /rad exch def
% normalize
% /y2 exch def
% /x2 exch def
% normalize
% /y1 exch def
% /x1 exch def
% newpath
% x1 y1 rad add moveto
% x1 y2 x2 y2 rad arcto
% x2 y2 x2 y1 rad arcto
% x2 y1 x1 y1 rad arcto
% x1 y1 x1 y2 rad arcto
% closepath
% 16 {pop} repeat
% } bind def
/rarc
{rad
{arcto} stopped
} bind def
/RR {
/rad exch def
normalize
/y2 exch def
/x2 exch def
normalize
/y1 exch def
/x1 exch def
mark
newpath
x1 y1 rad add moveto
x1 y2 x2 y2 rarc
x2 y2 x2 y1 rarc
x2 y1 x1 y1 rarc
% x2 y1 x1 y1 rarc
x1 y1 x1 y2 rarc
closepath
cleartomark
} bind def
/C {
grestore
gsave
R
clip
} bind def
/FMpointsize FMLOCAL
/F {
FMfonts exch get
FMpointsize scalefont
setfont
} bind def
/Q {
/FMpointsize exch def
F
} bind def
/T {
moveto show
} bind def
/RF {
rotate
0 ne {-1 1 scale} if
} bind def
/TF {
gsave
moveto
RF
show
grestore
} bind def
/P {
moveto
0 32 3 2 roll widthshow
} bind def
/PF {
gsave
moveto
RF
0 32 3 2 roll widthshow
grestore
} bind def
/S {
moveto
0 exch ashow
} bind def
/SF {
gsave
moveto
RF
0 exch ashow
grestore
} bind def
/B {
moveto
0 32 4 2 roll 0 exch awidthshow
} bind def
/BF {
gsave
moveto
RF
0 32 4 2 roll 0 exch awidthshow
grestore
} bind def
/G {
gsave
newpath
normalize translate 0.0 0.0 moveto
dnormalize scale
0.0 0.0 1.0 5 3 roll arc
closepath fill
grestore
} bind def
/A {
gsave
savematrix
newpath
2 index 2 div add exch 3 index 2 div sub exch
normalize 2 index 2 div sub exch 3 index 2 div add exch
translate
scale
0.0 0.0 1.0 5 3 roll arc
restorematrix
stroke
grestore
} bind def
/x FMLOCAL
/y FMLOCAL
/w FMLOCAL
/h FMLOCAL
/xx FMLOCAL
/yy FMLOCAL
/ww FMLOCAL
/hh FMLOCAL
/FMsaveobject FMLOCAL
/FMoptop FMLOCAL
/FMdicttop FMLOCAL
/BEGINPRINTCODE {
/FMdicttop countdictstack 1 add def
/FMoptop count 4 sub def
/FMsaveobject save def
userdict begin
/showpage {} def
FMNORMALIZEGRAPHICS
3 index neg 3 index neg translate
} bind def
/ENDPRINTCODE {
count -1 FMoptop {pop pop} for
countdictstack -1 FMdicttop {pop end} for
FMsaveobject restore
} bind def
/gn {
0
{ 46 mul
cf read pop
32 sub
dup 46 lt {exit} if
46 sub add
} loop
add
} bind def
/str FMLOCAL
/cfs {
/str sl string def
0 1 sl 1 sub {str exch val put} for
str def
} bind def
/ic [
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0
{0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx}
{10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx}
{19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}
{13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh}
{4 wh} {5 wh} {6 wh} {7 wh} {8 wh} {9 wh} {10 wh} {11 wh} {12 wh}
{13 wh} {14 wh} {gn wh} {0 bl} {1 bl} {2 bl} {3 bl} {4 bl} {5 bl} {6 bl}
{7 bl} {8 bl} {9 bl} {10 bl} {11 bl} {12 bl} {13 bl} {14 bl} {gn bl}
{0 fl} {1 fl} {2 fl} {3 fl} {4 fl} {5 fl} {6 fl} {7 fl} {8 fl} {9 fl}
{10 fl} {11 fl} {12 fl} {13 fl} {14 fl} {gn fl}
] def
/sl FMLOCAL
/val FMLOCAL
/ws FMLOCAL
/im FMLOCAL
/bs FMLOCAL
/cs FMLOCAL
/len FMLOCAL
/pos FMLOCAL
/ms {
/sl exch def
/val 255 def
/ws cfs
/im cfs
/val 0 def
/bs cfs
/cs cfs
} bind def
400 ms
/cip {
is
0
cf cs readline pop
{ ic exch get exec
add
} forall
pop
/tot w 1 sub def
0 1 tot {
/indx exch def
/indxa is indx get def
/placer nredt indxa get def
/placeg ngreent indxa get def
/placeb nbluet indxa get def
cris indx placer 255 mul cvi put
cgis indx placeg 255 mul cvi put
cbis indx placeb 255 mul cvi put
} for pop cris
} bind def
/ip {
is
0
cf cs readline pop
{ ic exch get exec
add
} forall
pop
} bind def
/wh {
/len exch def
/pos exch def
ws 0 len getinterval im pos len getinterval copy pop
pos len
} bind def
/bl {
/len exch def
/pos exch def
bs 0 len getinterval im pos len getinterval copy pop
pos len
} bind def
/s1 1 string def
/fl {
/len exch def
/pos exch def
/val cf s1 readhexstring pop 0 get def
pos 1 pos len add 1 sub {im exch val put} for
pos len
} bind def
/hx {
3 copy getinterval
cf exch readhexstring pop pop
} bind def
/h FMLOCAL
/w FMLOCAL
/d FMLOCAL
/lb FMLOCAL
/bitmapsave FMLOCAL
/is FMLOCAL
/cf FMLOCAL
/wbytes {
dup
8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse
} bind def
/BEGINBITMAPBWc {
1 {} COMMONBITMAPc
} bind def
/BEGINBITMAPGRAYc {
8 {} COMMONBITMAPc
} bind def
/BEGINBITMAP2BITc {
2 {} COMMONBITMAPc
} bind def
/COMMONBITMAPc {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
r
/is im 0 lb getinterval def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{ip} image
bitmapsave restore
grestore
} bind def
/BEGINBITMAPBW {
1 {} COMMONBITMAP
} bind def
/BEGINBITMAPGRAY {
8 {} COMMONBITMAP
} bind def
/BEGINBITMAP2BIT {
2 {} COMMONBITMAP
} bind def
/COMMONBITMAP {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
r
/is w d wbytes string def
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop} image
bitmapsave restore
grestore
} bind def
/proc1 FMLOCAL
/proc2 FMLOCAL
/newproc FMLOCAL
/Fmcc {
/proc2 exch cvlit def
/proc1 exch cvlit def
/newproc proc1 length proc2 length add array def
newproc 0 proc1 putinterval
newproc proc1 length proc2 putinterval
newproc cvx
} bind def
/ngrayt 256 array def
/nredt 256 array def
/nbluet 256 array def
/ngreent 256 array def
/gryt FMLOCAL
/blut FMLOCAL
/grnt FMLOCAL
/redt FMLOCAL
/indx FMLOCAL
/cynu FMLOCAL
/magu FMLOCAL
/yelu FMLOCAL
/k FMLOCAL
/u FMLOCAL
/colorsetup {
currentcolortransfer
/gryt exch def
/blut exch def
/grnt exch def
/redt exch def
0 1 255 {
/indx exch def
/cynu 1 red indx get 255 div sub def
/magu 1 green indx get 255 div sub def
/yelu 1 blue indx get 255 div sub def
/k cynu magu min yelu min def
nredt indx 1 0 cynu max sub redt exec put
ngreent indx 1 0 magu max sub grnt exec put
nbluet indx 1 0 yelu max sub blut exec put
ngrayt indx 1 k sub gryt exec put
} for
} bind def
/tran FMLOCAL
/fakecolorsetup {
/tran 256 string def
0 1 255 {/indx exch def
tran indx
red indx get 77 mul
green indx get 151 mul
blue indx get 28 mul
add add 256 idiv put} for
currenttransfer
{255 mul cvi tran exch get 255.0 div}
exch Fmcc settransfer
} bind def
/BITMAPCOLOR {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
colorsetup
/is w d wbytes string def
/ris w d wbytes string def
/gis w d wbytes string def
/bis w d wbytes string def
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop
/tot w 1 sub def
0 1 tot {
/indx exch def
/indxa is indx get def
/placer nredt indxa get def
/placeg ngreent indxa get def
/placeb nbluet indxa get def
ris indx placer 255 mul cvi put
gis indx placeg 255 mul cvi put
bis indx placeb 255 mul cvi put
} for pop ris}
{gis} {bis} true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPCOLORc {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
colorsetup
/is im 0 lb getinterval def
/cris lb string def
/cgis lb string def
/cbis lb string def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cip} {cgis} {cbis} true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPTRUECOLORc {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/is w string def
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ip} {gip} {bip} true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPTRUECOLOR {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/is w string def
/gis w string def
/bis w string def
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop }
{ cf gis readhexstring pop }
{ cf bis readhexstring pop }
true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPTRUEGRAYc {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/is w string def
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ip gip bip w gray} image
bitmapsave restore
grestore
} bind def
/ww FMLOCAL
/r FMLOCAL
/g FMLOCAL
/b FMLOCAL
/i FMLOCAL
/gray {
/ww exch def
/b exch def
/g exch def
/r exch def
0 1 ww 1 sub { /i exch def r i get .299 mul g i get .587 mul
b i get .114 mul add add r i 3 -1 roll floor cvi put } for
r
} bind def
/BITMAPTRUEGRAY {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/is w string def
/gis w string def
/bis w string def
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop
cf gis readhexstring pop
cf bis readhexstring pop w gray} image
bitmapsave restore
grestore
} bind def
/BITMAPGRAY {
8 {fakecolorsetup} COMMONBITMAP
} bind def
/BITMAPGRAYc {
8 {fakecolorsetup} COMMONBITMAPc
} bind def
/ENDBITMAP {
} bind def
end
/ALDsave FMLOCAL
/ALDmatrix matrix def ALDmatrix currentmatrix pop
/StartALD {
/ALDsave save def
savematrix
ALDmatrix setmatrix
} bind def
/InALD {
restorematrix
} bind def
/DoneALD {
ALDsave restore
} bind def
%%EndProlog
%%BeginSetup
(3.0) FMVERSION
1 1 612 792 0 1 8 FMDOCUMENT
0 0 /Palatino-Roman FMFONTDEFINE
1 0 /Times-Roman FMFONTDEFINE
2 0 /Times-Bold FMFONTDEFINE
32 FMFILLS
0 0 FMFILL
1 0.1 FMFILL
2 0.3 FMFILL
3 0.5 FMFILL
4 0.7 FMFILL
5 0.9 FMFILL
6 0.97 FMFILL
7 1 FMFILL
8 <0f1e3c78f0e1c387> FMFILL
9 <0f87c3e1f0783c1e> FMFILL
10 <cccccccccccccccc> FMFILL
11 <ffff0000ffff0000> FMFILL
12 <8142241818244281> FMFILL
13 <03060c183060c081> FMFILL
14 <8040201008040201> FMFILL
16 1 FMFILL
17 0.9 FMFILL
18 0.7 FMFILL
19 0.5 FMFILL
20 0.3 FMFILL
21 0.1 FMFILL
22 0.03 FMFILL
23 0 FMFILL
24 <f0e1c3870f1e3c78> FMFILL
25 <f0783c1e0f87c3e1> FMFILL
26 <3333333333333333> FMFILL
27 <0000ffff0000ffff> FMFILL
28 <7ebddbe7e7dbbd7e> FMFILL
29 <fcf9f3e7cf9f3f7e> FMFILL
30 <7fbfdfeff7fbfdfe> FMFILL
%%EndSetup
%%Page: "1" 1
%%BeginPaperSize: Letter
%%EndPaperSize
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(1) 500 42.62 T
1 24 Q
(xFS T) 168.51 704 T
(ransaction Mechanism) 226.99 704 T
2 12 Q
(Adam Sweeney) 266.86 664 T
2 16 Q
(1.0 Intr) 72 621.33 T
(oduction) 127.23 621.33 T
1 12 Q
0.42 (This document describes the transaction model to be used by xFS. It also speci\336es the interfaces) 72 594 P
0.19 (exported to support this model. The model must support transactional updates of both \336le system) 72 580 P
0.37 (meta data and user data. It should provide a clean, ef) 72 566 P
0.37 (\336cient interface to the logging and recovery) 327.94 566 P
0.89 (mechanisms provided by the log management code. This mechanism must also be cleanly inte-) 72 552 P
(grated with the system buf) 72 538 T
(fer cache code.) 199.03 538 T
1.38 (The xFS transaction mechanism will consist of a set of routines and data structures forming a) 72 512 P
0.16 (layer above the buf) 72 498 P
0.16 (fer cache, inode management, and logging interfaces. It will manage the lock-) 164.52 498 P
0.56 (ing of resources and the necessary ordering of writing changed resources back to disk. This will) 72 484 P
0.28 (be done with interfaces very similar to traditional buf) 72 470 P
0.28 (fer and inode managment interfaces as well) 329.83 470 P
(as a few new) 72 456 T
(, transaction-speci\336c routines.) 133.49 456 T
2 16 Q
(2.0 The Model) 72 415.33 T
1 12 Q
-0.1 (The xFS transaction model will support image and a limited form of operation logging. Operation) 72 388 P
-0.02 (logging, however) 72 374 P
-0.02 (, will be used only when image logging is insuf) 155.44 374 P
-0.02 (\336cient or overly cumbersome for) 382.21 374 P
-0.25 (the required operation. The reason image logging will be the preferred mechanism is that it is sim-) 72 360 P
0.64 (pler to implement and use. The transaction model is most easily described by a general descrip-) 72 346 P
(tion of how it is used. This is outlined below) 72 332 T
(.) 285.11 332 T
2 14 Q
(2.1 The Steps of a T) 72 298.67 T
(ransaction) 192.63 298.67 T
2 12 Q
(Step 1 Allocate a T) 72 266 T
(ransaction) 170.72 266 T
1 F
0.18 (The \336rst step in performing a transaction is to allocate a transaction structure and unique transac-) 72 240 P
1.49 (tion identi\336er) 72 226 P
1.49 (. This structure will be used to track all of the important events and information) 137.79 226 P
0.33 (associated with an individual transaction. The transaction identi\336er will be used to tag all data in) 72 212 P
(the on disk log which are related to a given transaction.) 72 198 T
2 F
(Step 2 Reserve Log Space) 72 166 T
1 F
0.27 (Once a transaction has been allocated, log space for that transaction must be reserved. Log space) 72 140 P
0.57 (reservation is used to ensure that we never overrun the tail of the log. The transaction user must) 72 126 P
-0.16 (specify the maximum amount of log space that will be necessary to perform the given transaction.) 72 112 P
0.19 (When each transaction ensures that there is enough log space for it to commit before locking any) 72 98 P
0.14 (resources, we can avoid a very serious potential deadlock. The deadlock occurs when there is not) 72 84 P
0.11 (enough log space for an active transaction to commit, but the tail of the log cannot be moved for-) 72 70 P
FMENDPAGE
%%EndPage: "1" 2
%%Page: "2" 2
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(2) 500 42.62 T
1 12 Q
-0.09 (ward because the dirty resource logged at the tail which must be \337ushed to move the tail is locked) 72 712 P
1.28 (by the active transaction. By ensuring that each transaction will have enough space to commit) 72 698 P
(before allowing it to lock any resources we avoid this deadlock.) 72 684 T
0.42 (If the amount of free log space needed by a transaction is not currently available, the transaction) 72 658 P
-0.14 (will sleep until it becomes available or give up. Space will be freed up as transactions commit and) 72 644 P
1.18 (dirty resources are \337ushed out to disk. Determining the necessary amount of space for a given) 72 630 P
0.21 (transaction may be dif) 72 616 P
0.21 (\336cult, but we will just have to do so by looking at what can be logged by a) 179.33 616 P
(given transaction.) 72 602 T
2 F
(Step 3 Lock Resour) 72 570 T
(ces) 175.06 570 T
1 F
0.41 (Actually) 72 544 P
0.41 (, this step and the step below are intermingled by the transaction user) 112.53 544 P
0.41 (. This step consists) 448.16 544 P
0.72 (of calls to read in and lock resources such as buf) 72 530 P
0.72 (fers and inodes. Most transactions must follow) 311.48 530 P
0.08 (two phase locking, meaning that no resource locked as part of a transaction can be unlocked until) 72 516 P
0.24 (all resources to be locked as part of that transaction have been locked. That is, sequences such as) 72 502 P
-0.2 (lock A, unlock A, lock B are illegal. Also, no modi\336ed resource can be unlocked until the transac-) 72 488 P
-0.1 (tion has been committed to the in-core log. Once a transaction\325) 72 474 P
-0.1 (s modi\336cations have been commit-) 372.49 474 P
0.28 (ted to the in-core log, all resources locked by that transaction can be released. This is because all) 72 460 P
-0.09 (changes are being serialized by the log. Any change made to a resource after a previous change to) 72 446 P
(it has been logged will always appear to happen after the \336rst, which is the correct behavior) 72 432 T
(.) 510.67 432 T
1.5 (There are cases where an unmodi\336ed resource can be unlocked before some other resource is) 72 406 P
0.02 (locked by a transaction, but these are specialized cases. One occurs in tree locking where in some) 72 392 P
0.33 (cases a parent node may be unlocked once its child node is locked. The ability to take advantage) 72 378 P
(of such cases will be provided by the transaction mechanism, but we must take care in using it.) 72 364 T
2 F
(Step 4 Modify Resour) 72 332 T
(ces/Specify Operations) 186.38 332 T
1 F
-0.22 (Once a resource is locked as part of a transaction it can be modi\336ed. The parts of a resource which) 72 306 P
0.46 (are changed must be remembered so that they can be written to the log as part of the transaction) 72 292 P
(commit. A modi\336ed resource cannot be unlocked until the transaction commits.) 72 278 T
0.14 (The transaction user at this stage can also create transaction operation structures for use in opera-) 72 252 P
1.81 (tion logging. These structures will describe the operation being performed for use by the log) 72 238 P
(recovery code in the event of a system failure.) 72 224 T
2 F
(Step 5 Commit T) 72 192 T
(ransaction) 161.72 192 T
1 F
0.29 (Once all of the necessary resource changes have been completed, the transaction can be commit-) 72 166 P
0.87 (ted. T) 72 152 P
0.87 (ransaction commit will record all resource modi\336cations and transaction operations in the) 100.43 152 P
1.48 (in-core log, pin all resources in memory until the transaction makes it to the on-disk log, and) 72 138 P
-0.07 (unlock all resources associated with the transaction. At this point the transaction is not yet perma-) 72 124 P
-0.04 (ment. It becomes permanent when the in-core log is written out to the on disk log. The user of the) 72 110 P
0.59 (transaction mechanism at this point can either consider him or herself done and for) 72 96 P
0.59 (get about the) 476.86 96 P
(transaction or wait for the transaction to be written to disk.) 72 82 T
FMENDPAGE
%%EndPage: "2" 3
%%Page: "3" 3
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(3) 500 42.62 T
1 12 Q
0.18 (Another wrinkle in transaction commit is that the transaction user will be able to specify whether) 72 712 P
1.05 (or not a given locked resource should be unlocked. There are certain long running transactions) 72 698 P
0.33 (which will actually be implemented as multiple transactions. These will require keeping some of) 72 684 P
(their resources locked across all of the involved transaction commits.) 72 670 T
0.25 (Once a resource is unlocked by a transaction it is eligible for use by other transactions. This may) 72 644 P
1.67 (result in the resource being associated with multiple transactions simultaneously) 72 630 P
1.67 (. This will be) 471.68 630 P
0.08 (handled cleanly by the transaction mechanism without any special intervention by the transaction) 72 616 P
(mechanism user) 72 602 T
(.) 148.95 602 T
2 F
(Step 6 Log W) 72 570 T
(rite Completes) 144.42 570 T
1 F
1.37 (At some point the in-core log will be written out to disk, and at that point the transaction has) 72 544 P
0.13 (become permanent and its modi\336ed resources can be unpinned. This will be performed automati-) 72 530 P
(cally by the transaction mechanism. The transaction structure will also be freed at this time.) 72 516 T
0.12 (All modi\336ed resources and operation records associated with the transaction will be placed in the) 72 490 P
-0.12 (Active Items List \050AIL\051 at this time as well. This is a list used by the transaction and logging code) 72 476 P
0.93 (to track the location of active data in the log. A modi\336ed resource recorded in the log is active) 72 462 P
0.07 (until the copy recorded in the log is written out to the on disk image of the resource. T) 72 448 P
0.07 (racking the) 486.3 448 P
(location of dirty items in the log allows us to prevent the overwriting of the tail of the log.) 72 434 T
2 F
(Step 7 Modi\336ed Resour) 72 402 T
(ce is Flushed) 195.05 402 T
1 F
1 (When a resource is unpinned because the log write containing its modi\336cations has completed,) 72 376 P
1.33 (that resource is eligible to be \337ushed out to disk. This will happen when the resource is to be) 72 362 P
0.13 (reused for something else, the tail of the log approaches the location of the resource in the log, or) 72 348 P
0.65 (some cleaning entity such as the bd\337ush daemon pushes it out. Once the dirty in-core copy of a) 72 334 P
0.17 (resource is \337ushed to its on disk image, the resource will be removed from the AIL. At that point) 72 320 P
(the resource has no ties to the transaction system and the cycle is free to start over again.) 72 306 T
2 16 Q
(3.0 T) 72 265.33 T
(ransaction Mechanism Interfaces) 109.47 265.33 T
1 12 Q
1.33 (This section describes the function and structure interfaces exported for use by the transaction) 72 238 P
1.48 (mechanism users. Interfaces for performing all of the steps described in the section above are) 72 224 P
(speci\336ed here. They will be listed in an order comparable to that of the previous section.) 72 210 T
2 14 Q
(3.1 Function Interfaces) 72 176.67 T
1 12 Q
2.21 (This section describes the function interfaces to be used by \336le system code for performing) 72 150 P
0.17 (atomic updates to \336le system data and meta-data. The design of these interfaces is driven by how) 72 136 P
0.02 (they will be used. I have tried to encapsulate the common actions which will be performed by \336le) 72 122 P
0.76 (system code in order to reduce redundant functionality throughout the \336le system. The result of) 72 108 P
0.31 (this is that there are a few completely new transaction speci\336c routines and many more extended) 72 94 P
1.89 (buf) 72 80 P
1.89 (fer cache and inode management routines. While, as described in a following section, the) 87.77 80 P
FMENDPAGE
%%EndPage: "3" 4
%%Page: "4" 4
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(4) 500 42.62 T
1 12 Q
0.52 (internal structure of the transaction layer is designed to be independent of the type of data being) 72 712 P
0.11 (logged, the interface routines described here are quite type dependent. They will have knowledge) 72 698 P
-0.18 (of both the management of the objects they manipulate and the internals of the transaction mecha-) 72 684 P
(nism.) 72 670 T
2 F
(3.1.1 xfs_trans_t *xfs_trans_alloc\050struct mount *mp, uint type, uint r) 72 638 T
(eserve, uint \337ags\051) 427.9 638 T
1 F
0.19 (This is the routine called to allocate a transaction structure and reserve log space for that transac-) 72 612 P
0.77 (tion. If the \337ags parameter is set to TRANS_NOSLEEP) 72 598 P
0.77 (, then the routine will return NULL if it) 344.31 598 P
1.18 (cannot reserve the requested amount of log space rather than sleeping until it is available. The) 72 584 P
0.69 (mount point structure should be that of the \336le system the transaction will be manipulating, and) 72 570 P
(the type \336eld should specify the transaction type. These types will be enumerated later) 72 556 T
(.) 485.71 556 T
2 F
-0.41 (3.1.2 void xfs_trans_callback\050xfs_trans_t *trans, void\050*\051\050xfs_trans_t*, void*\051 callback, void) 72 524 P
(*arg\051) 72 510 T
1 F
0.69 (This routine allows the transaction user to specify a routine to be called upon the completion of) 72 484 P
0.16 (the log write which writes the transaction to the on disk log. The user is also allowed to specify a) 72 470 P
0.55 (pointer which will be passed to the callback in addition to the transaction structure. This routine) 72 456 P
1.38 (will be called before the normal transaction completion processing, but not in place of it. The) 72 442 P
(transaction structure and its contents should not be modi\336ed by this routine.) 72 428 T
2 F
(3.1.3 buf_t *xfs_trans_getblk\050xfs_trans_t *trans, dev_t dev) 72 396 T
(, daddr_t blkno, int len\051) 374.82 396 T
1 F
0.1 (This is called to assign a buf) 72 370 P
0.1 (fer to the speci\336ed block\050s\051. If the buf) 208.96 370 P
0.1 (fer already exists and is locked) 391.29 370 P
0.49 (by someone else, the routine will sleep until it becomes available. If the buf) 72 356 P
0.49 (fer is already locked) 440.94 356 P
0.54 (within the given transaction it is just returned to the caller) 72 342 P
0.54 (. If the buf) 353.92 342 P
0.54 (fer is not yet in the cache it) 405.96 342 P
(will be allocated and returned to the user) 72 328 T
(. The buf) 266.86 328 T
(fer is always locked upon return to the caller) 310.27 328 T
(.) 523.44 328 T
0.22 (This routine will allocate an xfs_buf_log_item structure for the buf) 72 302 P
0.22 (fer if it does not yet have one.) 395.22 302 P
1.78 (This structure \050described in detail below\051 is what is used by the transaction code internals to) 72 288 P
(manipulate buf) 72 274 T
(fers within a transaction.) 144.07 274 T
2 F
(3.1.4 buf_t *xfs_trans_br) 72 242 T
(ead\050xfs_trans_t *trans, dev_t dev) 203.38 242 T
(, daddr_t blkno, int len\051) 372.6 242 T
1 F
-0.14 (This routine is just like xfs_trans_getblk\050\051, except that it ensures that the buf) 72 216 P
-0.14 (fer is completely read) 436.18 216 P
(in from disk before returning it to the caller) 72 202 T
(.) 279.86 202 T
2 F
(3.1.5 buf_t *xfs_trans_getchunk\050xfs_trans_t *trans, vnode_t *vp, struct bmapval *bmap,) 72 170 T
(struct cr) 72 156 T
(ed *cr) 115.4 156 T
(ed\051) 146.83 156 T
1 F
0.55 (This routine is just like xfs_trans_getblk\050\051, except that the buf) 72 130 P
0.55 (fer speci\336ed is a part of the chunk) 373.25 130 P
0.32 (cache rather than the block buf) 72 116 P
0.32 (fer cache. This is used for getting buf) 221.59 116 P
0.32 (fers associated with \336le data) 402.82 116 P
(within a transaction.) 72 102 T
2 F
(3.1.6 buf_t *xfs_trans_chunkr) 72 70 T
(ead\050xfs_trans_t *trans, vnode_t *vp, struct bmapval *bmap,) 228.71 70 T
FMENDPAGE
%%EndPage: "4" 5
%%Page: "5" 5
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(5) 500 42.62 T
2 12 Q
(struct cr) 72 712 T
(ed *cr) 115.4 712 T
(ed\051) 146.83 712 T
1 F
1.86 (This routine is just like xfs_trans_getchunk\050\051, except that it ensures that the buf) 72 686 P
1.86 (fer is read in) 474.15 686 P
1.19 (before returning it to the caller) 72 672 P
1.19 (. This routine dif) 224.18 672 P
1.19 (fers from xfs_chunkread\050\051 in that only a single) 308.16 672 P
(bmapval structure can be speci\336ed.) 72 658 T
2 F
(3.1.7 void xfs_trans_br) 72 626 T
(else\050xfs_trans_t *trans, buf_t *bp\051) 192.05 626 T
1 F
1.75 (This routine releases the given buf) 72 600 P
1.75 (fer which must have been allocated with one of the above) 246.07 600 P
0.05 (xfs_trans_xxx\050\051 buf) 72 586 P
0.05 (fer allocation routines or added to the transaction with xfs_trans_bjoin\050\051. This) 166.76 586 P
0.28 (will decrement the lock recursion count on the given buf) 72 572 P
0.28 (fer) 345.81 572 P
0.28 (. If the count goes to 0 the buf) 358.46 572 P
0.28 (fer will) 504.74 572 P
1.94 (be unlocked and disassociated from the transaction. The buf) 72 558 P
1.94 (fer must not have been modi\336ed) 375.41 558 P
(within this transaction, because we have no way to restore it to its previous state.) 72 544 T
0.49 (If the xfs_buf_log_item structure associated with the buf) 72 518 P
0.49 (fer is not needed because the buf) 347.32 518 P
0.49 (fer has) 507.22 518 P
(no logged data, then it will be freed.) 72 504 T
2 F
(3.1.8 void xfs_trans_bjoin\050xfs_trans_t *trans, buf_t *bp\051) 72 472 T
1 F
0.27 (This routine is called to add an already locked buf) 72 446 P
0.27 (fer to the given transaction. Use of this routine) 314.35 446 P
0.22 (is discouraged, but there may be some cases where it is necessary) 72 432 P
0.22 (. If the buf) 388.11 432 P
0.22 (fer does not yet have) 439.19 432 P
(an xfs_buf_log_item structure associated with it one will be allocated.) 72 418 T
2 F
(3.1.9 void xfs_trans_bhold\050xfs_trans_t *trans, buf_t *bp\051) 72 386 T
1 F
0.63 (This routine can be called with a buf) 72 360 P
0.63 (fer locked within the transaction to prevent the buf) 251.74 360 P
0.63 (fer from) 499.74 360 P
1.35 (being unlocked when the transaction commits. It is the responsibility of the caller to track the) 72 346 P
(buf) 72 332 T
(fer and unlock it eventually) 87.77 332 T
(.) 218.9 332 T
2 F
(3.1.10 void xfs_trans_iget\050xfs_trans_t *trans, xfs_ino_t ino, struct xfs_inode **ipp\051) 72 300 T
1 F
0.25 (This routine will return the inode with number ino in the ipp parameter) 72 274 P
0.25 (. The \336le system to which) 414.81 274 P
-0.06 (ino is relative is already known since it was speci\336ed in xfs_trans_alloc\050\051, so it is not necessary to) 72 260 P
1.04 (specify it here. The inode is returned locked to the caller) 72 246 P
1.04 (, and if it is already locked within the) 352.76 246 P
(transaction it is simply returned to the caller) 72 232 T
(.) 282.87 232 T
2 F
(3.1.1) 72 200 T
(1 void xfs_trans_ir) 95.33 200 T
(else\050xfs_trans_t *trans, struct xfs_inode *ip\051) 194.06 200 T
1 F
1.49 (This routine releases the given inode which must have been allocated with xfs_trans_iget\050\051 or) 72 174 P
0.28 (added to the transaction with xfs_trans_ijoin\050\051. The inode is unlocked and disassociated from the) 72 160 P
(transaction. The inode must not have been modi\336ed within the scope of the transaction.) 72 146 T
FMENDPAGE
%%EndPage: "5" 6
%%Page: "6" 6
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(6) 500 42.62 T
2 12 Q
(3.1.12 void xfs_trans_ijoin\050xfs_trans_t *trans, struct xfs_inode *ip\051) 72 712 T
1 F
-0.22 (This routine is called to add an already locked inode to the given transaction. Use of this routine is) 72 686 P
0.17 (discouraged, but there may be some cases where it is necessary) 72 672 P
0.17 (. If the indoe does not yet have an) 376.39 672 P
(xfs_inode_log_item structure associated with it one will be allocated.) 72 658 T
2 F
(3.1.13 void xfs_trans_ihold\050xfs_trans_t *trans, struct xfs_inode *ip\051) 72 626 T
1 F
0.56 (This routine can be called with an inode locked within the transaction to prevent the inode from) 72 600 P
0 (being unlocked when the transaction commits. It is the responsibility of the call to track the inode) 72 586 P
(and unlock it eventually) 72 572 T
(.) 186.81 572 T
2 F
(3.1.14 void xfs_trans_log_buf\050xfs_trans_t *trans, buf_t *bp, uint \336rst, uint last\051) 72 540 T
1 F
0.77 (This routine is called to notify the transaction that bytes \336rst through last inclusive of the given) 72 514 P
-0.05 (buf) 72 500 P
-0.05 (fer have been modi\336ed and must be logged at commit time. The transaction layer is free to log) 87.77 500 P
(more bytes than those speci\336ed, but it must log at least bytes \336rst through last.) 72 486 T
2 F
(3.1.15 void xfs_trans_log_inode\050xfs_trans_t *trans, xfs_inode *ip, uint \336eldmask\051) 72 454 T
1 F
0.97 (This routine is called to notify the transaction that the \336elds indicated in the \336eldmask bitmask) 72 428 P
0.66 (have been modi\336ed and must be logged. The values to be speci\336ed in \336eldmask will be de\336ned) 72 414 P
(later) 72 400 T
(.) 92.65 400 T
2 F
(3.1.16 void xfs_trans_log_op\050xfs_trans_t *trans, xfs_log_item_t *op\051) 72 368 T
1 F
-0.24 (This routine will add the log operation structure given to the list of things which need to be logged) 72 342 P
(when the transaction commits.) 72 328 T
2 F
(3.1.17 trans_id_t xfs_trans_id\050xfs_trans_t *trans\051) 72 296 T
1 F
-0.13 (This function returns the unique transaction id of given transaction structure. This is for use in log) 72 270 P
(operations which require making references to other transactions.) 72 256 T
2 F
(3.1.18 void xfs_trans_commit\050xfs_trans_t *trans, uint \337ags\051) 72 224 T
1 F
-0.22 (This routine moves all data which has been speci\336ed as needing to be logged to the incore log. All) 72 198 P
-0.02 (resources which are logged are pinned, and all resources are unlocked unless it has been speci\336ed) 72 184 P
0.11 (that they should not be. If the \337ags specify that the log should be \337ushed immediately then it will) 72 170 P
-0.21 (be done before returning to the caller) 72 156 P
-0.21 (. The \337ags may also indicate that the caller cannot sleep \050per-) 247.91 156 P
0.38 (haps when calling from an interrupt handler\051, in which case the unlocking of resources and copy) 72 142 P
1.26 (into the log will happen asynchronously) 72 128 P
1.26 (. Finally) 269.72 128 P
1.26 (, the \337ags can indicate that the caller wants to) 310.18 128 P
(wait for the commit of the transaction to the on disk log before returning.) 72 114 T
FMENDPAGE
%%EndPage: "6" 7
%%Page: "7" 7
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(7) 500 42.62 T
1 12 Q
1.95 (If nothing has been logged within the transaction, then almost none of the above will occur) 72 712 P
1.95 (.) 537 712 P
0.98 (Instead, all resources will be unlocked unless it has been speci\336ed that they should not be, any) 72 698 P
(transaction completion function will be called, and the transaction structure will be freed.) 72 684 T
2 F
(3.1.19 void xfs_trans_cancel\050xfs_trans_t *trans\051) 72 652 T
1 F
1.48 (This is called to cancel a transaction by unlocking all of its resources. None of the buf) 72 626 P
1.48 (fers or) 507.55 626 P
1.62 (inodes can be modi\336ed within the transaction when this is called, because there is no way to) 72 612 P
(restore them to their previous states.) 72 598 T
2 14 Q
(3.2 Exported Structur) 72 564.67 T
(es) 207 564.67 T
2 12 Q
(3.2.1 xfs_log_item) 72 532 T
1 F
0.41 (In order to keep the transaction management code simple and modular) 72 506 P
0.41 (, all logged structures will) 413.42 506 P
-0.24 (be manipulated through a common internal interface. This interface will allow the code to manage) 72 492 P
0.8 (buf) 72 478 P
0.8 (fers, inodes, and log operation structures identically) 87.77 478 P
0.8 (. The xfs_log_item is the common struc-) 340.3 478 P
0.54 (ture among all things which can be logged. It consists of a small amount of data and a vector of) 72 464 P
1.17 (function pointers used to manipulate the log item. It is the function pointers which contain the) 72 450 P
(type speci\336c code for manipulating various types of log items. The xfs_log_item is de\336ned as:) 72 436 T
(The xfs_item_ops structure is de\336ned as:) 72 257.5 T
2 10 Q
(\336eld name) 85.78 414.33 T
(type) 193.78 414.33 T
(comment) 301.78 414.33 T
1 F
(li_parent) 85.78 402.83 T
(struct xfs_log_item *) 193.78 402.83 T
(active item list pointers) 301.78 402.83 T
(li_left) 85.78 391.33 T
(struct xfs_log_item *) 193.78 391.33 T
(li_right) 85.78 379.83 T
(struct xfs_log_item *) 193.78 379.83 T
(li_type) 85.78 368.33 T
(unsigned int) 193.78 368.33 T
(item type label) 301.78 368.33 T
(li_lsn) 85.78 356.83 T
(xfs_lsn_t) 193.78 356.83 T
0.08 (log sequence number of) 301.78 356.83 P
0.82 (the location of the item) 301.78 344.83 P
(in the log) 301.78 332.83 T
(li_ops) 85.78 321.33 T
(xfs_item_ops_t *) 193.78 321.33 T
2.47 (item speci\336c operation) 301.78 321.33 P
(pointers) 301.78 309.33 T
2 F
(\336eld name) 85.78 235.83 T
(type) 193.78 235.83 T
(comment) 355.78 235.83 T
1 F
(iop_size) 85.78 224.33 T
(uint \050*\051\050xfs_log_item*\051) 193.78 224.33 T
5.52 (Return the amount of space) 355.78 224.33 P
(needed to log the item) 355.78 212.33 T
(iop_format) 85.78 200.83 T
(void \050*\051\050xfs_log_item*, caddr_t\051) 193.78 200.83 T
0.97 (W) 355.78 200.83 P
0.97 (rite data to be logged into the) 364.81 200.83 P
(given buf) 355.78 188.83 T
(fer) 393.62 188.83 T
(iop_pin) 85.78 177.33 T
(void \050*\051\050xfs_log_item*\051) 193.78 177.33 T
(Pin the item in memory) 355.78 177.33 T
(iop_unpin) 85.78 165.83 T
(void \050*\051\050xfs_log_item*\051) 193.78 165.83 T
(Unpin the item) 355.78 165.83 T
(iop_trylock) 85.78 154.33 T
(uint \050*\051\050xfs_log_item*\051) 193.78 154.33 T
(Lock the item) 355.78 154.33 T
(iop_unlock) 85.78 142.83 T
(void \050*\051\050xfs_log_item*\051) 193.78 142.83 T
(Unlock the item) 355.78 142.83 T
(iop_committed) 85.78 131.33 T
4.9 (xfs_lsn_t\050*\051 \050xfs_log_item*, xfs_l-) 193.78 131.33 P
(sn_t\051) 193.78 119.33 T
0.29 (Notify item of its latest lsn, let it) 355.78 131.33 P
(return new lsn if any for the AIL) 355.78 119.33 T
(iop_push) 85.78 107.83 T
(void \050*\051\050xfs_log_item*\051) 193.78 107.83 T
2.29 (T) 355.78 107.83 P
2.29 (ry to \337ush the item to its on) 361.53 107.83 P
1.47 (disk image because its space in) 355.78 95.83 P
(the log needs to be reused.) 355.78 83.83 T
79.78 426 403.78 426 2 L
V
0.5 H
0 Z
N
79.78 247.5 493.78 247.5 2 L
V
N
FMENDPAGE
%%EndPage: "7" 8
%%Page: "8" 8
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(8) 500 42.62 T
1 12 Q
(The behavior of each of the functions in the xfs_item_ops structure is described below) 72 712 T
(.) 485.92 712 T
2 F
(3.2.1.1 uint iop_size\050xfs_log_item_t *item\051) 72 680 T
1 F
1.25 (This will be called by the transaction layer to determine how much space is needed to log the) 72 654 P
0.1 (given item. This number should include the space for a header describing the item and its on disk) 72 640 P
1.55 (location, information describing which parts of the item are being logged, and the actual data) 72 626 P
(from the item.) 72 612 T
2 F
(3.2.1.2 void iop_format\050xfs_log_item_t *item, caddr_t buf\051) 72 580 T
1 F
0.28 (This will be called after a call to the iop_size routine to put the data to be logged into the in-core) 72 554 P
0.96 (log. The buf) 72 540 P
0.96 (fer given to the routine will be aligned on at least a 32 byte boundary) 132.67 540 P
0.96 (. The routine) 476.45 540 P
0.6 (should record enough information to allow the recovery code to understand and restore the item) 72 526 P
0.51 (being logged. This should include \050as mentioned above\051: a header describing the item and its on) 72 512 P
-0.09 (disk location, information describing which parts of the item are being logged, and the actual data) 72 498 P
(from the item.) 72 484 T
-0.02 (The \336rst 8 bytes of data written by the format function must consist of a 4 byte log item type \336eld) 72 458 P
0.28 (followed by a 4 byte unsigned integer \336eld indicating the size of the entire log item record in the) 72 444 P
(log.) 72 430 T
2 F
(3.2.1.3 void iop_pin\050xfs_log_item_t *item\051) 72 398 T
1 F
-0.22 (This will be called to pin the given item in memory) 72 372 P
-0.22 (. The item is guaranteed to be locked when this) 315.51 372 P
1.16 (routine is called. After this call, it must be impossible to \337ush the item to disk until the corre-) 72 358 P
(sponding call to iop_unpin\050\051.) 72 344 T
2 F
(3.2.1.4 void iop_unpin\050xfs_log_item_t *item\051) 72 312 T
1 F
-0.09 (This will be called to unpin a given item. It should release the item to be \337ushed to disk whenever) 72 286 P
(it is convenient.) 72 272 T
2 F
(3.2.1.5 uint iop_trylock\050xfs_log_item_t *item\051) 72 240 T
1 F
0.05 (This routine is called to attempt to lock the given item. It should attempt to lock the item, but it is) 72 214 P
0.37 (not allowed to sleep because it will be called holding a spin lock. The routine should return 1 on) 72 200 P
(success and 0 on failure.) 72 186 T
2 F
(3.2.1.6 void iop_unlock\050xfs_log_item_t *item\051) 72 154 T
1 F
(This function will be called to unlock the item once its transaction has committed.) 72 128 T
FMENDPAGE
%%EndPage: "8" 9
%%Page: "9" 9
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(9) 500 42.62 T
2 12 Q
(3.2.1.7 xfs_lsn_t iop_committed\050xfs_log_item_t *item, xfs_lsn_t lsn\051) 72 712 T
1 F
-0.11 (This will be called when a log write completes to notify the log item that it has been committed to) 72 686 P
1.03 (disk and to determine if the position of the log item in the AIL should change. It passes in the) 72 672 P
0.26 (LSN of the log write which just completed. The routine should return the new LSN to be used to) 72 658 P
0.15 (place the item in the AIL. This should be the LSN of the copy of the item in the log which is fur-) 72 644 P
0.13 (thest back in the log but is still needed for recovery) 72 630 P
0.13 (. This gives the item control over when its log) 318.32 630 P
(images become inactive.) 72 616 T
-0.27 (If the routine returns the value -1, then the position of the item in the AIL will not be updateed and) 72 590 P
0.07 (the item will not be referenced again by the committed transaction. The same behavior will occur) 72 576 P
-0.15 (if the routine returns the same value that is in item->xli_lsn before the call. If the value returned is) 72 562 P
0.42 (dif) 72 548 P
0.42 (ferent, then the xli_lsn \336eld of the item will be changed to the returned value and the location) 85.11 548 P
(of the item in the AIL will be updated to re\337ect this value.) 72 534 T
2 F
(3.2.1.8 void iop_\337ush\050xfs_log_item_t *item\051) 72 502 T
1 F
0.57 (This routine will be called to asynchronously write the item out to disk. It is guaranteed that the) 72 476 P
0.22 (item has already been successfully locked by a call to iop_trylock\050\051. If the item is no longer dirty) 72 462 P
0.04 (when this is called, then it should just return immediately) 72 448 P
0.04 (. It is alright for this routine to sleep if it) 346.73 448 P
(must, but this is discouraged.) 72 434 T
2 16 Q
(4.0 T) 72 393.33 T
(ransaction Mechanism Internals) 109.47 393.33 T
1 12 Q
(This section describes the internal structures, interfaces, and algorithms of the transaction layer) 72 366 T
(.) 527.67 366 T
2 14 Q
(4.1 T) 72 332.67 T
(ransaction Structur) 104.78 332.67 T
(e) 222.29 332.67 T
1 12 Q
-0.25 (The transaction structure is used to track all of the information relevant to a given transaction. The) 72 306 P
(xfs_trans structure is described below:) 72 292 T
1.89 (The log items currently associated with a transaction are tracked by a chunk list of log item) 72 91.5 P
0.21 (descriptor structures. These form a list of structures pointing to log item structures. W) 72 77.5 P
0.21 (e can\325) 485.84 77.5 P
0.21 (t link) 514.79 77.5 P
2 10 Q
(\336eld name) 85.78 270.33 T
(\336eld type) 193.78 270.33 T
(comment) 301.78 270.33 T
1 F
(t_tid) 85.78 258.83 T
(xfs_trans_id_t) 193.78 258.83 T
(transaction id) 301.78 258.83 T
(t_reserve) 85.78 247.33 T
(uint) 193.78 247.33 T
(log reservation amount) 301.78 247.33 T
(t_type) 85.78 235.83 T
(uint) 193.78 235.83 T
(transaction type) 301.78 235.83 T
(t_forw) 85.78 224.33 T
(struct trans *) 193.78 224.33 T
(active transaction list pointer) 301.78 224.33 T
(t_back) 85.78 212.83 T
(struct trans *) 193.78 212.83 T
(active transaction list pointer) 301.78 212.83 T
(t_sema) 85.78 201.33 T
(sema_t) 193.78 201.33 T
(transaction commit completion semaphore) 301.78 201.33 T
(t_mountp) 85.78 189.83 T
(struct mount *) 193.78 189.83 T
(pointer to mount structure of \336le system) 301.78 189.83 T
(t_callback) 85.78 178.33 T
(void\050*\051\050xfs_trans_t*,) 193.78 178.33 T
(void*\051) 193.78 166.33 T
(transaction completion callback function) 301.78 178.33 T
(t_item_descs_free) 85.78 154.83 T
(uint) 193.78 154.83 T
(count of free item descriptors) 301.78 154.83 T
(t_item_descs) 85.78 143.33 T
(log_item_chunk_t) 193.78 143.33 T
(\336rst chunk of log item descriptors) 301.78 143.33 T
79.78 282 511.78 282 2 L
V
0.5 H
0 Z
N
FMENDPAGE
%%EndPage: "9" 10
%%Page: "10" 10
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(10) 496 42.62 T
1 12 Q
0.18 (through the log item structures because a single log item can be associated with multiple transac-) 72 712 P
0.44 (tions simultaneously) 72 698 P
0.44 (, although it can only be locked by one at a time. The chunk list reduces the) 170.61 698 P
1.41 (number of allocations and deallocations we need to do. The t_item_descs_free \336eld tracks the) 72 684 P
0.36 (number of free log item descriptors in the chunks that have already been allocated. T) 72 670 P
0.36 (racking this) 483.34 670 P
0.64 (number prevents us from searching for free descriptors which are not there. The xfs_log_item_-) 72 656 P
(desc structure is de\336ned as:) 72 642 T
-0.07 (These log item descriptors are kept in a chunk list of the following xfs_log_item_chunk structure:) 72 571.5 P
0.37 (When checking to see if an item is already locked by a transaction, we could search the log item) 72 489.5 P
1.76 (descriptor list for the item. However) 72 475.5 P
1.76 (, this would get really slow when the number of already) 254.88 475.5 P
1.79 (locked items grows lar) 72 461.5 P
1.79 (ge. Instead, we\325ll be using the structures usually used to look up such) 186.08 461.5 P
1.46 (items, for example the buf) 72 447.5 P
1.46 (fer cache hash table, and looking at the actual item to decide if we) 203.88 447.5 P
0.19 (already have it locked. This will require an extra pointer to the transaction structure in each item,) 72 433.5 P
(not in the log item structure, but it is required for adequate performance.) 72 419.5 T
2 14 Q
(4.2 Active Item List) 72 386.17 T
1 12 Q
-0.3 (All log items which reside in the active portion of the on disk log, meaning that their changes have) 72 359.5 P
0.46 (not yet been \337ushed to their on disk images, will be linked into the Active Item List \050AIL\051. This) 72 345.5 P
-0.04 (list \050it will probably actually be a balanced tree for performance reasons\051 will be sorted by the log) 72 331.5 P
0.88 (sequence numbers of the items, and it will be used to track the tail of the log. When an item is) 72 317.5 P
0.56 (\337ushed to its on disk image it will be removed from the AIL, and when it is re-logged it will be) 72 303.5 P
0.74 (moved up in the AIL according to its new log sequence number) 72 289.5 P
0.74 (. There will be one AIL per \336le) 384.93 289.5 P
0.21 (system. Each will be guarded by a spinlock which must be held for moving, adding, or removing) 72 275.5 P
(an item in the AIL.) 72 261.5 T
0.24 (The log manager will have a process responsible for pushing the tail of the log forward when the) 72 235.5 P
0.33 (head of the log starts to approach the tail. This is what the iop_\337ush\050\051 routine of each log item is) 72 221.5 P
(to be used for) 72 207.5 T
(. The log manager process will do the following to push an item out of the AIL:) 136.96 207.5 T
-0.08 (Obtain the AIL spinlock. Find the \336rst log item in the AIL. Call item->iop_trylock\050\051 to attempt) 85.75 187.5 P
0.09 (to lock the item. If we succeed, unlock the AIL spinlock and then call item->iop_\337ush\050\051. If we) 85.75 173.5 P
-0.18 (fail then look for other items which need to be pushed. W) 85.75 159.5 P
-0.18 (e will assure that if the item is locked,) 359.25 159.5 P
2.36 (then the one holding the lock will \337ush the buf) 85.75 145.5 P
2.36 (fer when unlocking it. The items will be) 330.96 145.5 P
0.01 (removed from the AIL by their I/O completion routines, because that is when we know that on) 85.75 131.5 P
(disk log image of the item is no longer needed.) 85.75 117.5 T
2 10 Q
(\336eld name) 85.78 620.33 T
(\336eld type) 193.78 620.33 T
(comment) 301.78 620.33 T
1 F
(lid_item) 85.78 608.83 T
(xfs_log_item_t *) 193.78 608.83 T
(log item pointer) 301.78 608.83 T
(lid_\337ags) 85.78 597.33 T
(uint) 193.78 597.33 T
(misc information) 301.78 597.33 T
2 F
(\336eld name) 85.78 549.83 T
(\336eld type) 193.78 549.83 T
(comment) 337.78 549.83 T
1 F
(lic_next) 85.78 538.33 T
(struct xfs_log_item_chunk*) 193.78 538.33 T
(next chunk) 337.78 538.33 T
(lic_free) 85.78 526.83 T
(uint) 193.78 526.83 T
(free descriptor mask) 337.78 526.83 T
(lic_descs) 85.78 515.33 T
(struct xfs_log_item_desc[15]) 193.78 515.33 T
(log item descriptors) 337.78 515.33 T
79.78 632 403.78 632 2 L
V
0.5 H
0 Z
N
79.78 561.5 439.78 561.5 2 L
V
N
FMENDPAGE
%%EndPage: "10" 11
%%Page: "11" 11
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(1) 496.44 42.62 T
(1) 500 42.62 T
2 14 Q
(4.3 Buffer Log Item) 72 710.67 T
1 12 Q
0.8 (The buf) 72 684 P
0.8 (fer log item is the log item structure expanded for the extra needs of logged buf) 110.22 684 P
0.8 (fers. T) 502.74 684 P
0.8 (o) 534 684 P
-0.14 (most of the transaction code it will look like a common log item, but it will contain buf) 72 670 P
-0.14 (fer speci\336c) 487.19 670 P
0.35 (data for use by the buf) 72 656 P
0.35 (fer speci\336c log item operations. The xfs_buf_log_item structure is de\336ned) 181.11 656 P
(as:) 72 642 T
0.2 (The buf) 72 525 P
0.2 (fer pointer points to the buf) 109.62 525 P
0.2 (fer described by this item structure, and the recur \336eld is used) 241.99 525 P
0.56 (to track the number of times the buf) 72 511 P
0.56 (fer has been locked within the current transaction. The dirty) 247.89 511 P
0.09 (bitmap and its size \336eld are used to track which bytes in a buf) 72 497 P
0.09 (fer need to be logged when the cur-) 369.15 497 P
(rent transaction is committed.) 72 483 T
-0.11 (For buf) 72 457 P
-0.11 (fers, all logging will be cumulative. What this means is that all dirty data in a buf) 107.32 457 P
-0.11 (fer which) 494.48 457 P
0.68 (has not yet been \337ushed back to disk will be logged each time the buf) 72 443 P
0.68 (fer is logged, whether the) 415.05 443 P
0.19 (dirty data belongs to the current transaction or not. This will allow us to move the buf) 72 429 P
0.19 (fer forward) 485.54 429 P
(in the AIL each time it is logged, and we will only need to track a single LSN for each buf) 72 415 T
(fer) 505.14 415 T
(.) 517.79 415 T
2 F
(4.3.1 Buffer Log Item Operations) 72 383 T
(4.3.1.1 void xfs_buf_item_format\050xfs_log_item_t *buf_item, caddr_t buffer\051) 72 351 T
1 F
(The image of the buf) 72 325 T
(fer log item will be laid out in the following xfs_buf_log_format structure:) 172.37 325 T
0.34 (The type \336eld will indicate that this is a buf) 72 173.5 P
0.34 (fer log item. The size \336eld will indicate the total size) 283.74 173.5 P
0.7 (of the log item. The device \336eld indicates the number of the device this data is to be written to,) 72 159.5 P
-0.3 (and the block number \336eld gives the starting block for the data described in this log item. The map) 72 145.5 P
0.41 (size and data map \336elds describe which data for the given block are logged by this item, and the) 72 131.5 P
0.11 (actual data is written in the data \336eld in 128 byte chunks. The data \336eld is padded to start on a 32) 72 117.5 P
(byte boundary so that data copies go faster) 72 103.5 T
(.) 276.19 103.5 T
2 10 Q
(\336eld name) 85.78 620.33 T
(\336eld type) 193.78 620.33 T
(comment) 301.78 620.33 T
1 F
(bli_item) 85.78 608.83 T
(xfs_log_item_t) 193.78 608.83 T
(common item structure) 301.78 608.83 T
(bli_buf) 85.78 597.33 T
(buf_t *) 193.78 597.33 T
(real buf) 301.78 597.33 T
(fer pointer) 332.4 597.33 T
(bli_recur) 85.78 585.83 T
(uint) 193.78 585.83 T
(lock recursion count) 301.78 585.83 T
(bli_map_size) 85.78 574.33 T
(uint) 193.78 574.33 T
(size of the dirty bitmap in bytes) 301.78 574.33 T
(bli_dirty_map) 85.78 562.83 T
(uint[1]) 193.78 562.83 T
2.18 (variable sized bitmap of dirty 128 byte) 301.78 562.83 P
(regions in the buf) 301.78 550.83 T
(fer to be logged) 371.83 550.83 T
2 F
(\336eld name) 85.78 303.33 T
(\336eld type) 193.78 303.33 T
(\336eld size) 301.78 303.33 T
1 F
(blf_type) 85.78 291.83 T
(uint) 193.78 291.83 T
(4 bytes) 301.78 291.83 T
(blf_size) 85.78 280.33 T
(uint) 193.78 280.33 T
(4 bytes) 301.78 280.33 T
(blf_dev) 85.78 268.83 T
(dev_t) 193.78 268.83 T
(4 bytes) 301.78 268.83 T
(blf_blkno) 85.78 257.33 T
(daddr_t) 193.78 257.33 T
(8 bytes) 301.78 257.33 T
(blf_map_size) 85.78 245.83 T
(uint) 193.78 245.83 T
(4 bytes) 301.78 245.83 T
(blf_data_map) 85.78 234.33 T
(uint[blf_map_size / 4]) 193.78 234.33 T
(multiple of 4 bytes) 301.78 234.33 T
(blf_padding) 85.78 222.83 T
(uint) 193.78 222.83 T
(pad to 32 byte boundary) 301.78 222.83 T
(blf_data) 85.78 211.33 T
(uint[variable]) 193.78 211.33 T
1.75 (128 byte blocks of data as indicated by) 301.78 211.33 P
(blf_data_map bitmap) 301.78 199.33 T
79.78 632 475.78 632 2 L
V
0.5 H
0 Z
N
79.78 315 475.78 315 2 L
V
N
FMENDPAGE
%%EndPage: "11" 12
%%Page: "12" 12
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(12) 496 42.62 T
2 12 Q
(4.3.1.2 uint xfs_buf_item_size\050xfs_log_item_t *buf_item\051) 72 712 T
1 F
0.31 (This just returns the amount of space needed for the structure described in the xfs_buf_item_for-) 72 686 P
(mat\050\051 description.) 72 672 T
2 F
(4.3.1.3 void xfs_buf_item_pin\050xfs_log_item_t *buf_item\051) 72 640 T
1 F
-0.17 (This function will assert that the buf) 72 614 P
-0.17 (fer is locked and then call bpin\050\051 on the buf) 244.65 614 P
-0.17 (fer associated with) 450.41 614 P
(the buf) 72 600 T
(fer log item.) 105.43 600 T
2 F
(4.3.1.4 void xfs_buf_item_unpin\050xfs_log_item_t *buf_item\051) 72 568 T
1 F
(This function will simply call bunpin\050\051 on the buf) 72 542 T
(fer associated with the buf) 309.65 542 T
(fer log item.) 436 542 T
2 F
(4.3.1.5 int xfs_buf_item_trylock\050xfs_log_item_t *buf_item\051) 72 510 T
1 F
0.19 (This will perform a cpsema\050\051 on the semaphore of the buf) 72 484 P
0.19 (fer associated with this buf) 350.85 484 P
0.19 (fer log item.) 480.65 484 P
-0.1 (If it can grab the buf) 72 470 P
-0.1 (fer) 169.52 470 P
-0.1 (, it will remove it from the free list, claim the buf) 182.36 470 P
-0.1 (fer) 416.54 470 P
-0.1 (, and return 1. If it can-) 429.37 470 P
(not get the buf) 72 456 T
(fer semaphore, then it will return 0.) 141.41 456 T
2 F
(4.3.1.6 void xfs_buf_item_unlock\050xfs_log_item_t *buf_item\051) 72 424 T
1 F
0.92 (This will be called to unlock a buf) 72 398 P
0.92 (fer log item previously locked via a call to an xfs_trans \322get) 242.44 398 P
1.34 (buf) 72 384 P
1.34 (fer\323 routine \050e.g. xfs_trans_bread\050\051\051. It will do this by a call to xfs_brelse\050\051 with the buf) 87.77 384 P
1.34 (fer) 526.69 384 P
0.78 (associated with the given buf) 72 370 P
0.78 (fer log item. If the buf) 214.82 370 P
0.78 (fer has no data in the active or in-core logs,) 325.11 370 P
0.38 (then the xfs_buf_log_item structure is no longer needed, and it will be freed before releasing the) 72 356 P
(buf) 72 342 T
(fer) 87.77 342 T
(.) 100.42 342 T
2 F
(4.3.1.7 xfs_lsn_t xfs_buf_item_committed\050xfs_log_item_t *buf_item, xfs_lsn_t lsn\051) 72 310 T
1 F
0.12 (This routine will always return the lsn value passed in to it. This is because the buf) 72 284 P
0.12 (fer always rel-) 470.49 284 P
(ogs all dirty data in the buf) 72 270 T
(fer) 201.04 270 T
(, so the most recent log version is the only one needed.) 213.87 270 T
2 F
(4.3.1.8 void xfs_buf_item_\337ush\050xfs_log_item_t *buf_item\051) 72 238 T
1 F
0.11 (This function will write the buf) 72 212 P
0.11 (fer out to its place on disk if it is still necessary) 222.59 212 P
0.11 (. First it will check) 449.26 212 P
0.73 (that the buf) 72 198 P
0.73 (fer is marked B_DEL) 127.86 198 P
0.73 (WRI. If this \337ag is not set then the routine will just unlock the) 232.74 198 P
0.54 (buf) 72 184 P
0.54 (fer and return. If the \337ag is set, then it will call bawrite\050\051 with the buf) 87.77 184 P
0.54 (fer to write it out asyn-) 427.05 184 P
(chronously) 72 170 T
(.) 124.52 170 T
1.09 (The I/O completion routine for the buf) 72 144 P
1.09 (fer will remove the xfs_buf_log_item structure from the) 263.54 144 P
(AIL, free it, and unlock the buf) 72 130 T
(fer) 221.67 130 T
(.) 234.32 130 T
FMENDPAGE
%%EndPage: "12" 13
%%Page: "13" 13
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(13) 496 42.62 T
2 14 Q
(4.4 Inode Log Item) 72 710.67 T
1 12 Q
0.37 (The inode log item structure, like the buf) 72 684 P
0.37 (fer log item structure, will extend the common log item) 270.88 684 P
(structure with inode speci\336c data. The xfs_inode_log_item structure will look like:) 72 670 T
0.14 (The inode \336eld will point to the inode associated with this inode log item, and the recur \336eld will) 72 576.5 P
-0.17 (count the number of times the inode has been locked recursively) 72 562.5 P
-0.17 (. The \336eldmask \336eld will be a bit-) 378.62 562.5 P
(map of \336elds in the inode which have been dirtied and need to be logged.) 72 548.5 T
1.36 (As with buf) 72 522.5 P
1.36 (fers, inode logging will be cumulative. All dirty \336elds in the inode will be logged) 131.14 522.5 P
0.17 (every time the inode is logged in order to keep inodes seeing heavy traf) 72 508.5 P
0.17 (\336c moving forward in the) 416.74 508.5 P
(log.) 72 494.5 T
2 F
(4.4.1 Inode Log Item Operations) 72 462.5 T
(4.4.1.1 void xfs_inode_item_format\050xfs_log_item_t *inode_item, caddr_t buffer\051) 72 430.5 T
1 F
(The inode log item will be laid out in log with the following xfs_inode_log_format structure:) 72 404.5 T
1.15 (The inode number \336eld gives the unique identi\336er of the inode being logged mainly for sanity) 72 276.5 P
1.86 (checking. The block number and block of) 72 262.5 P
1.86 (fset \336elds are used to determine where on disk the) 283.12 262.5 P
0.17 (logged data needs to reside. The \336eld mask is a bitmask indicating which \336elds in the inode have) 72 248.5 P
0.82 (been logged, and the data \336eld contains the data from the in core inode image which is logged.) 72 234.5 P
0.02 (The in core inode image is used rather than an on disk image in order to push the work of transla-) 72 220.5 P
0.06 (tion onto the recovery process. This is simply an optimization for the common case, which is that) 72 206.5 P
(we are logging data that is never looked at by the recovery code.) 72 192.5 T
2 F
(4.4.1.2 unit xfs_inode_item_size\050xfs_log_item_t *inode_item\051) 72 160.5 T
1 F
(Simply return the size of the structure described above.) 72 134.5 T
2 F
(4.4.1.3 void xfs_inode_item_pin\050xfs_log_item_t *inode_item\051) 72 102.5 T
1 F
(This will just call xfs_inode_pin\050\051 with the inode associated with the given inode log item.) 72 76.5 T
2 10 Q
(\336eld name) 85.78 648.33 T
(\336eld type) 193.78 648.33 T
(comment) 301.78 648.33 T
1 F
(ili_item) 85.78 636.83 T
(xfs_log_item_t) 193.78 636.83 T
(real log item) 301.78 636.83 T
(ili_inode) 85.78 625.33 T
(xfs_inode_t *) 193.78 625.33 T
(real inode) 301.78 625.33 T
(ili_recur) 85.78 613.83 T
(uint) 193.78 613.83 T
(lock recursion count) 301.78 613.83 T
(ili_\336eld_mask) 85.78 602.33 T
(uint) 193.78 602.33 T
(logged \336eld mask) 301.78 602.33 T
2 F
(\336eld name) 85.78 382.83 T
(\336eld type) 193.78 382.83 T
(\336eld size) 301.78 382.83 T
(comment) 355.78 382.83 T
1 F
(ilf_type) 85.78 371.33 T
(uint) 193.78 371.33 T
(4 bytes) 301.78 371.33 T
(log item type indicator) 355.78 371.33 T
(ilf_size) 85.78 359.83 T
(uint) 193.78 359.83 T
(4 bytes) 301.78 359.83 T
(log item size indicator) 355.78 359.83 T
(ilf_ino) 85.78 348.33 T
(xfs_ino_t) 193.78 348.33 T
(8 bytes) 301.78 348.33 T
(inode number of inode) 355.78 348.33 T
(ilf_blkno) 85.78 336.83 T
(daddr_t) 193.78 336.83 T
(8 bytes) 301.78 336.83 T
(block number where inode lives) 355.78 336.83 T
(ilf_blkof) 85.78 325.33 T
(f) 120.58 325.33 T
(uint) 193.78 325.33 T
(4 bytes) 301.78 325.33 T
(of) 355.78 325.33 T
(fset in disk block of inode) 363.92 325.33 T
(ilf_\336eld_mask) 85.78 313.83 T
(uint) 193.78 313.83 T
(4 bytes) 301.78 313.83 T
(logged \336eld mask) 355.78 313.83 T
(ilf_data) 85.78 302.33 T
(uint[variable]) 193.78 302.33 T
(n*4 bytes) 301.78 302.33 T
(logged inode data) 355.78 302.33 T
79.78 660 403.78 660 2 L
V
0.5 H
0 Z
N
79.78 394.5 493.78 394.5 2 L
V
N
FMENDPAGE
%%EndPage: "13" 14
%%Page: "14" 14
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(14) 496 42.62 T
2 12 Q
(4.4.1.4 void xfs_inode_item_unpin\050xfs_log_item_t *inode_item\051) 72 712 T
1 F
(This will just call xfs_inode_unpin\050\051 with the inode associated with the given inode log item.) 72 686 T
2 F
(4.4.1.5 void xfs_inode_item_trylock\050xfs_log_item_t *inode_item\051) 72 654 T
1 F
-0.18 (This will perform a cpsema\050\051 on the semaphore of the inode associated with this inode log item. If) 72 628 P
(it can grab the inode, it will return 1. If it cannot get the inode semaphore, then it will return 0.) 72 614 T
2 F
(4.4.1.6 void xfs_inode_item_unlock\050xfs_log_item_t *inode_item\051) 72 582 T
1 F
(This will simply release the semaphore of the inode associated with inode log item.) 72 556 T
2 F
(4.4.1.7 xfs_lsn_t xfs_inode_item_committed\050xfs_log_item_t *inode_item, xfs_lsn_t lsn\051) 72 524 T
1 F
0.26 (This routine will always return the lsn value passed in to it. This is because the inode always rel-) 72 498 P
(ogs all dirty data in the inode, so the most recent log version is the only one needed.) 72 484 T
2 F
(4.4.1.8 void xfs_inode_item_\337ush\050xfs_log_item_t *inode_item\051) 72 452 T
1 F
0.1 (This routine is called to \337ush the inode associated with the given inode log item out to its on disk) 72 426 P
-0.14 (image. The inode must already be locked when calling this routine. This will get the buf) 72 412 P
-0.14 (fer for the) 492.34 412 P
0.46 (disk block containing the inode, copy the latest image of the inode into it, and write out the disk) 72 398 P
0.48 (block asynchronously) 72 384 P
0.48 (. The inode log item will attach itself to the buf) 176.63 384 P
0.48 (fer via the fsdata pointer of) 407.39 384 P
1.33 (the buf) 72 370 P
1.33 (fer) 106.75 370 P
1.33 (, so buf) 119.58 370 P
1.33 (fers containing inode blocks cannot be logged since that would use the same) 157.67 370 P
0.06 (pointer) 72 356 P
0.06 (. There is no need to log the buf) 105.32 356 P
0.06 (fers, however) 258.49 356 P
0.06 (, because all they contain is inodes which are) 323.34 356 P
2.14 (logged independently) 72 342 P
2.14 (. The iodone routine of the buf) 176.96 342 P
2.14 (fer will be set to xfs_inode_item_done\050\051) 336.45 342 P
(which will remove the inode log item from the AIL and release the buf) 72 328 T
(fer and inode locks.) 411.87 328 T
0.55 (This will require holding the inode lock across the disk write. W) 72 302 P
0.55 (e could go with a more compli-) 386.17 302 P
-0.14 (cated scheme which did not keep the inode locked, but the only inodes being \337ushed will be those) 72 288 P
0.46 (which have not been used recently) 72 274 P
0.46 (. Inodes which are being modi\336ed all the time will be moving) 239.07 274 P
0.71 (forward in the log all the time and will not need to be \337ushed. For this reason I am going to go) 72 260 P
1.41 (with the simple but less concurrent scheme for now) 72 246 P
1.41 (. If this turns out to be a problem we will) 329.67 246 P
(revisit it.) 72 232 T
2 14 Q
(4.5 Block Zer) 72 198.67 T
(o Operation and Don\325t Block Zer) 155.7 198.67 T
(o Operation Log Items) 354.07 198.67 T
1 12 Q
0.18 (This section describes the use of operation log items to perform block zeroing of newly allocated) 72 172 P
0.72 (blocks. It is meant to provide an example of how operation log items can be used to implement) 72 158 P
(transactions in the proposed framework.) 72 144 T
0.38 (Block zeroing is used to prevent the user from \336nding trash in a \336le when space is allocated to a) 72 118 P
-0.22 (\336le but the system crashes before the allocated space can be initialized. In xFS blocks will be allo-) 72 104 P
1.66 (cated immediately prior to the writing of those blocks, and this section describes a means by) 72 90 P
FMENDPAGE
%%EndPage: "14" 15
%%Page: "15" 15
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(15) 496 42.62 T
1 12 Q
0.83 (which we can ensure that the blocks are zeroed in the event of a crash without actually zeroing) 72 712 P
(them before allocating them. This will be a big performance win.) 72 698 T
2 F
(4.5.1 Block Zer) 72 666 T
(o Operation Log Item) 152.74 666 T
1 F
0.75 (The transaction which allocates additional blocks for a \336le will log a block zero \050BZ\051 operation) 72 640 P
-0.29 (record along with the data for allocating the new blocks for the \336le. This record will be recognized) 72 626 P
0.43 (by the recovery code to indicate that the blocks it speci\336es should be \336lled with zeros if a corre-) 72 612 P
-0.28 (sponding don\325) 72 598 P
-0.28 (t block zero \050DBZ\051 operation record is not found further down in the log. The corre-) 140.47 598 P
0.98 (sponding DBZ record will be recognized by the fact that it contains the xfs_trans_id of the BZ) 72 584 P
1 (record it is paired with. The xfs_bz_log_item structure given to xfs_trans_log_op\050\051 will consist) 72 570 P
(of:) 72 556 T
0.21 (The extent count and extent array \336elds will be used to record all of the extents which need to be) 72 474 P
(zeroed in the case of a crash. The block zero operation log item operations are described below) 72 460 T
(.) 527.17 460 T
2 F
(4.5.1.1 void xfs_bz_item_format\050xfs_log_item_t *bz_item, caddr_t format\051) 72 428 T
1 F
-0.15 (The image of the BZ operation log item will be laid out in the following xfs_bz_log_format struc-) 72 402 P
(ture:) 72 388 T
(This \336elds here correspond directly to those in the xfs_bz_log_item structure described above.) 72 294.5 T
2 F
(4.5.1.2 uint xfs_bz_item_size\050xfs_log_item_t *bz_item\051) 72 262.5 T
1 F
(This will return the size of the structure to be written by xfs_bzop_item_format\050\051.) 72 236.5 T
2 F
(4.5.1.3 xfs_lsn_t xfs_bz_item_committed\050xfs_log_item_t *bz_item, xfs_lsn_t lsn\051) 72 204.5 T
1 F
1.37 (This routine will always return the lsn value passed in to it. The block zero item will only be) 72 178.5 P
(logged once, so the value passed in is the only location of the item in the log.) 72 164.5 T
-0.07 (All of the other operations of the xfs_bz_log_item structure will simply return without doing any-) 72 138.5 P
0.01 (thing. The only one which might have something to do is the \337ush routine, but given that the data) 72 124.5 P
0.16 (write will start immediately and the DBZ item will be logged as soon as the data write completes) 72 110.5 P
(there does not seem to be much to do even from the \337ush routine.) 72 96.5 T
2 10 Q
(\336eld name) 85.78 534.33 T
(\336eld type) 193.78 534.33 T
(comment) 301.78 534.33 T
1 F
(bzli_item) 85.78 522.83 T
(xfs_log_item_t) 193.78 522.83 T
(common log item) 301.78 522.83 T
(bzli_ex_count) 85.78 511.33 T
(uint) 193.78 511.33 T
(number of extents to zero) 301.78 511.33 T
(bzli_extents) 85.78 499.83 T
(xfs_extent_t[variable]) 193.78 499.83 T
(array of extents to zero) 301.78 499.83 T
2 F
(\336eld name) 85.78 366.33 T
(\336eld type) 193.78 366.33 T
(\336eld size) 301.78 366.33 T
1 F
(bzlf_type) 85.78 354.83 T
(uint) 193.78 354.83 T
(4 bytes) 301.78 354.83 T
(bzlf_size) 85.78 343.33 T
(uint) 193.78 343.33 T
(4bytes) 301.78 343.33 T
(bzlf_ex_count) 85.78 331.83 T
(uint) 193.78 331.83 T
(4 bytes) 301.78 331.83 T
(bzlf_extents) 85.78 320.33 T
(xfs_extent_t[]) 193.78 320.33 T
(bzlf_ex_count * sizeof\050xfs_extent_t\051) 301.78 320.33 T
79.78 546 475.78 546 2 L
V
0.5 H
0 Z
N
79.78 378 475.78 378 2 L
V
N
FMENDPAGE
%%EndPage: "15" 16
%%Page: "16" 16
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(16) 496 42.62 T
2 12 Q
(4.5.2 Don\325t Block Zer) 72 712 T
(o Log Item) 185.05 712 T
1 F
-0.14 (The DBZ item will be logged upon the completion of the data write to the newly allocated blocks.) 72 686 P
-0.19 (Once this item makes it to the on disk log, the recovery manager will not zero the allocated blocks) 72 672 P
(in the event of a crash. the xfs_dbz_log_item structure is de\336ned as:) 72 658 T
1.44 (The transaction id \336eld identi\336es the transaction id of the block zero transaction. This will be) 72 506 P
-0.17 (placed in the log to indicate which BZ transaction is cancelled by the DBZ transaction. The extent) 72 492 P
0.35 (\336eld will describe the exact extent not to zero in the so that the case in which a single BZ opera-) 72 478 P
-0.24 (tion describes multiple extents each can be handled cleanly) 72 464 P
-0.24 (. The block zero item pointer tracks the) 353.12 464 P
-0.22 (log item for the block zero operation. This pointer will be used to remove the block zero operation) 72 450 P
0.11 (from the AIL once the DBZ operation is in the on disk log. The transaction pointer \336eld points to) 72 436 P
0.67 (a transaction structure to be used to log the DBZ operation. Finally) 72 422 P
0.67 (, the log item pointer will be) 399.72 422 P
0.85 (used to hold a pointer to any log item which was attached to the buf) 72 408 P
0.85 (fer before the DBZ item is) 408.83 408 P
0.3 (added to the buf) 72 394 P
0.3 (fer and the iodone function pointer \336eld will any corresponding iodone function.) 150.29 394 P
-0.13 (This will allow us to attach a DBZ item to a buf) 72 380 P
-0.13 (fer which already has a buf) 299.9 380 P
-0.13 (fer log item attached to) 429.26 380 P
(it for some reason. The DBZ item operations are described below:) 72 366 T
2 F
(4.5.2.1 void xfs_dbz_item_format\050xfs_log_item_t *dbz_item, caddr_t buffer\051) 72 334 T
1 F
0.88 (The image of the DBZ operation log item will be laid out in the following xfs_dbz_log_format) 72 308 P
(structure:) 72 294 T
0.42 (The transaction id \336eld identi\336es the BZ operation with which this DBZ operation is paired, and) 72 200.5 P
(the extent \336eld identi\336es the extent in the BZ operation which should no longer be zeroed.) 72 186.5 T
2 F
(4.5.2.2 void xfs_dbz_item_size\050xfs_log_item_t *dbz_item\051) 72 154.5 T
1 F
(Return the size of the structure described above in xfs_dbz_item_format.) 72 128.5 T
2 10 Q
(\336eld name) 85.78 636.33 T
(\336eld type) 193.78 636.33 T
(comment) 301.78 636.33 T
1 F
(dbzli_item) 85.78 624.83 T
(xfs_log_item_t) 193.78 624.83 T
(common log item) 301.78 624.83 T
(dbzli_bz_trans_id) 85.78 613.33 T
(xfs_trans_id) 193.78 613.33 T
(trans id of BZ transaction) 301.78 613.33 T
(dbzli_extent) 85.78 601.83 T
(xfs_extent_t) 193.78 601.83 T
(extent not to zero) 301.78 601.83 T
(dbzli_bz_item) 85.78 590.33 T
(xfs_bz_log_item_t *) 193.78 590.33 T
(pointer to BZ log item) 301.78 590.33 T
(dbzli_trans) 85.78 578.83 T
(xfs_trans_t *) 193.78 578.83 T
(DBZ preallocated transaction) 301.78 578.83 T
(dbzli_buf_item) 85.78 567.33 T
(xfs_log_item_t *) 193.78 567.33 T
3.23 (log item attached to buf) 301.78 567.33 P
3.23 (fer before the) 409.48 567.33 P
(DBZ item was added) 301.78 555.33 T
(dbzli_buf_iodone) 85.78 543.83 T
(void\050*\051\050struct buf *\051) 193.78 543.83 T
3.49 (iodone function attached to the buf) 301.78 543.83 P
3.49 (fer) 458.68 543.83 P
(before the DBZ item was added) 301.78 531.83 T
2 F
(\336eld name) 85.78 272.33 T
(\336eld type) 193.78 272.33 T
(\336eld size) 301.78 272.33 T
1 F
(dbzlf_type) 85.78 260.83 T
(uint) 193.78 260.83 T
(4 bytes) 301.78 260.83 T
(dbzlf_size) 85.78 249.33 T
(uint) 193.78 249.33 T
(4 bytes) 301.78 249.33 T
(dbzlf_trans_id) 85.78 237.83 T
(xfs_trans_id_t) 193.78 237.83 T
(8 bytes) 301.78 237.83 T
(dbzlf_extent) 85.78 226.33 T
(xfs_extent_t) 193.78 226.33 T
(9 bytes) 301.78 226.33 T
79.78 648 475.78 648 2 L
V
0.5 H
0 Z
N
79.78 284 403.78 284 2 L
V
N
FMENDPAGE
%%EndPage: "16" 17
%%Page: "17" 17
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(17) 496 42.62 T
2 12 Q
(4.5.2.3 xfs_lsn_t xfs_dbz_item_committed\050xfs_log_item_t *dbz_item, xfs_lsn_t lsn\051) 72 712 T
1 F
0.07 (This routine will always free the DBZ log item and return -1. The -1 return value will prevent the) 72 686 P
(transaction code from making further references to the DBZ log item.) 72 672 T
1.15 (The rest of the log item operations for the xfs_dbz_log_item all just return without doing any-) 72 646 P
(thing.) 72 632 T
2 F
(4.5.3 The BZ/DBZ T) 72 600 T
(ransaction) 179.08 600 T
1 F
1.06 (This section describes how the BZ and DBZ log items will be used to implement transactional) 72 574 P
0.03 (block zeroing. The basic idea is that the BZ item must remain an active item in the log until all of) 72 560 P
1.62 (the data for the newly allocated blocks has been written. This ensures that the blocks will be) 72 546 P
-0.12 (zeroed if the data does not make it to disk. Each data write will have a \322reference\323 to the BZ item,) 72 532 P
0.23 (and when each completes it can remove its reference. When the last reference is removed, mean-) 72 518 P
-0.24 (ing that all of the data has been written, the BZ item can be removed from the AIL and can thus be) 72 504 P
0.99 (over) 72 490 P
0.99 (-written in the log because it is no longer needed. At the completion of each data write, in) 93.07 490 P
-0.04 (addition to removing a reference to the BZ item, a DBZ item will be logged so that if the BZ item) 72 476 P
1.02 (is not overwritten in the log the data just written will not be replaced by zeros by the recovery) 72 462 P
(code. The steps involved in this rather extended transaction are outlined below:) 72 448 T
0.64 (First, perform a space allocation transaction which includes a block zero operation for all the) 85.75 428 P
(allocated blocks and commit the transaction.) 85.75 414 T
-0.16 (Then for each individual extent which was allocated: allocate a DBZ log item and a transaction) 85.75 396 P
0.34 (with which to log it, allocate a buf_t to perform the data write if necessary) 85.75 382 P
0.34 (, attach the transac-) 445.74 382 P
-0.24 (tion structure to the DBZ item and attach the DBZ item to the buf) 85.75 368 P
-0.24 (fer) 397.21 368 P
-0.24 (, modify the iodone routine) 410.04 368 P
(of the buf) 85.75 354 T
(fer to point to xfs_dbz_iodone\050\051, and write the data asynchronously) 132.17 354 T
(.) 454.49 354 T
-0.19 (When the data write completes, xfs_dbz_iodone\050\051 will be called by the interrupt handler) 85.75 336 P
-0.19 (. Using) 505.54 336 P
-0.24 (the pointer to the BZ item contained in the DBZ item, the routine should decrement the number) 85.75 322 P
0.07 (of extent pointers in the BZ item by 1. If this brings the count to 0, then the BZ item should be) 85.75 308 P
1.54 (removed from the AIL and freed. Then the DBZ item should be asynchronously \050since we) 85.75 294 P
1.18 (can\325) 85.75 280 P
1.18 (t sleep from the interrupt handler\051 logged and committed using the transaction structure) 106.18 280 P
1.11 (allocated earlier) 85.75 266 P
1.11 (. Finally) 163.12 266 P
1.11 (, if there was another log item attached to the buf) 203.43 266 P
1.11 (fer when the DBZ) 449.76 266 P
0.13 (item was attached to it, the other log item should be reattached to the buf) 85.75 252 P
0.13 (fer) 436.82 252 P
0.13 (, its iodone routine) 449.65 252 P
(should be restored, and iodone\050\051 should be called on the buf) 85.75 238 T
(fer \050recursively but that\325) 372.99 238 T
(s OK\051.) 489.23 238 T
-0.19 (When the log write completes, xfs_dbz_item_committed\050\051 will be called. This will just free the) 85.75 220 P
(DBZ item.) 85.75 206 T
2 16 Q
(5.0 T) 72 165.33 T
(ransaction Layer - Log Manager Interfaces) 109.47 165.33 T
1 12 Q
(TBD.) 72 138 T
FMENDPAGE
%%EndPage: "17" 18
%%Page: "18" 18
612 792 0 FMBEGINPAGE
0 8 Q
0 X
0 K
(Silicon Graphics Pr) 72 750.67 T
(oprietary) 139.57 750.67 T
72 54 540 54 2 L
0.25 H
2 Z
N
(xFS T) 72 42.62 T
(ransaction Mechanism) 90.95 42.62 T
(October 7, 1993) 260.9 42.62 T
(18) 496 42.62 T
2 16 Q
(6.0 T) 72 709.33 T
(ransaction Layer - Buffer Cache Interactions) 109.47 709.33 T
1 12 Q
0.59 (See the document \322xFS Buf) 72 682 P
0.59 (fer Cache\323 for a description of buf) 208.07 682 P
0.59 (fer cache interfaces to be used by) 376.6 682 P
(xFS and their interaction with the xFS transaction mechanism.) 72 668 T
FMENDPAGE
%%EndPage: "18" 19
%%Trailer
%%BoundingBox: 0 0 612 792
%%Pages: 18 1
%%DocumentFonts: Palatino-Roman
%%+ Times-Roman
%%+ Times-Bold