- Update S3_initialize calls to current API (3-argument form).
- Minor CMakeLists updates.
- dirfd is now a system function so avoid that name in our code.
include(FindPkgConfig)
pkg_check_modules(GLIB REQUIRED glib-2.0 gthread-2.0)
-set(LIBS3_BUILD_DIR "${CMAKE_SOURCE_DIR}/libs3-1.4/build")
+set(LIBS3_BUILD_DIR "${CMAKE_SOURCE_DIR}/libs3/build")
add_definitions(-D_FILE_OFFSET_BITS=64)
add_subdirectory(kvstore)
void bluesky_store_init_s3(void)
{
- S3_initialize(NULL, S3_INIT_ALL);
+ S3_initialize(NULL, S3_INIT_ALL, NULL);
bluesky_store_register(&store_impl, "s3");
}
set(CMAKE_C_FLAGS "-Wall -std=gnu99 ${CMAKE_C_FLAGS}")
set(INSTALL_RPATH_USE_LINK_PATH 1)
-target_link_libraries(s3readbench pthread s3)
+target_link_libraries(s3readbench m pthread s3)
target_link_libraries(s3readlatency pthread s3)
target_link_libraries(s3readdelay pthread s3)
return 1;
}
- S3_initialize(NULL, S3_INIT_ALL);
+ S3_initialize(NULL, S3_INIT_ALL, NULL);
bucket.bucketName = "mvrable-benchmark";
bucket.protocol = S3ProtocolHTTP;
int main(int argc, char *argv[])
{
- S3_initialize(NULL, S3_INIT_ALL);
+ S3_initialize(NULL, S3_INIT_ALL, NULL);
bucket.bucketName = "mvrable-benchmark";
bucket.protocol = S3ProtocolHTTP;
return 1;
}
- S3_initialize(NULL, S3_INIT_ALL);
+ S3_initialize(NULL, S3_INIT_ALL, NULL);
bucket.bucketName = "mvrable-benchmark";
bucket.protocol = S3ProtocolHTTP;
}
/************************ 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();
- 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);
finish_item(item);
fsync(fd);
- fsync(dirfd);
+ fsync(dir_fd);
close(fd);
}
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);