SlideShare a Scribd company logo
1 of 12
Download to read offline
Glusterfs Session #11
Locks xlator entrylks
Scope
- What is the behavior of entrylks
- Code walk through of entrylks
- Dependency of entrylk, inodelk
- Optimization of the interaction
Behavior of entrylks
- To recap, entrylks are used to synchronize entry operations on directories.
- In inodelks range(offset, length) is what we synchronize on. In entrylks we
synchronize on the name.
- In entrylks NULL name represents full directory lock
Behavior of entrylks
If names are different they are granted irrespective of the lk-owner/client
Directory dir1
Name1 Name2
Directory: dir1
Behavior of entrylks
If names are conflicting they are not granted if the lk-owner/client differs
Directory dir1
Name1 Name1
Directory: dir1
Behavior of entrylks
If names are conflicting they are not granted if the lk-owner/client differs
Directory dir1
Name1 NULL(value)
Directory: dir1
Behavior of entrylks
If names are not conflicting they are granted if the lk-owner, client matches
Directory dir1
Name1 Name1
Directory: dir1
Behavior of entrylks
If names are same they are granted if the lk-owner, client matches
Directory dir1
Name1 NULL(value)
Directory: dir1
Code walk through
Dependency of entrylk, inodelk
- When doing parallel operations on EC, we sometimes faced this issue where
by the time inode is going to be unlocked, entry is already removed leading to
issues while doing operations on the inode
- https://github.com/gluster/glusterfs/issues/990
- There was no synchronization between entry operations and inode operations
Solution
- Block entry deletion until inodelk is unlocked.
- Code walkthrough
Q & A

More Related Content

What's hot

Polymorphism
PolymorphismPolymorphism
Polymorphismzindadili
 
Asynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesAsynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to AkkaKnoldus Inc.
 
Dive into Akka Actors
Dive into Akka ActorsDive into Akka Actors
Dive into Akka ActorsKnoldus Inc.
 
Asynchronous Programming with Kotlin
Asynchronous Programming with KotlinAsynchronous Programming with Kotlin
Asynchronous Programming with KotlinJ On The Beach
 

What's hot (6)

Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Asynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesAsynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & Promises
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to Akka
 
Introduction to Connascence
Introduction to ConnascenceIntroduction to Connascence
Introduction to Connascence
 
Dive into Akka Actors
Dive into Akka ActorsDive into Akka Actors
Dive into Akka Actors
 
Asynchronous Programming with Kotlin
Asynchronous Programming with KotlinAsynchronous Programming with Kotlin
Asynchronous Programming with Kotlin
 

More from 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 offsPranith 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 healingPranith 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 fopsPranith Karampuri
 
Glusterfs session #13 replication introduction
Glusterfs session #13   replication introductionGlusterfs session #13   replication introduction
Glusterfs session #13 replication introductionPranith Karampuri
 
Glusterfs session #10 locks xlator inodelks
Glusterfs session #10   locks xlator inodelksGlusterfs session #10   locks xlator inodelks
Glusterfs session #10 locks xlator inodelksPranith Karampuri
 
Glusterfs session #9 index xlator
Glusterfs session #9   index xlatorGlusterfs session #9   index xlator
Glusterfs session #9 index xlatorPranith 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-threadsPranith Karampuri
 
Glusterfs session #7 client, server interactions
Glusterfs session #7   client, server interactionsGlusterfs session #7   client, server interactions
Glusterfs session #7 client, server interactionsPranith 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 layerPranith 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 lifecyclesPranith 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 modelPranith Karampuri
 
Gluster dev session #3 xlator interface
Gluster dev session #3   xlator interfaceGluster dev session #3   xlator interface
Gluster dev session #3 xlator interfacePranith Karampuri
 
Glusterfs session #2 1 layer above disk filesystems
Glusterfs session #2   1 layer above disk filesystemsGlusterfs session #2   1 layer above disk filesystems
Glusterfs session #2 1 layer above disk filesystemsPranith Karampuri
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystemsPranith Karampuri
 

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
 
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
 
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)
 
Glusterfs session #14 replication update fops
Glusterfs session #14   replication update fopsGlusterfs session #14   replication update fops
Glusterfs session #14 replication update fops
 
Glusterfs session #13 replication introduction
Glusterfs session #13   replication introductionGlusterfs session #13   replication introduction
Glusterfs session #13 replication introduction
 
Glusterfs session #10 locks xlator inodelks
Glusterfs session #10   locks xlator inodelksGlusterfs session #10   locks xlator inodelks
Glusterfs session #10 locks xlator inodelks
 
Glusterfs session #9 index xlator
Glusterfs session #9   index xlatorGlusterfs session #9   index xlator
Glusterfs session #9 index xlator
 
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
 
Glusterfs session #7 client, server interactions
Glusterfs session #7   client, server interactionsGlusterfs session #7   client, server interactions
Glusterfs session #7 client, server interactions
 
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
 
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
 
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
 
Gluster dev session #3 xlator interface
Gluster dev session #3   xlator interfaceGluster dev session #3   xlator interface
Gluster dev session #3 xlator interface
 
Glusterfs session #2 1 layer above disk filesystems
Glusterfs session #2   1 layer above disk filesystemsGlusterfs session #2   1 layer above disk filesystems
Glusterfs session #2 1 layer above disk filesystems
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystems
 

Recently uploaded

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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 ImpactPECB
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
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.pdfJayanti Pande
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Glusterfs session #11 locks xlator entrylks

  • 1. Glusterfs Session #11 Locks xlator entrylks
  • 2. Scope - What is the behavior of entrylks - Code walk through of entrylks - Dependency of entrylk, inodelk - Optimization of the interaction
  • 3. Behavior of entrylks - To recap, entrylks are used to synchronize entry operations on directories. - In inodelks range(offset, length) is what we synchronize on. In entrylks we synchronize on the name. - In entrylks NULL name represents full directory lock
  • 4. Behavior of entrylks If names are different they are granted irrespective of the lk-owner/client Directory dir1 Name1 Name2 Directory: dir1
  • 5. Behavior of entrylks If names are conflicting they are not granted if the lk-owner/client differs Directory dir1 Name1 Name1 Directory: dir1
  • 6. Behavior of entrylks If names are conflicting they are not granted if the lk-owner/client differs Directory dir1 Name1 NULL(value) Directory: dir1
  • 7. Behavior of entrylks If names are not conflicting they are granted if the lk-owner, client matches Directory dir1 Name1 Name1 Directory: dir1
  • 8. Behavior of entrylks If names are same they are granted if the lk-owner, client matches Directory dir1 Name1 NULL(value) Directory: dir1
  • 10. Dependency of entrylk, inodelk - When doing parallel operations on EC, we sometimes faced this issue where by the time inode is going to be unlocked, entry is already removed leading to issues while doing operations on the inode - https://github.com/gluster/glusterfs/issues/990 - There was no synchronization between entry operations and inode operations
  • 11. Solution - Block entry deletion until inodelk is unlocked. - Code walkthrough
  • 12. Q & A