You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch enhances libext module to make the ext2/3/4 filesystem
driver thread-safe. It mostly relies on the changes made to the OSv
fork of lwext4 to add mutex-based protection where needed -
osvunikernel/lwext4@44c3329.
More specifically, this patch implements 3 pairs of lock()/unlock()
callback functions:
- inode_alloc_lock() and inode_alloc_unlock() to guard
allocation of i-node numbers
- block_alloc_lock() and block_alloc_unlock() to guard
allocation of file blocks
- bcache_alloc_lock() and bcache_alloc_unlock() to guard
access to global metadata block cache
The changes made to lwext4 that utilize these lock/unlock
function along with locking at vnode level in VFS layer
should make libext thread-safe.
Various tests involving fio have been conducted to verify
libext is thread-safe:
./modules/libext/test.sh '/fio --name=fiotest --directory=/data/read --size 1M --numjobs=4 --rw=read'
./modules/libext/test.sh '/fio --name=fiotest --directory=/data/randread --size 1M --numjobs=4 --rw=randread'
./modules/libext/test.sh '/fio --name=fiotest --directory=/data/write --size 1M --numjobs=4 --rw=write'
./modules/libext/test.sh '/fio --name=fiotest --directory=/data/randwrite --size 1M --numjobs=4 --rw=randwrite'
In addition, this patch fixes couple of bugs in ext_internal_write() uncovered
when running the fio tests.
Signed-off-by: Waldemar Kozaczuk <[email protected]>
0 commit comments