SlideShare a Scribd company logo
Glusterfs Session #2
1 Layer above Disk Filesystems
Scope
- On disk data structures
- In memory data structures
- How are system calls represented in glusterfs
- Code walk through for sample fops in posix
On disk data structures
- Glusterfs is a userspace filesystem and not a disk filesystem.
- Disk filesystem with extended attributes support is a requirement for glusterfs
- All of this functionality is provided by the posix xlator.(Think of xlator like a
module for now. It will be covered in future sessions)
Inode/data blocks
.glusterfs-handle Actual path on disk fs
Inode on disk
Disk File system view
Gluster view
Inode/data blocks
- Gluster tries to use the file from the underlying disk as much as possible.
Extra attributes that are needed to function are added as extended attributes.
- Cluster wide inode-number is represented as gfid short for glusterfs-id.(uuid)
- A file with .glusterfs/gfid-string[0,1]/gfid-string[2,3]/gfid-string will be placed as
hardlink for files and softlink for directories. All operations on the files will be
translated to system calls on these files by the posix-layer.
- Demo
In memory data structures
Inode
File descriptor
path dirfd/path
In memory data structures - loc_t
Inode
path struct _loc {
const char *path;
const char *name;
inode_t *inode;
inode_t *parent;
uuid_t gfid;
uuid_t pargfid;
};
path -> inode
- In glusterfs Lookup is the File Operation(Fop) that
resolves a file path into an inode(i.e. Filepath ->
gfid resolution)
In memory data structures - inode_t
Inode
inode_t
struct _inode {
inode_table_t *table;
uuid_t gfid;
gf_atomic_t nlookup;
uint32_t fd_count;
uint32_t ref;
ia_type_t ia_type;
struct list_head fd_list;
struct list_head dentry_list; ….
};
path -> inode
- For a given path get the gfid using getxattr system
call for xattr trusted.gfid on the file
- Do a stat on the file to know the other inode
attributes
- Fill the structure and link it in inode-table
In memory data structures - dentry_t
Inode
dentry_t
struct _dentry {
struct list_head dentry_list;
inode_t *inode;
char *name;
inode_t *parent;
};
In memory data structures - fd_t
Inode
fd_t
struct _fd {
uint64_t pid;
int32_t flags;
gf_atomic_t refcount;
struct list_head inode_list;
struct _inode *inode;
...
};
Loc_t/Inode_t -> fd_t
- OPEN Fop is used for doing an open on the file.
- This is equivalent to doing an open on a path in user applications
- Since in glusterfs we can open the path using either pgfid/name or with just
gfid loc_t structure is passed for open fop.
- Do the syscall open on either the given path or the gfid-handle. Fill the fd_t
structure and add it into fd_list in the inode_t structure. Take necessary refs.
Fops
- All operations that happen on the files are represented as FOPs in glusterfs
- All the FOPs are executed either on loc_t or fd_t
- Posix xlator code walk-through for
- LOOKUP
- OPEN
- MKDIR
- WRITE
- READ
- STAT
Q & A
Ad

More Related Content

What's hot (20)

Linux red hat overview and installation
Linux red hat overview and installationLinux red hat overview and installation
Linux red hat overview and installation
devenderbhati
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
Chris Simmonds
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
shimosawa
 
NTFS.ppt
NTFS.pptNTFS.ppt
NTFS.ppt
jlmansilla
 
TechWiseTV Workshop: HyperFlex 3.0
TechWiseTV Workshop: HyperFlex 3.0TechWiseTV Workshop: HyperFlex 3.0
TechWiseTV Workshop: HyperFlex 3.0
Robb Boyd
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSH
Sage Weil
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
National Cheng Kung University
 
why we need ext4
why we need ext4why we need ext4
why we need ext4
Hao(Robin) Dong
 
FAT vs NTFS
FAT vs NTFSFAT vs NTFS
FAT vs NTFS
Arshad Qureshi
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
Opersys inc.
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
 
NTFS file system
NTFS file systemNTFS file system
NTFS file system
Ravi Yasas
 
Memory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdfMemory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdf
Adrian Huang
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
Adrian Huang
 
