Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
77bc79e6
Commit
77bc79e6
authored
Nov 30, 2021
by
Ren Bauer
Committed by
Michael Davis
Nov 30, 2021
Browse files
Resolve "Open BackendVFS ObjectStore files in R/W mode when obtaining exclusive locks"
parent
4400f02d
Changes
1
Hide whitespace changes
Inline
Side-by-side
objectstore/BackendVFS.cpp
View file @
77bc79e6
...
...
@@ -254,7 +254,11 @@ void BackendVFS::ScopedLock::release() {
BackendVFS
::
ScopedLock
*
BackendVFS
::
lockHelper
(
const
std
::
string
&
name
,
int
type
,
uint64_t
timeout_us
)
{
std
::
string
path
=
m_root
+
"/."
+
name
+
".lock"
;
std
::
unique_ptr
<
ScopedLock
>
ret
(
new
ScopedLock
);
ret
->
set
(
::
open
(
path
.
c_str
(),
O_RDONLY
),
path
);
int
flag
=
O_RDONLY
;
if
(
type
==
LOCK_EX
)
{
flag
=
O_RDWR
;
}
ret
->
set
(
::
open
(
path
.
c_str
(),
flag
),
path
);
if
(
0
>
ret
->
m_fd
)
{
// We went too fast: the fd is not really set:
...
...
Tigran Mkrtchyan
☕
@tigran
mentioned in commit
b6128a2e
·
Feb 03, 2022
mentioned in commit
b6128a2e
mentioned in commit b6128a2e17f79d46a7f9f319d8146af734f1412e
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment