SlideShare a Scribd company logo
1 of 7
Coda Directory HandlingCoda Directory Handling
Peter J BraamPeter J Braam
Data StructuresData Structures
Directory contents: DIR apiDirectory contents: DIR api
Directory handles: DH apiDirectory handles: DH api
Directory inodes: DI apiDirectory inodes: DI api
Directory handle cache: DC apiDirectory handle cache: DC api
Fid support: FID apiFid support: FID api
Directory contentsDirectory contents
Blob of data -- size multiple of 2048Blob of data -- size multiple of 2048
bytesbytes
Contains names and NDirFids (vnode,Contains names and NDirFids (vnode,
uniq) in network orderuniq) in network order
Contains freemap, hashtable and otherContains freemap, hashtable and other
organizational structureorganizational structure
Contents stored contiguously in VenusContents stored contiguously in Venus
RVM, by page in server RVMRVM, by page in server RVM
Directory HandlesDirectory Handles
Contain pointers, lock and refcountsContain pointers, lock and refcounts
Stored in VM in the server in hash tableStored in VM in the server in hash table
Stored in RVM in client, pointed to byStored in RVM in client, pointed to by
fsobjs as part of VenusDirData.fsobjs as part of VenusDirData.
Most operations on directories goMost operations on directories go
through the DH api.through the DH api.
Server has a DH cache -- needed forServer has a DH cache -- needed for
Copy on Write refcounting.Copy on Write refcounting.
Dir InodesDir Inodes
Contain a page map for directory pagesContain a page map for directory pages
in server RVMin server RVM
Routines for retrieving and storing DH’sRoutines for retrieving and storing DH’s
in DI’s and vice versain DI’s and vice versa
Copy routineCopy routine
Guts of server directory data storageGuts of server directory data storage
LookupLookup
Lookup maps name to inode numberLookup maps name to inode number
Lookup must go from kernel to VenusLookup must go from kernel to Venus
through venus_lookup upcallthrough venus_lookup upcall
Mostly lookup uses inode numberMostly lookup uses inode number
computed from FIDcomputed from FID
Root directory of volume is assignedRoot directory of volume is assigned
inode number of mount point by Venusinode number of mount point by Venus
ReaddirReaddir
Readdir needs a Unix file handeReaddir needs a Unix file hande
(directory handle)(directory handle)
Upon open of a directory Venus writesUpon open of a directory Venus writes
out a BSD formatted directory containerout a BSD formatted directory container
filefile
File contains only names, no inodeFile contains only names, no inode
numbers or types (POSIX says this isnumbers or types (POSIX says this is
all we need).all we need).

More Related Content

What's hot

Introducing FSter
Introducing FSterIntroducing FSter
Introducing FSter
itsmesrl
 
Practical Implementation of Space-Efficient Dynamic Keyword Dictionaries
Practical Implementation of Space-Efficient Dynamic Keyword DictionariesPractical Implementation of Space-Efficient Dynamic Keyword Dictionaries
Practical Implementation of Space-Efficient Dynamic Keyword Dictionaries
Shunsuke Kanda
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
koolkampus
 

What's hot (20)

Using NLP to Explore Entity Relationships in COVID-19 Literature
Using NLP to Explore Entity Relationships in COVID-19 LiteratureUsing NLP to Explore Entity Relationships in COVID-19 Literature
Using NLP to Explore Entity Relationships in COVID-19 Literature
 
First steps towards publishing library data on the semantic web
First steps towards publishing library data on the semantic webFirst steps towards publishing library data on the semantic web
First steps towards publishing library data on the semantic web
 
Hadoop distributed file system
Hadoop distributed file systemHadoop distributed file system
Hadoop distributed file system
 
I Mapreduced a Neo store: Creating large Neo4j Databases with Hadoop
I Mapreduced a Neo store: Creating large Neo4j Databases with HadoopI Mapreduced a Neo store: Creating large Neo4j Databases with Hadoop
I Mapreduced a Neo store: Creating large Neo4j Databases with Hadoop
 
Introduction to the design and specification of file structures
Introduction to the design and specification of file structuresIntroduction to the design and specification of file structures
Introduction to the design and specification of file structures
 
Introducing FSter
Introducing FSterIntroducing FSter
Introducing FSter
 
Practical Implementation of Space-Efficient Dynamic Keyword Dictionaries
Practical Implementation of Space-Efficient Dynamic Keyword DictionariesPractical Implementation of Space-Efficient Dynamic Keyword Dictionaries
Practical Implementation of Space-Efficient Dynamic Keyword Dictionaries
 
Secondary storage structure
Secondary storage structureSecondary storage structure
Secondary storage structure
 
Distributed Logging with Kubernetes
Distributed Logging with KubernetesDistributed Logging with Kubernetes
Distributed Logging with Kubernetes
 
Red Hat Gluster Storage
Red Hat Gluster StorageRed Hat Gluster Storage
Red Hat Gluster Storage
 
March 2011 HUG: HDFS Federation
March 2011 HUG: HDFS FederationMarch 2011 HUG: HDFS Federation
March 2011 HUG: HDFS Federation
 
Resilient file system
Resilient file systemResilient file system
Resilient file system
 
Tc accelerate-2019-05
Tc accelerate-2019-05Tc accelerate-2019-05
Tc accelerate-2019-05
 
Computers12 Ch6
Computers12 Ch6Computers12 Ch6
Computers12 Ch6
 
Top 10 database optimization tips
Top 10 database optimization tipsTop 10 database optimization tips
Top 10 database optimization tips
 