Linux scheduling and input and output
Linux scheduling and input and outputLinux scheduling and input and output
Linux scheduling and input and output
Sanidhya Chugh
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
ABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
ABS 2013: Dive into Android Networking - Adding Ethernet ConnectivityABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
ABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
Benjamin Zores
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
Henry Osborne
 
Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page Folios
Adrian Huang
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
Linaro
 
Linux red hat overview and installation
Linux red hat overview and installationLinux red hat overview and installation
Linux red hat overview and installation
devenderbhati
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
Chris Simmonds
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
shimosawa
 
TechWiseTV Workshop: HyperFlex 3.0
TechWiseTV Workshop: HyperFlex 3.0TechWiseTV Workshop: HyperFlex 3.0
TechWiseTV Workshop: HyperFlex 3.0
Robb Boyd
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSH
Sage Weil
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
Opersys inc.
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
 
NTFS file system
NTFS file systemNTFS file system
NTFS file system
Ravi Yasas
 
Memory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdfMemory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdf
Adrian Huang
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
Adrian Huang
 
Linux scheduling and input and output
Linux scheduling and input and outputLinux scheduling and input and output
Linux scheduling and input and output
Sanidhya Chugh
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
ABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
ABS 2013: Dive into Android Networking - Adding Ethernet ConnectivityABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
ABS 2013: Dive into Android Networking - Adding Ethernet Connectivity
Benjamin Zores
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
Henry Osborne
 
Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page Folios
Adrian Huang
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
Linaro
 

Similar to Glusterfs session #2 1 layer above disk filesystems (20)

Vfs
VfsVfs
Vfs
Waqas !!!!
 
Linux
LinuxLinux
Linux
keydak11
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebook
Yash Gulati
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebook
Yash Gulati
 
sift_cheat_sheet.pdf
sift_cheat_sheet.pdfsift_cheat_sheet.pdf
sift_cheat_sheet.pdf
NaveenVarma Chintalapati
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystems
Pranith Karampuri
 
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdfPage Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
ycelgemici1
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
Emertxe Information Technologies Pvt Ltd
 
Unit 3
Unit  3Unit  3
Unit 3
siddr
 
How to install gentoo distributed
How to install gentoo distributedHow to install gentoo distributed
How to install gentoo distributed
SongWang54
 
HDFS User Reference
HDFS User ReferenceHDFS User Reference
HDFS User Reference
Biju Nair
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
Muhammad Moinur Rahman
 
Char Drivers And Debugging Techniques
Char Drivers And Debugging TechniquesChar Drivers And Debugging Techniques
Char Drivers And Debugging Techniques
YourHelper1
 
Linux.pdf
Linux.pdfLinux.pdf
Linux.pdf
MohammedNasser364522
 
When ACLs Attack
When ACLs AttackWhen ACLs Attack
When ACLs Attack
andy_leonard
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
Tushar B Kute
 
Unix.system.calls
Unix.system.callsUnix.system.calls
Unix.system.calls
GRajendra
 
Lecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file systemLecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file system
Alchemist095
 
Unix Administration
Unix AdministrationUnix Administration
Unix Administration
Nishant Munjal
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebook
Yash Gulati
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebook
Yash Gulati
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystems
Pranith Karampuri
 
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdfPage Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
ycelgemici1
 
Unit 3
Unit  3Unit  3
Unit 3
siddr
 
How to install gentoo distributed
How to install gentoo distributedHow to install gentoo distributed
How to install gentoo distributed
SongWang54
 
HDFS User Reference
HDFS User ReferenceHDFS User Reference
HDFS User Reference
Biju Nair
 
Char Drivers And Debugging Techniques
Char Drivers And Debugging TechniquesChar Drivers And Debugging Techniques
Char Drivers And Debugging Techniques
YourHelper1
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
Tushar B Kute
 
Unix.system.calls
Unix.system.callsUnix.system.calls
Unix.system.calls
GRajendra
 
Lecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file systemLecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file system
Alchemist095
 
Ad

More from Pranith Karampuri (15)

Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offsGlusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offs
Pranith Karampuri
 
Glusterfs session #12 locks xlator posixlk
Glusterfs session #12   locks xlator posixlkGlusterfs session #12   locks xlator posixlk
Glusterfs session #12 locks xlator posixlk
Pranith Karampuri
 
Glusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #17 self heal daemon data, metadata, entry healingGlusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #17 self heal daemon data, metadata, entry healing
Pranith Karampuri
 
