4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the GNU Lesser General Public License
8 * (LGPL) version 2.1 or (at your discretion) any later version.
9 * (LGPL) version 2.1 accompanies this distribution, and is available at
10 * http://www.gnu.org/licenses/lgpl-2.1.html
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
20 * Copyright (c) 2022, DDN/Whamcloud Storage Corporation.
23 * This file is part of Lustre, http://www.lustre.org/
26 * Probe whether OS supports io_uring.
28 * Author: Qian Yingjin <qian@ddn.com>
36 #include <sys/syscall.h>
38 #ifdef __NR_io_uring_register
39 #include <linux/io_uring.h>
41 int main(int argc, char **argv)
45 rc = syscall(__NR_io_uring_register, 0, IORING_UNREGISTER_BUFFERS,
47 if (rc < 0 && errno == ENOSYS) {
48 printf("Your kernel does not support io_uring");
54 int main(int argc, char **argv)