Skip to content

Commit

Permalink
Add initial io_uring impl
Browse files Browse the repository at this point in the history
  • Loading branch information
doublej472 committed Jan 10, 2025
1 parent 5a5f934 commit ac0f8c3
Show file tree
Hide file tree
Showing 5 changed files with 509 additions and 7 deletions.
11 changes: 6 additions & 5 deletions doc/tgtadm.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,13 @@ Possible device-types are:
</varlistentry>
<screen format="linespecific">
Possible backend types are:
rdwr : Use normal file I/O. This is the default for disk devices
aio : Use Asynchronous I/O
rbd : Use Ceph's distributed-storage RADOS Block Device
rdwr : Use normal file I/O. This is the default for disk devices
aio : Use Asynchronous I/O
io_uring : Use io_uring I/O
rbd : Use Ceph's distributed-storage RADOS Block Device

sg : Special backend type for passthrough devices
ssc : Special backend type for tape emulation
sg : Special backend type for passthrough devices
ssc : Special backend type for tape emulation
</screen>

<varlistentry><term><option>--lld &lt;driver&gt; --op new --mode target --tid &lt;id&gt; --targetname &lt;name&gt;</option></term>
Expand Down
2 changes: 1 addition & 1 deletion scripts/tgt.bashcomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ _tgtadm() {
portal pt session sess connection conn account lld" -- "${cur}") )
return 0;;
--bstype|-E)
COMPREPLY=( $(compgen -W "rdwr aio rbd sg ssc" -- "${cur}") )
COMPREPLY=( $(compgen -W "rdwr aio rbd sg ssc io_uring" -- "${cur}") )
return 0;;
--bsoflags|-f)
COMPREPLY=( $(compgen -W "direct sync" -- "${cur}") )
Expand Down
2 changes: 1 addition & 1 deletion scripts/tgtd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ License: GPLv2
URL: http://stgt.sourceforge.net/
Source0: %{name}-%{version}-%{release}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig libibverbs-devel librdmacm-devel libxslt libaio-devel
BuildRequires: pkgconfig libibverbs-devel librdmacm-devel libxslt libaio-devel liburing
%if %{defined suse_version}
BuildRequires: docbook-xsl-stylesheets
Requires: aaa_base
Expand Down
5 changes: 5 additions & 0 deletions usr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ TGTD_OBJS += bs_aio.o
LIBS += -laio
endif

ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/liburing.h && echo 1),)
TGTD_OBJS += bs_io_uring.o
LIBS += -luring
endif

ifneq ($(ISCSI_RDMA),)
TGTD_OBJS += iscsi/iser.o iscsi/iser_text.o
LIBS += -libverbs -lrdmacm
Expand Down
Loading

0 comments on commit ac0f8c3

Please sign in to comment.