Glusterfs session #16 self-heal daemon ( for replication)
Glusterfs session #16   self-heal daemon ( for replication)Glusterfs session #16   self-heal daemon ( for replication)
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
Glusterfs session #14 replication update fops
Glusterfs session #14   replication update fopsGlusterfs session #14   replication update fops
Glusterfs session #14 replication update fops
Pranith Karampuri
 
Glusterfs session #13 replication introduction
Glusterfs session #13   replication introductionGlusterfs session #13   replication introduction
Glusterfs session #13 replication introduction
Pranith Karampuri
 
Glusterfs session #11 locks xlator entrylks
Glusterfs session #11   locks xlator entrylksGlusterfs session #11   locks xlator entrylks
Glusterfs session #11 locks xlator entrylks
Pranith Karampuri
 
Glusterfs session #10 locks xlator inodelks
Glusterfs session #10   locks xlator inodelksGlusterfs session #10   locks xlator inodelks
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
Glusterfs session #9 index xlator
Glusterfs session #9   index xlatorGlusterfs session #9   index xlator
Glusterfs session #9 index xlator
Pranith Karampuri
 
Glusterfs session #8 memory tracking infra, io-threads
Glusterfs session #8   memory tracking infra, io-threadsGlusterfs session #8   memory tracking infra, io-threads
Glusterfs session #8 memory tracking infra, io-threads
Pranith Karampuri
 
Glusterfs session #7 client, server interactions
Glusterfs session #7   client, server interactionsGlusterfs session #7   client, server interactions
Glusterfs session #7 client, server interactions
Pranith Karampuri
 
Gluster dev session #6 understanding gluster's network communication layer
Gluster dev session #6  understanding gluster's network   communication layerGluster dev session #6  understanding gluster's network   communication layer
Gluster dev session #6 understanding gluster's network communication layer
Pranith Karampuri
 
Glusterfs session #5 inode t, fd-t lifecycles
Glusterfs session #5   inode t, fd-t lifecyclesGlusterfs session #5   inode t, fd-t lifecycles
Glusterfs session #5 inode t, fd-t lifecycles
Pranith Karampuri
 
Glusterfs session #4 call frame and programming model
Glusterfs session #4   call frame and programming modelGlusterfs session #4   call frame and programming model
Glusterfs session #4 call frame and programming model
Pranith Karampuri
 
Gluster dev session #3 xlator interface
Gluster dev session #3   xlator interfaceGluster dev session #3   xlator interface
Gluster dev session #3 xlator interface
Pranith Karampuri
 
Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offsGlusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offs
Pranith Karampuri
 
Glusterfs session #12 locks xlator posixlk
Glusterfs session #12   locks xlator posixlkGlusterfs session #12   locks xlator posixlk
Glusterfs session #12 locks xlator posixlk
Pranith Karampuri
 
Glusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #17 self heal daemon data, metadata, entry healingGlusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #17 self heal daemon data, metadata, entry healing
Pranith Karampuri
 
Glusterfs session #16 self-heal daemon ( for replication)
Glusterfs session #16   self-heal daemon ( for replication)Glusterfs session #16   self-heal daemon ( for replication)
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
Glusterfs session #14 replication update fops
Glusterfs session #14   replication update fopsGlusterfs session #14   replication update fops
Glusterfs session #14 replication update fops
Pranith Karampuri
 
Glusterfs session #13 replication introduction
Glusterfs session #13   replication introductionGlusterfs session #13   replication introduction
Glusterfs session #13 replication introduction
Pranith Karampuri
 
Glusterfs session #11 locks xlator entrylks
Glusterfs session #11   locks xlator entrylksGlusterfs session #11   locks xlator entrylks
Glusterfs session #11 locks xlator entrylks
Pranith Karampuri
 
Glusterfs session #10 locks xlator inodelks
Glusterfs session #10   locks xlator inodelksGlusterfs session #10   locks xlator inodelks
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
Glusterfs session #9 index xlator
Glusterfs session #9   index xlatorGlusterfs session #9   index xlator
Glusterfs session #9 index xlator
Pranith Karampuri
 
Glusterfs session #8 memory tracking infra, io-threads
Glusterfs session #8   memory tracking infra, io-threadsGlusterfs session #8   memory tracking infra, io-threads
Glusterfs session #8 memory tracking infra, io-threads
Pranith Karampuri
 
