projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix BlueSky build on modern Linux and libs3.
[bluesky.git]
/
logbench
/
logbench.c
diff --git
a/logbench/logbench.c
b/logbench/logbench.c
index
6f3a858
..
c421be1
100644
(file)
--- a/
logbench/logbench.c
+++ b/
logbench/logbench.c
@@
-84,14
+84,14
@@
void writebuf(int fd, const char *buf, size_t len)
}
/************************ Direct-to-filesystem logging ***********************/
}
/************************ Direct-to-filesystem logging ***********************/
-static int dirfd = -1;
+static int dir
_
fd = -1;
gpointer fslog_thread(gpointer d)
{
while (TRUE) {
struct item *item = get_item();
gpointer fslog_thread(gpointer d)
{
while (TRUE) {
struct item *item = get_item();
- int fd = openat(dirfd, item->key, O_CREAT|O_WRONLY|O_TRUNC, 0666);
+ int fd = openat(dir
_
fd, item->key, O_CREAT|O_WRONLY|O_TRUNC, 0666);
g_assert(fd >= 0);
writebuf(fd, item->data, item->len);
g_assert(fd >= 0);
writebuf(fd, item->data, item->len);
@@
-99,7
+99,7
@@
gpointer fslog_thread(gpointer d)
finish_item(item);
fsync(fd);
finish_item(item);
fsync(fd);
- fsync(dirfd);
+ fsync(dir
_
fd);
close(fd);
}
close(fd);
}
@@
-108,8
+108,8
@@
gpointer fslog_thread(gpointer d)
void launch_fslog()
{
void launch_fslog()
{
- dirfd = open(".", O_DIRECTORY);
- g_assert(dirfd >= 0);
+ dir
_
fd = open(".", O_DIRECTORY);
+ g_assert(dir
_
fd >= 0);
for (int i = 0; i < 1; i++)
g_thread_create(fslog_thread, NULL, FALSE, NULL);
for (int i = 0; i < 1; i++)
g_thread_create(fslog_thread, NULL, FALSE, NULL);