Skip to content
/ txfs Public

TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions (ATC 18)

License

Notifications You must be signed in to change notification settings

ut-osa/txfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Texas Transactional File System (TxFS)

TxFS is a novel transactional file system that builds upon the file system’s atomic-update mechanism such as journaling. Though prior work has explored a number of transactional file systems, TxFS has a unique set of properties: a simple API, portability across different hardware, high performance, low complexity (by building on the journal), and full ACID transactions.

Please cite the following paper if you use TxFS: TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions. Yige Hu, Zhiting Zhu, Ian Neal, Youngjin Kwon, Tianyu Cheng, Vijay Chidambaram, and Emmett Witchel ATC 18. Bibtex


In this repository

This repository includes two main components:

  1. linux-3.18.22-mod. This contains the modified Linux kernel for TxFS.
    • fs/user_tx.c defines the system calls provided by TxFS;
    • fs/memlog contains TxFS's internal bookkeeping code;
    • fs/*_memlog.c contains TxFS's changes to the VFS layer;
    • fs/ext4/*_memlog.c contains TxFS's major changes to ext4;
    • fs/jbd2/transaction.c contains TxFS's changes to JBD2.
    • mm/filemap.c contains TxFS's changes to memory page accesses.
  2. benchmark. Contains benchmarks used to evaluate TxFS (we have only released microbenchmarks).
    • syscall_wrapper contains a system call wrapper providing API calls fs_tx_begin/end/abort, and an example showing how to use the wrapper;
    • syscall contains a set of tests on the system calls supported by TxFS transactions;
    • multithread contains multi-threaded tests;
    • stress_test randomly executes file system operations with multiple threads.

Inside linux-3.18.22-mod, compiling the kernel follows the standard method of configure and make. To see examples of TxFS in action, check out the examples inside benchmark.


Example

We present an example where two files file1 and file2 are modified atomically. For the sake of brevity, we do not show error cases.

ret = fs_tx_begin();
fd1 = open("file1.txt", O_RDWR | O_APPEND, 0644);
fd2 = open("file2.txt", O_RDWR | O_APPEND, 0644);
write(fd1, "foo\n", 4);
write(fd2, "bar\n", 4);
ret = ret = fs_tx_commit();

The user does not have to add any other code apart from fs_tx_begin() and fs_tx_commit(). Once fs_tx_commit returns successfully, reads of both files will include both foo and bar.

syscall_wrapper in the benchmmark directory has the more complete version of this example. You can find it here.


Contact

Please contact us at [email protected] with any questions. Drop us a note if you would like to use TxFS in your research.

About

TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions (ATC 18)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published