Skip to content

Commit

Permalink
fix clang-format
Browse files Browse the repository at this point in the history
Signed-off-by: Wenwen Chen <wenwen.chen@samsung.com>
  • Loading branch information
Wenwen-Chen committed Jul 5, 2024
1 parent 6ec4e08 commit 6c13708
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "zmalloc.h"

/* AOF io_uring max QD and blocksize */
#define AOF_IOURING_MAX_ENTRIES (64)
#define AOF_IOURING_MAX_ENTRIES (64)
#define AOF_IOURING_MAX_BLOCKSIZE (32 * 1024)

static struct io_uring *_aof_io_uring;
Expand Down Expand Up @@ -131,7 +131,7 @@ int aofWriteByIOUring(int fd, const char *buf, size_t len) {
while (inflight >= depth) {
if (0 != reapCompletions()) {
fprintf(stderr, "## reapCompletions failed when persist AOF file by io_uring...\n");
return totwritten;
return totwritten;
}
}
totwritten = writing;
Expand Down
26 changes: 13 additions & 13 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2798,18 +2798,18 @@ void initListeners(void) {
void InitServerLast(void) {
bioInit();
initThreadedIO();
if (server.io_uring_enabled) {
if (server.io_uring_enabled) {
#ifdef HAVE_IO_URING
if (0 == initAofIOUring())
serverLog(LL_NOTICE, "aof io_uring init successfully.");
else {
serverLog(LL_WARNING, "aof io_uring init failed.");
exit(1);
}
if (0 == initAofIOUring())
serverLog(LL_NOTICE, "aof io_uring init successfully.");
else {
serverLog(LL_WARNING, "aof io_uring init failed.");
exit(1);
}
#else
serverLog(LL_WARNING, "System doesn't support io_uring, not init aof io_uring.");
serverLog(LL_WARNING, "System doesn't support io_uring, not init aof io_uring.");
#endif
}
}
set_jemalloc_bg_thread(server.jemalloc_bg_thread);
server.initial_memory_usage = zmalloc_used_memory();
}
Expand Down Expand Up @@ -6997,10 +6997,10 @@ int main(int argc, char **argv) {

aeMain(server.el);
aeDeleteEventLoop(server.el);
if (server.io_uring_enabled) {
freeAofIOUring();
serverLog(LL_NOTICE, "aof io_uring free successfully.");
}
if (server.io_uring_enabled) {
freeAofIOUring();
serverLog(LL_NOTICE, "aof io_uring free successfully.");
}
return 0;
}

Expand Down

0 comments on commit 6c13708

Please sign in to comment.