HDF5 Life cycle of data
HDF5 Life cycle of dataHDF5 Life cycle of data
HDF5 Life cycle of data
 
Redis 101
Redis 101Redis 101
Redis 101
 
File organisation
File organisationFile organisation
File organisation
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
 
Chapter13
Chapter13Chapter13
Chapter13
 

Similar to Directories

iRODS & B2SAFE for users
iRODS & B2SAFE for usersiRODS & B2SAFE for users
iRODS & B2SAFE for users
EUDAT
 
Splunk Dynamic lookup
Splunk Dynamic lookupSplunk Dynamic lookup
Splunk Dynamic lookup
Splunk
 

Similar to Directories (20)

Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data SourcesVirtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
 
Spark mhug2
Spark mhug2Spark mhug2
Spark mhug2
 
HBaseConAsia2018 Track3-6: HBase at Meituan
HBaseConAsia2018 Track3-6: HBase at MeituanHBaseConAsia2018 Track3-6: HBase at Meituan
HBaseConAsia2018 Track3-6: HBase at Meituan
 
Apache Hive, data segmentation and bucketing
Apache Hive, data segmentation and bucketingApache Hive, data segmentation and bucketing
Apache Hive, data segmentation and bucketing
 
BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5
 
Hive
HiveHive
Hive
 
Zend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJSZend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJS
 
Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect
 
Backup / Restore to Cloud Storage with vRanger Pro and CloudArray software
Backup / Restore to Cloud Storage with vRanger Pro and CloudArray softwareBackup / Restore to Cloud Storage with vRanger Pro and CloudArray software
Backup / Restore to Cloud Storage with vRanger Pro and CloudArray software
 
InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internal
 
Anatomy of Drupal
Anatomy of DrupalAnatomy of Drupal
Anatomy of Drupal
 
Etu L2 Training - Hadoop 企業應用實作
Etu L2 Training - Hadoop 企業應用實作Etu L2 Training - Hadoop 企業應用實作
Etu L2 Training - Hadoop 企業應用實作
 
Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...
 
iRODS & B2SAFE for users
iRODS & B2SAFE for usersiRODS & B2SAFE for users
iRODS & B2SAFE for users
 
A great clash of symbols
A great clash of symbolsA great clash of symbols
A great clash of symbols
 
Engineering an Encrypted Storage Engine
Engineering an Encrypted Storage EngineEngineering an Encrypted Storage Engine
Engineering an Encrypted Storage Engine
 
Splunk Dynamic lookup
Splunk Dynamic lookupSplunk Dynamic lookup
Splunk Dynamic lookup
 
Infinite Scalable Systems with Docker
Infinite Scalable Systems with DockerInfinite Scalable Systems with Docker
Infinite Scalable Systems with Docker
 
Using Hadoop and Hive to Optimize Travel Search , WindyCityDB 2010
Using Hadoop and Hive to Optimize Travel Search, WindyCityDB 2010Using Hadoop and Hive to Optimize Travel Search, WindyCityDB 2010
Using Hadoop and Hive to Optimize Travel Search , WindyCityDB 2010
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Directories

  • 1. Coda Directory HandlingCoda Directory Handling Peter J BraamPeter J Braam
  • 2. Data StructuresData Structures Directory contents: DIR apiDirectory contents: DIR api Directory handles: DH apiDirectory handles: DH api Directory inodes: DI apiDirectory inodes: DI api Directory handle cache: DC apiDirectory handle cache: DC api Fid support: FID apiFid support: FID api
  • 3. Directory contentsDirectory contents Blob of data -- size multiple of 2048Blob of data -- size multiple of 2048 bytesbytes Contains names and NDirFids (vnode,Contains names and NDirFids (vnode, uniq) in network orderuniq) in network order Contains freemap, hashtable and otherContains freemap, hashtable and other organizational structureorganizational structure Contents stored contiguously in VenusContents stored contiguously in Venus RVM, by page in server RVMRVM, by page in server RVM
  • 4. Directory HandlesDirectory Handles Contain pointers, lock and refcountsContain pointers, lock and refcounts Stored in VM in the server in hash tableStored in VM in the server in hash table Stored in RVM in client, pointed to byStored in RVM in client, pointed to by fsobjs as part of VenusDirData.fsobjs as part of VenusDirData. Most operations on directories goMost operations on directories go through the DH api.through the DH api. Server has a DH cache -- needed forServer has a DH cache -- needed for Copy on Write refcounting.Copy on Write refcounting.
  • 5. Dir InodesDir Inodes Contain a page map for directory pagesContain a page map for directory pages in server RVMin server RVM Routines for retrieving and storing DH’sRoutines for retrieving and storing DH’s in DI’s and vice versain DI’s and vice versa Copy routineCopy routine Guts of server directory data storageGuts of server directory data storage
  • 6. LookupLookup Lookup maps name to inode numberLookup maps name to inode number Lookup must go from kernel to VenusLookup must go from kernel to Venus through venus_lookup upcallthrough venus_lookup upcall Mostly lookup uses inode numberMostly lookup uses inode number computed from FIDcomputed from FID Root directory of volume is assignedRoot directory of volume is assigned inode number of mount point by Venusinode number of mount point by Venus
  • 7. ReaddirReaddir Readdir needs a Unix file handeReaddir needs a Unix file hande (directory handle)(directory handle) Upon open of a directory Venus writesUpon open of a directory Venus writes out a BSD formatted directory containerout a BSD formatted directory container filefile File contains only names, no inodeFile contains only names, no inode numbers or types (POSIX says this isnumbers or types (POSIX says this is all we need).all we need).