diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-03-04 10:18:56 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-03-04 10:18:56 +0100 |
commit | 4d4e80f2b4260f2c8b37a8612ce655502a799f7a (patch) | |
tree | 4eb7d5762a63cdacc390b51add1e524bd84f760c /smalloc.c | |
parent | 5f1348c709d91ffa54bde1a6a1beb53ecda613b7 (diff) | |
download | fio-4d4e80f2b4260f2c8b37a8612ce655502a799f7a.tar.gz |
Revamp file locking
Get rid of the semaphore implementation, no need to carry both.
Add different locking modes (exclusive and readwrite) to enable
a wider range of testing. Also combine lockfile and lockfile_batch,
the latter is now a postfix option to the former.
So to enable readers-excluding-writers locking mode with a lock batch
count of 4, you would write:
lockfile=readwrite:4
instead.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'smalloc.c')
-rw-r--r-- | smalloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -268,11 +268,12 @@ out_close: void sinit(void) { - int ret = add_pool(&mp[0]); + int ret; #ifdef MP_SAFE lock = fio_mutex_rw_init(); #endif + ret = add_pool(&mp[0]); assert(!ret); } |