mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-13 17:28:27 -04:00
main: make xattr operations parallel
release the lock once the fd is open. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
0b0c7a3a01
commit
13fc65ed6b
10
main.c
10
main.c
@ -1918,6 +1918,8 @@ ovl_listxattr (fuse_req_t req, fuse_ino_t ino, size_t size)
|
||||
return;
|
||||
}
|
||||
|
||||
l = release_big_lock ();
|
||||
|
||||
len = flistxattr (fd, buf, size);
|
||||
if (len < 0)
|
||||
fuse_reply_err (req, errno);
|
||||
@ -1964,6 +1966,8 @@ ovl_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
|
||||
return;
|
||||
}
|
||||
|
||||
l = release_big_lock ();
|
||||
|
||||
len = fgetxattr (fd, name, buf, size);
|
||||
if (len < 0)
|
||||
fuse_reply_err (req, errno);
|
||||
@ -2582,6 +2586,8 @@ ovl_setxattr (fuse_req_t req, fuse_ino_t ino, const char *name,
|
||||
return;
|
||||
}
|
||||
|
||||
l = release_big_lock ();
|
||||
|
||||
if (fsetxattr (fd, name, value, size, flags) < 0)
|
||||
{
|
||||
fuse_reply_err (req, errno);
|
||||
@ -2623,6 +2629,8 @@ ovl_removexattr (fuse_req_t req, fuse_ino_t ino, const char *name)
|
||||
return;
|
||||
}
|
||||
|
||||
l = release_big_lock ();
|
||||
|
||||
if (fremovexattr (fd, name) < 0)
|
||||
{
|
||||
close (fd);
|
||||
@ -2973,6 +2981,8 @@ handle_eloop:
|
||||
}
|
||||
}
|
||||
|
||||
l = release_big_lock ();
|
||||
|
||||
memset (times, 0, sizeof (times));
|
||||
times[0].tv_sec = UTIME_OMIT;
|
||||
times[1].tv_sec = UTIME_OMIT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user