Glusterfs session #7 client, server interactions
Glusterfs session #7   client, server interactionsGlusterfs session #7   client, server interactions
Glusterfs session #7 client, server interactions
Pranith Karampuri
 
Gluster dev session #6 understanding gluster's network communication layer
Gluster dev session #6  understanding gluster's network   communication layerGluster dev session #6  understanding gluster's network   communication layer
Gluster dev session #6 understanding gluster's network communication layer
Pranith Karampuri
 
Glusterfs session #5 inode t, fd-t lifecycles
Glusterfs session #5   inode t, fd-t lifecyclesGlusterfs session #5   inode t, fd-t lifecycles
Glusterfs session #5 inode t, fd-t lifecycles
Pranith Karampuri
 
Glusterfs session #4 call frame and programming model
Glusterfs session #4   call frame and programming modelGlusterfs session #4   call frame and programming model
Glusterfs session #4 call frame and programming model
Pranith Karampuri
 
Gluster dev session #3 xlator interface
Gluster dev session #3   xlator interfaceGluster dev session #3   xlator interface
Gluster dev session #3 xlator interface
Pranith Karampuri
 
Ad

Recently uploaded (20)

Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 

Glusterfs session #2 1 layer above disk filesystems

  • 1. Glusterfs Session #2 1 Layer above Disk Filesystems
  • 2. Scope - On disk data structures - In memory data structures - How are system calls represented in glusterfs - Code walk through for sample fops in posix
  • 3. On disk data structures - Glusterfs is a userspace filesystem and not a disk filesystem. - Disk filesystem with extended attributes support is a requirement for glusterfs - All of this functionality is provided by the posix xlator.(Think of xlator like a module for now. It will be covered in future sessions)
  • 4. Inode/data blocks .glusterfs-handle Actual path on disk fs Inode on disk Disk File system view Gluster view
  • 5. Inode/data blocks - Gluster tries to use the file from the underlying disk as much as possible. Extra attributes that are needed to function are added as extended attributes. - Cluster wide inode-number is represented as gfid short for glusterfs-id.(uuid) - A file with .glusterfs/gfid-string[0,1]/gfid-string[2,3]/gfid-string will be placed as hardlink for files and softlink for directories. All operations on the files will be translated to system calls on these files by the posix-layer. - Demo
  • 6. In memory data structures Inode File descriptor path dirfd/path
  • 7. In memory data structures - loc_t Inode path struct _loc { const char *path; const char *name; inode_t *inode; inode_t *parent; uuid_t gfid; uuid_t pargfid; };
  • 8. path -> inode - In glusterfs Lookup is the File Operation(Fop) that resolves a file path into an inode(i.e. Filepath -> gfid resolution)
  • 9. In memory data structures - inode_t Inode inode_t struct _inode { inode_table_t *table; uuid_t gfid; gf_atomic_t nlookup; uint32_t fd_count; uint32_t ref; ia_type_t ia_type; struct list_head fd_list; struct list_head dentry_list; …. };
  • 10. path -> inode - For a given path get the gfid using getxattr system call for xattr trusted.gfid on the file - Do a stat on the file to know the other inode attributes - Fill the structure and link it in inode-table
  • 11. In memory data structures - dentry_t Inode dentry_t struct _dentry { struct list_head dentry_list; inode_t *inode; char *name; inode_t *parent; };
  • 12. In memory data structures - fd_t Inode fd_t struct _fd { uint64_t pid; int32_t flags; gf_atomic_t refcount; struct list_head inode_list; struct _inode *inode; ... };
  • 13. Loc_t/Inode_t -> fd_t - OPEN Fop is used for doing an open on the file. - This is equivalent to doing an open on a path in user applications - Since in glusterfs we can open the path using either pgfid/name or with just gfid loc_t structure is passed for open fop. - Do the syscall open on either the given path or the gfid-handle. Fill the fd_t structure and add it into fd_list in the inode_t structure. Take necessary refs.
  • 14. Fops - All operations that happen on the files are represented as FOPs in glusterfs - All the FOPs are executed either on loc_t or fd_t - Posix xlator code walk-through for - LOOKUP - OPEN - MKDIR - WRITE - READ - STAT
  • 15. Q & A
  翻译: