How filesystem transactions work 2016/03/17, 15:48:21
I'm doing some work on the system documentation. For this I made a diagram that shows how filesystem transactions are working in Ghost. The following explanation applies to the read operation when a driver task is involved. Filesystem drivers in Ghost run in user space, therefore they run in their own task.
Basics
- a filesystem node has a delegate that has the implementation of the underlying filesystem operations (read, write, open etc.)
- a filesystem node is mapped to a process via a file descriptor
- the transaction store holds a status for each running transaction
- a waiter object is used to store waiting information for one task and decide whether a task shall keep sleeping during scheduling
Process visualization

Process explanation
- requesting task creates the request structure and performs the read system call
- the system call handler looks up the filesystem node for the given file descriptor
- the system call handler creates a transaction handler that is responsible for keeping track of the transaction status and performing the requested operations
- the transaction handler tells the delegate to start a transaction
- the requesting task is put to sleep and a filesystem transaction waiter object is appended
- the delegate starts a new transaction in the transaction store (retrieving the transaction id)
- the delegate asks the driver task to perform the read operation
- the delegate sets the transaction status to "waiting"
- the driver task now does anything that is necessary to perform the read operation, like querying the hard disk etc.
- the driver task sets the status of the transaction to "finished" once its done (using the fs-set-transaction-status-syscall)
- the waiter object is continously checking the transaction store whether the transaction has finished. while the driver performs the transaction, the waiter tells the scheduler to keep waiting
- once the transaction status is "finished" the waiter object tells the transaction handler to finish the operation
- the transaction handler finishes the transaction by writing the result data into the requesting tasks request structure
- the waiter is removed from the requesting task
The request object in the requesting task now contains the result of the operation.
Comments
Write a comment...Moreover, the testing revealed the patient s CYP2C19 UM status with the star alleles 1 wildtype and 17 increased function, and a CYP2C9 IM status with the star alleles 1 wildtype and 2 decreased function <a href=https://buycialis.boats>canadian pharmacy cialis</a> 5 year course
Erin, USA 2022 06 06 02 08 07 <a href=http://brandviagra.top>over counter viagra</a>
This is not a foregone conclusion, because full length wild type progesterone receptor is constitutively nuclear, unlike the glucocorticoid receptor <a href=https://cialis.autos>cialis for sale in usa</a>
I told Martha about the problem and she treated me with acupuncture <a href=http://lasix.mom>buy lasix australia</a> Tobias TvGMCfsYbWsZWcWoJU 6 19 2022
<a href=http://stromectol.skin>oral ivermectin</a> Comparisons of HIFU for Fibroid Ablation to Myomectomy
<a href=http://accutane.one>accutane pill</a> com 20 E2 AD 90 20Manfaat 20Obat 20Viagra 20 20Cobra 20Viagra 20130 20Mg cobra viagra 130 mg We as a society must take these victims seriously and be absolutely clear to perpetrators that if they groom and abuse a child for sex they will be caught and they will spend a very long time in jail
Hale, GE, Hughes, CL, Burger, HG, et al <a href=https://clomid.mom/>side effects of clomid male</a> Together, these studies establish a new paradigm of HDAC inhibitor based therapy for hematologic malignancies in animals and man
13A is a dose matrix showing inhibition of the BVD 523 dabrafenib combination in A375 cells using the CellTiter Glo cell viability assay <a href=https://stromectol.ink/>where can i buy stromectol in the usa</a>
Nice Explanation. It has helped me alot to understand about the filesystem. Keep Up. :)
It is quite theoretical and can be used to understand the code better when inspecting it :) A more extensive documentation is in progress.