From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3138C433EC for ; Fri, 24 Jul 2020 16:23:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F800206EB for ; Fri, 24 Jul 2020 16:23:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="iAYnurzX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726711AbgGXQXP (ORCPT ); Fri, 24 Jul 2020 12:23:15 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:11030 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbgGXQXP (ORCPT ); Fri, 24 Jul 2020 12:23:15 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200724162312epoutp037219f48c991d596a65e4b2ee611a031d~kvNU_EPCs0314403144epoutp03M for ; Fri, 24 Jul 2020 16:23:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200724162312epoutp037219f48c991d596a65e4b2ee611a031d~kvNU_EPCs0314403144epoutp03M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1595607792; bh=3/hObnOc9E+5ViVw9dw3TpFAV846dpgwS54UTPL/cw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iAYnurzXe1n9BOwoI5rbjOH3cfe1cT7XxpvXZh3qv11Sxidh9EcCHP6pklb2YTd6R s7RkhlApfPIzvKMBwKDrdh4OW6lOgHZskxnKbGQHBBKXRkREvb59R8f/EzUnMSeseT wULsLmPxkqZzRwgEpPlW2X/7MSPSBgiIlTOxuHhw= Received: from epsmges5p1new.samsung.com (unknown [182.195.42.73]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20200724162310epcas5p2955a85236339220eef80c3dd7d31b83c~kvNTxP-Af2787827878epcas5p2i; Fri, 24 Jul 2020 16:23:10 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E3.58.09467.EEA0B1F5; Sat, 25 Jul 2020 01:23:10 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20200724155324epcas5p18e1d3b4402d1e4a8eca87d0b56a3fa9b~kuzT5b_jF1547815478epcas5p1e; Fri, 24 Jul 2020 15:53:24 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200724155324epsmtrp2ac97110668ca8b26f68e5a7762bebd01~kuzT4mIS52867528675epsmtrp2Q; Fri, 24 Jul 2020 15:53:24 +0000 (GMT) X-AuditID: b6c32a49-a3fff700000024fb-11-5f1b0aee4672 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 68.02.08382.3F30B1F5; Sat, 25 Jul 2020 00:53:24 +0900 (KST) Received: from localhost.localdomain (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200724155321epsmtip1282f16a93147d538ce36f0d2cea0002d~kuzROb9DX0159201592epsmtip1a; Fri, 24 Jul 2020 15:53:21 +0000 (GMT) From: Kanchan Joshi To: axboe@kernel.dk, viro@zeniv.linux.org.uk, bcrl@kvack.org Cc: willy@infradead.org, hch@infradead.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, SelvaKumar S , Kanchan Joshi , Nitesh Shetty , Javier Gonzalez Subject: [PATCH v4 2/6] fs: change ki_complete interface to support 64bit ret2 Date: Fri, 24 Jul 2020 21:19:18 +0530 Message-Id: <1595605762-17010-3-git-send-email-joshi.k@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595605762-17010-1-git-send-email-joshi.k@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDKsWRmVeSWpSXmKPExsWy7bCmuu47Lul4g08f1C1+T5/CajFn1TZG i9V3+9ksuv5tYbFobf/GZHF6wiImi3et51gsHt/5zG5x9P9bNosp05oYLTZ/72Cz2HtL22LP 3pMsFpd3zWGz2PZ7PrPFlSmLmC1e/zjJZnH+73FWi98/5rA5CHvsnHWX3WPzCi2Py2dLPTZ9 msTu0bdlFaPH501yHu0Hupk8Nj15yxTAEcVlk5Kak1mWWqRvl8CVsanxI3PBapWKS8emsDUw dst1MXJwSAiYSPyfrtDFyMUhJLCbUeLtwhnMEM4nRolba69COd8YJdav72HsYuQE62g//oMF xBYS2MsosfmVFETRZ0aJm20nmEHGsgloSlyYXApiigjYSOxcogJSwiywnFliQscPVpBeYYEA idMrXoDZLAKqEi96DoPN5xVwlpj1cSYbxC45iZvnOplBbE4BF4kLF+8yggySENjBITF/21eo IheJPY9eMEPYwhKvjm9hh7ClJD6/2wtVUyzx685RZojmDkaJ6w0zWSAS9hIX9/xlArmUGejo 9bv0IcKyElNPrWMCsZkF+CR6fz9hgojzSuyYB2MrSty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 qeV6xYm5xaV56XrJ+bmbGMExoKW5g3H7qg96hxiZOBgPMUpwMCuJ8K74JhUvxJuSWFmVWpQf X1Sak1p8iFGag0VJnPdG4cI4IYH0xJLU7NTUgtQimCwTB6dUA1P9If6nn4Je2l+7scwr2/Zn w9fDtl/+Lvvgq7hgWfCTJNlv3LfkxI+pLquc310qKLTjklChWdqhT7nbOs5yarKIrpj2s96t wXC/94yA4pvp2QliOX8sXtn5uL1Ytkbxxu+y4D/bXK7FrwxcKxHtLuFx4P5jjbI/WzNObTrL IBXILLL4ZbdH46HDepN8ap8djxOY8NruO5P4/R0H7nYutf7g8fvY8d5nPD0nqieWvKhP+Gp+ 5MnCq381qy+oRsnriaaezqo8VVRlMGvS27T1U+xkIrr3qXFqHT6XrhydmHFpd7vm8vSJFSL3 C345C8lrZZ9g2y+mn/rmOP/BLPlTfgnOT6JaS7TubVu69M/6uRuVWIozEg21mIuKEwFpBBFV 8AIAAA== X-CMS-MailID: 20200724155324epcas5p18e1d3b4402d1e4a8eca87d0b56a3fa9b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20200724155324epcas5p18e1d3b4402d1e4a8eca87d0b56a3fa9b References: <1595605762-17010-1-git-send-email-joshi.k@samsung.com> Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: SelvaKumar S kiocb->ki_complete(...,long ret2) - change ret2 to long long. This becomes handy to return 64bit written-offset with appending write. Change callers using ki_complete prototype. Signed-off-by: SelvaKumar S Signed-off-by: Kanchan Joshi Signed-off-by: Nitesh Shetty Signed-off-by: Javier Gonzalez --- drivers/block/loop.c | 2 +- drivers/nvme/target/io-cmd-file.c | 2 +- drivers/target/target_core_file.c | 2 +- fs/aio.c | 2 +- fs/io_uring.c | 4 ++-- fs/overlayfs/file.c | 2 +- include/linux/fs.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index c33bbbf..d41dcbd 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -512,7 +512,7 @@ static void lo_rw_aio_do_completion(struct loop_cmd *cmd) blk_mq_complete_request(rq); } -static void lo_rw_aio_complete(struct kiocb *iocb, long ret, long ret2) +static void lo_rw_aio_complete(struct kiocb *iocb, long ret, long long ret2) { struct loop_cmd *cmd = container_of(iocb, struct loop_cmd, iocb); diff --git a/drivers/nvme/target/io-cmd-file.c b/drivers/nvme/target/io-cmd-file.c index 0abbefd..ae6e797 100644 --- a/drivers/nvme/target/io-cmd-file.c +++ b/drivers/nvme/target/io-cmd-file.c @@ -123,7 +123,7 @@ static ssize_t nvmet_file_submit_bvec(struct nvmet_req *req, loff_t pos, return call_iter(iocb, &iter); } -static void nvmet_file_io_done(struct kiocb *iocb, long ret, long ret2) +static void nvmet_file_io_done(struct kiocb *iocb, long ret, long long ret2) { struct nvmet_req *req = container_of(iocb, struct nvmet_req, f.iocb); u16 status = NVME_SC_SUCCESS; diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 7143d03..387756f2 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -243,7 +243,7 @@ struct target_core_file_cmd { struct kiocb iocb; }; -static void cmd_rw_aio_complete(struct kiocb *iocb, long ret, long ret2) +static void cmd_rw_aio_complete(struct kiocb *iocb, long ret, long long ret2) { struct target_core_file_cmd *cmd; diff --git a/fs/aio.c b/fs/aio.c index 7ecddc2..7218c8b 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1418,7 +1418,7 @@ static void aio_remove_iocb(struct aio_kiocb *iocb) spin_unlock_irqrestore(&ctx->ctx_lock, flags); } -static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) +static void aio_complete_rw(struct kiocb *kiocb, long res, long long res2) { struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw); diff --git a/fs/io_uring.c b/fs/io_uring.c index 155f3d8..7809ab2 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1958,7 +1958,7 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res) __io_cqring_add_event(req, res, cflags); } -static void io_complete_rw(struct kiocb *kiocb, long res, long res2) +static void io_complete_rw(struct kiocb *kiocb, long res, long long res2) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); @@ -1966,7 +1966,7 @@ static void io_complete_rw(struct kiocb *kiocb, long res, long res2) io_put_req(req); } -static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) +static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long long res2) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 01820e6..614b834 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -268,7 +268,7 @@ static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) kmem_cache_free(ovl_aio_request_cachep, aio_req); } -static void ovl_aio_rw_complete(struct kiocb *iocb, long res, long res2) +static void ovl_aio_rw_complete(struct kiocb *iocb, long res, long long res2) { struct ovl_aio_req *aio_req = container_of(iocb, struct ovl_aio_req, iocb); diff --git a/include/linux/fs.h b/include/linux/fs.h index ef13df4..a6a5f41 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -327,7 +327,7 @@ struct kiocb { randomized_struct_fields_start loff_t ki_pos; - void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); + void (*ki_complete)(struct kiocb *iocb, long ret, long long ret2); void *private; int ki_flags; u16 ki_hint; -- 2.7.4