projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f940128
)
Fix crash with file locking and dup'ed files
author
Jens Axboe
<axboe@fb.com>
Fri, 7 Feb 2014 17:56:15 +0000
(10:56 -0700)
committer
Jens Axboe
<axboe@fb.com>
Fri, 7 Feb 2014 17:56:15 +0000
(10:56 -0700)
Ensure that we properly inherit the file locks when
duplicating files.
Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index d67f1124618744db85595c2f037ffe07f9788794..d1702e29c75bf1b1f73dd0d2dc3ade1ac35f9e12 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-1343,6
+1343,11
@@
void dup_files(struct thread_data *td, struct thread_data *org)
__f->filetype = f->filetype;
}
+ if (td->o.file_lock_mode == FILE_LOCK_EXCLUSIVE)
+ __f->lock = f->lock;
+ else if (td->o.file_lock_mode == FILE_LOCK_READWRITE)
+ __f->rwlock = f->rwlock;
+
td->files[i] = __f;
}
}