Ttodcevic K roca Dfile (Model

Pat ick(Mochel	<mochel@osdl.org>

26 Augusdv2002


Oidrview
~~~~~~~~

Ttise saidrd odel ia a unnficyh4aheofdallntte  urrent,ddisparsthe saidrd odels
t edvare  urrentlyvinrithek roca. Itnisnipt ooddeteiaugmvisot h
bus-specificvdsaidrsadr kbridg s apd rfile s by t psolidat4hena set afedata
apd operst4ahs in ergloballyiac essible data struc

 -s.

Current  saidrd odelsnioplemvis some s.

nrfdtree-like struc

 -((sometimes
justna list) dr ks h dfile s tthy c ppro . But,pt h -(is no lihk gilbetween
etheriffdrentobus typ s.

Aa
oomah data struc

 -(c
noprovideis isnlihk gilycomilittl  ridrhead:kwsenra
bus dsaidr riucoidrsda parsiculyr dfile , idvc
n inseri itoin eritheglobal
treed
soyellaasnits vvial  ree. In fact,it h vvial  ree becomesdjustna subset
afet h globalo ree.

Coomah data diel	sdc
noalso be(movidaoutnafet h vvial bus  odelsnin erith
globalomodel. Some ofdtte mynipulyt4ahs afet hse diel	sdc
noalso be
t psolidated. Mostslikely, mynipulyt4ahddunii4ahsrwcll bi
ooeia set
afehelperddunii4ahs,(wsich ithebus dsaidrs yr p aroundotolinclud nany
bus-specificvi eis.

Ttod
oomah dfile eapd bridg sinnarfacprcurrentlyvrefleiisat h goalsiafes h
modern PC:ooam lyis h ability toldolseamlesslPluenandkPlay, powdramanachmvis,
apd hotpplue.e(Tthe odel dictst ddby Iceal apd Microsoftc(read: ACPI) ens
 -s
us t aup
pysdfile nin ithenis ei  yyidite
pysofet hse criteria.)

Iy reality, notp vnty bus ycll biLableato(s it.

nsuch operst4ahs. But,pmost
buseskycll s it.

nadmajority afet oseeoperst4ahs,kapd allnfu

 -(buseskycll.
Iy otthr wr ds,raobus s edvroesn'tks it.

nanaoperst4ah isnttodex ept4ah,
iystead af ttasotthr way around.



Dowystream Ac ess
~~~~~~~~~~~~~~~~~

Coomah data diel	sdh
vhdbeenamovidaoutnafeind4vidual bus laydrsain erao
oomah
data struc

 -. But,pt hse diel	sd usdvstcll biLac esseddbyis h bus laydrs,
apd sometimes bynt h rfile -specificvdsaidrs.

Otthr bus laydrsa
tvoencorrachd toldolwsedvhasebeenadon  dr ks h PCI laydr.
struc
 pci_dfionowilvokselike ttis:

struc
 pci_dfio{
	...

	struc
 dfile odfile ;
};

Non  firstst edvitnis(stah4callyialavcated. Ttisn eaos onlyion  
lavcat4aheah
dfile odiucoidry. Non  also t edvitnis(aupt h _ oo_daf struc
 pci_dfi. Ttisnis
topmake peopleoomink aboutnwtaupt hy're doihenyten sycoch4henbetweenis h bus
 saidrdapd eh  globalodsaidr;dapd eo preventoagyicsdnmindlesslc
sts between
etheswo.

TtodPCI bus laydr freelyiac essespt h diel	sdaf struc
 dfile . Itnknowseabout
t h struc
uriLaf struc
 pci_dfi,kapd itnswork wknowis h struc
uriLaf struc

rfile . PCI rfile snt edvh
vhdbeenac pvertyd gend 
alyido notptouchpt h diel	s
af struc
 dfile . Mitvoprfcisely, rfile -specificvdsaidrs fwork wohtptouch
diel	sdaf struc
 dfile  onlesslt hrenis 
 stros: cempela4henreasah to dolso.

Ttis abinrsct4ah isnprevent4aheofdunnecd aary paiodru 4heneransit4ahalophas s.
Ifet h ns   ofdtte diel	 tvang s orrisnremovid,et hno vnty dowystream rsaidr
ycll break. On ttasotthr vand, ifearly n h bus laydr (
ooeohtotte rfile 
laydr)iac essespstruc
 dfile ,(iteis arly n atdlaydr n atdneeds to tvang .


Ushr Innarfacp
~~~~~~~~~~~~~~

Byivirtu  ofdh
vihene timpleteohiv 
rchicaloviewsofdallntte rfile sninrith
sis ei, axt.

ihene timpleteohiv 
rchicaloviewsmo ue rspae obecomesdrelat4vely
easy. Ttisnh sebeenaac implished bynimplemvis4hena specialopurposeevirtual
dile sis ei ns ad nisfs. Itnisnhene (possible dr ks h ue rsmo mouis ith
wholansisfs dilesis einanyw hrenin ue rspae .

Ttisncenlbeadon  permanentlydbyoprovid4hent h folavwis: vistynin erith
/etc/fstab (undelot heprovis4ahettaupt h mouis point do s exisd,sofdtorrse):

non      	/nis	sisfs    rffaults		0	0

Ordbyohapd onlt h 
oomapd a4he:

# mouis -tnsisfs sisfs /nis

Wtenevsloao file eis inseriedoin erithe ree, a direiioty isncreatedddr kii.
Ttisndireiioty  yyib-apopulyted edveach laydr afediucoidry - eh  globalolaydr,
n h bus laydr, or t h dfile (laydr.

Ttodglobalolaydrrcurrentlyvcreates swoodiles - 'ns a'kapd 'powdr'. Ttp
dr mdrdonlyvret.

sottasns   ofdtte rfile . Th elatnarvret.

sotta
 urrent powdrastst  rfdtte rfile . Itnycll also be(ou ddto set ttee urrent
powdrastst . 

Tthebus laydrr yyialseicreate diles dr ks h dfile s itedipds wtile prob4hent h
bus. Foloexample,es h PCI laydrrcurrentlyvcreates 'irq'kapd 'resoure ' diles
dr keach PCI rfile .

Aedfile -specificvdsaidrr yyialseiaxt.

ndiles inrits rireiioty mo axt.se
dfile -specificvdata r ksunable innarfacps.

More inrta yh4ah aboutnithenisfs rireiioty layoutncenlbeafound in
s h otthr documvissninritisndireiioty andkin ithef	api
Documvisat4ah/dilesis eis/nisfs.txt.

