Message ID | 86ae0042c57c5904b40e19f6171f47fd3e8c6126.1723601134.git.asml.silence@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8D0CC52D7B for <linux-mm@archiver.kernel.org>; Wed, 14 Aug 2024 10:45:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 718456B0088; Wed, 14 Aug 2024 06:45:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 58D696B0089; Wed, 14 Aug 2024 06:45:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B8A16B008A; Wed, 14 Aug 2024 06:45:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1CE176B0088 for <linux-mm@kvack.org>; Wed, 14 Aug 2024 06:45:28 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A48D7A7F9A for <linux-mm@kvack.org>; Wed, 14 Aug 2024 10:45:27 +0000 (UTC) X-FDA: 82450519494.13.65B60A1 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by imf06.hostedemail.com (Postfix) with ESMTP id B042218001E for <linux-mm@kvack.org>; Wed, 14 Aug 2024 10:45:25 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=epbn5fB0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of asml.silence@gmail.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=asml.silence@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723632313; a=rsa-sha256; cv=none; b=i8zEqz/L25n7nxTHTNx36s8e0OcXvXnPHA49yV39HL7NPiO9CWuCfQ2q1pfN6Bcui77L7v mWiZu2KwNa7D8o/P5eVNTYrp1fMLUS9GL+F/QwZEkjc8rM6lFmmTuNNz3HS3uEGkciMioG W0BYHDdFUKC/0CZYUs0f7VJvRmAykAE= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=epbn5fB0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of asml.silence@gmail.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=asml.silence@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723632313; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yyZRXxiAI12SAMIbkwT8bn9l7S8e/TKEaLOeKBVDL1c=; b=XtlsJmwbrNbycm+jZArzojaOteA0Nc04vfLFK8zQ8m6fbQQQla72UUg8dz89wEBLIR2Ayb ZrwQF2JoG1HZVHGpWK5SRGAjTwooRnXY5tJb6yZ+ULAvrtNkHtrNnYRMl/4Ul13xwSacFT RnNGsD2uy4fA8st42COJv2PyUVqgepI= Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a7aac70e30dso720812266b.1 for <linux-mm@kvack.org>; Wed, 14 Aug 2024 03:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723632324; x=1724237124; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yyZRXxiAI12SAMIbkwT8bn9l7S8e/TKEaLOeKBVDL1c=; b=epbn5fB0CF+0IThePn3cXuB58q/ziwtEUbsrtaPTXQl+1kuZdvy+op53FCqbKjNnCy 3l3q0DBBociXAp64bYlx5z/8lunxkbD7Yj+EDbpQF35GlgzKFGSj52De2ozOGnfFfTZo rA00+ZcZCXeuATWye5/SktiocSAoQQgLCpvUokOxQLkmJEPBgwujsvh/XHHAYkiwyASc 5K5f48H76uT9NI/c+G+tHuorJyocU4ld/Xs246NJ9y7rzggORkVD+0Ny+D1A21jflgFd 4yBEjoqMhq9+haUUT7FGSNBkB3EpEfbZ+EOTAC+crt14unbwNUWh8ESgybLvINgfkg+M +lEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723632324; x=1724237124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yyZRXxiAI12SAMIbkwT8bn9l7S8e/TKEaLOeKBVDL1c=; b=tY1YHdoHnixuXv43NGDahoRuvf2/fMK6rfCjJjJArVUReV4xjcv4dE1HMV4yJAOiZ3 eGrcYqExYMZir32NONoswMTi3QnZRWVP8Pu3kgF8FJLbWE4W+4ASezCvdDWdi2G8s5dT 4he/bNWWH3ArNB8/t0gG3X2LLvLSVWKlIsfNn9S53DFZsK26RAtADxagVHhJG6BTjYP1 rvHhjdwaljkRpPSwv5uduWyIGLxFzR3FwOvlNplBIEZGE7TcY86xCFEnLcrfuH+KRGIy 9XTfI1n2I0mw6RAm4hxHK3Cd9qWq27unZV8Gr6cp4Tfzd7H0m/syE6K4OLaLLkj6b4wX ffDw== X-Forwarded-Encrypted: i=1; AJvYcCULz3IxzmleY9u1fWyKQukC2dE9bnn0EiAThyBHuWdoueNZxnurSe+244tqyzmW+psP+uqPlTfx48Q/zsOcuBRb1QI= X-Gm-Message-State: AOJu0Yx0FkttvRSvEiyshK8UONTr5/Z9u9Y1bHjoOzfgZIggcOXxqZY5 URqwVjrOHuatsNO1JE0ksaYgcaVmE9dr4NjDmfSIJ6q1oSRIBjbX X-Google-Smtp-Source: AGHT+IF0FJ+sTAvpOE9fJ0iyXXmALD7st6qSqWtNfVEYLYX577G+yNnVuj6lODfTWpASdYrnqFEhoA== X-Received: by 2002:a17:907:e6d1:b0:a77:cf9d:f495 with SMTP id a640c23a62f3a-a8366d658cfmr180030066b.40.1723632324005; Wed, 14 Aug 2024 03:45:24 -0700 (PDT) Received: from 127.0.0.1localhost ([148.252.132.251]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a80f418692asm157212766b.224.2024.08.14.03.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 03:45:23 -0700 (PDT) From: Pavel Begunkov <asml.silence@gmail.com> To: io-uring@vger.kernel.org Cc: Jens Axboe <axboe@kernel.dk>, asml.silence@gmail.com, Conrad Meyer <conradmeyer@meta.com>, linux-block@vger.kernel.org, linux-mm@kvack.org Subject: [RFC 2/5] io_uring/cmd: give inline space in request to cmds Date: Wed, 14 Aug 2024 11:45:51 +0100 Message-ID: <86ae0042c57c5904b40e19f6171f47fd3e8c6126.1723601134.git.asml.silence@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <cover.1723601133.git.asml.silence@gmail.com> References: <cover.1723601133.git.asml.silence@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: B042218001E X-Rspamd-Server: rspam01 X-Stat-Signature: 8iy5j3u5iugwc6d4r634pk6tftcmd7g4 X-HE-Tag: 1723632325-905249 X-HE-Meta: U2FsdGVkX18o0iPnjzT05y5KSNBbX3XaFPnpvLXHynfKAADQ51NUgDu7gFsfU8oLbKlKiJ6gb0XO22Uxo4zI88m4O/L7H5AmiLkhb1m1ONvU3CKLkTedIjK4EYB47lgVrVM3vv38zgpWp6Qeua1YveQnjT5AGLeW5MD5WHyVWFdVDFb7H1rAkMrcVYeR6z2zCn9/VCmPm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NZlE3wZ/ea5l1OwR/6a/chyU/HjWtbjbnXJkM1bXBksJwtT7TKrb38a7eRe6QHGeciMPvMuE3opm/CMyMhvvn/Osv/TE3KyOqe3Zfpx6cvzDbRnGj6qEbPtnMkM+VUcnvt7mC9AqxZM4ZT4ksTehc71gVDy/fdfwDDb9M282Usei58Z4cFkCMCpIa5WbSr+uLtCQgvJ2SaNdNr1htSO1NjY6Lmm+zS7I0F2rjYlg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001439, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
implement asynchronous BLKDISCARD via io_uring
|
expand
|
diff --git a/include/linux/io_uring/cmd.h b/include/linux/io_uring/cmd.h index 86ceb3383e49..c189d36ad55e 100644 --- a/include/linux/io_uring/cmd.h +++ b/include/linux/io_uring/cmd.h @@ -23,6 +23,15 @@ static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) return sqe->cmd; } +static inline void io_uring_cmd_private_sz_check(size_t cmd_sz) +{ + BUILD_BUG_ON(cmd_sz > sizeof_field(struct io_uring_cmd, pdu)); +} +#define io_uring_cmd_to_pdu(cmd, pdu_type) ( \ + io_uring_cmd_private_sz_check(sizeof(pdu_type)), \ + ((pdu_type *)&(cmd)->pdu) \ +) + #if defined(CONFIG_IO_URING) int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, struct iov_iter *iter, void *ioucmd);
Some io_uring commands can use some inline space in io_kiocb. We have 32 bytes in struct io_uring_cmd, expose it. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> --- include/linux/io_uring/cmd.h | 9 +++++++++ 1 file changed, 9 insertions(+)