mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Use debug mutex more
This commit is contained in:
parent
3f70e66ee3
commit
a2860c3f1f
26 changed files with 364 additions and 1156 deletions
|
|
@ -26,6 +26,8 @@
|
|||
#include "fs_pwriten.hpp"
|
||||
#include "ioprio.hpp"
|
||||
|
||||
#include "scope_guard.hpp"
|
||||
|
||||
#include "fuse.h"
|
||||
|
||||
|
||||
|
|
@ -174,7 +176,8 @@ _write(const fuse_file_info_t *ffi_,
|
|||
// could change the move file behavior to use a known target file
|
||||
// and have threads use O_EXCL and back off and wait for the
|
||||
// transfer to complete before retrying.
|
||||
std::lock_guard<std::mutex> guard(fi->mutex);
|
||||
mutex_lock(fi->mutex);
|
||||
DEFER { mutex_unlock(fi->mutex); };
|
||||
|
||||
if(fi->direct_io)
|
||||
return ::_write_direct_io(buf_,count_,offset_,fi);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue