Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp311338rdh; Thu, 23 Nov 2023 04:54:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKYMUag7cvt4j7VAQ8qSMt+WgrSL9XlUnDVp1mNh+y33pykZ3QPeC1rvqTGGInnqy4BVY1 X-Received: by 2002:a05:6e02:1347:b0:35b:2d72:2276 with SMTP id k7-20020a056e02134700b0035b2d722276mr5087712ilr.29.1700744040903; Thu, 23 Nov 2023 04:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700744040; cv=none; d=google.com; s=arc-20160816; b=KyT6pe7WuTGKO3uVbrpiQEExuDtt2d9FG3AiVsih7J0fxPX/vv0FhUN4a3FwQqVblu He4Nh+ZyD4KbcVfML4LaDsx/96UGuEZhRurDx2ZuhqETyrrOyiVsejzO/LMdUv+wj+OI KzGNMvX/5HjkHeLztBb48LMZxZ6tAqeQv5lMdXVHggvhH/Jl6zIjhTMAVcpmHu8/wzYA EWbpDAr9RVSpoH3HkOoHqlcCLzYNLdjgjH6l9xKaLnVeeEVAMTE3qoEwfIWEvC1n8Nuh 6Yn8MByVp6Vkp60Uip81rFZOLEeQ9uVDJUPirw4CIojbl8EJXYXRNUqCWroKmrpRRunI y+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=DqvIwIbVKOJvOiqfMs5h4vr4tpZmnn4dbLr4+doR7/w=; fh=oXgJbFeK1mY0T4jBbK/Fs3Mi9F4SdMRqpoziDljuAF4=; b=c3/UmFPY2YcJhDkk1KVfSSgb87FuOIL+4LRNGq4Gw5qX70UauYgKYPjhcw+O8anMal 9EfIPoJabopQCGmQMSQ24M2RVpcD89KPSIv44zvmVxILdIMVUdntwXaKQ2zWvl4xi6zB mX9nusLukurhAMb0P+L3Hr5tfL2WNlXRUUrq1bB+HNtMRKzBZL8M4XMPwsfiYGziMcXJ dxFcQVD/4w/vHPG2tPz3BO2CorhXzJ4W98F5i4g7gm9v5ySPmyxUfTAladokx22bnALR 2ZbjsPf0fuPD1cw57sEParlqWju55GFinz6Y+1K06CPwgzb9Nl+mQi7u4RLtp0cvuh/z 1x1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-113-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e28-20020a631e1c000000b005c200b11630si1233226pge.45.2023.11.23.04.54.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-113-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 559C8B218CB for ; Thu, 23 Nov 2023 12:52:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A09E525763; Thu, 23 Nov 2023 12:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABA2E1A8; Thu, 23 Nov 2023 04:52:06 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4SbdKs2yRcz4f3kkH; Thu, 23 Nov 2023 20:52:01 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 256811A050A; Thu, 23 Nov 2023 20:52:04 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgDn6xHdSl9lSfnfBg--.20473S15; Thu, 23 Nov 2023 20:52:03 +0800 (CST) From: Zhang Yi To: linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ritesh.list@gmail.com, hch@infradead.org, djwong@kernel.org, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: [RFC PATCH 11/18] iomap: add a fs private parameter to iomap_ioend Date: Thu, 23 Nov 2023 20:51:13 +0800 Message-Id: <20231123125121.4064694-12-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231123125121.4064694-1-yi.zhang@huaweicloud.com> References: <20231123125121.4064694-1-yi.zhang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgDn6xHdSl9lSfnfBg--.20473S15 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw4fKrWDur4fKFW7Ar1xGrg_yoWkZwb_Aa yvgr4kur4rJF1S9w1I9r4xXFZrC348Gr18WryrtryfGFnxJan5AwnakrW3Aw4fG3WxGFn3 Jw4kXr1ftry7WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbqxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr 1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0D M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxan2 IY04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVW8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JV WxJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7VUbmZ X7UUUUU== X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ From: Zhang Yi Add a private parameter to iomap_ioend structure, letting filesystems can pass something they needed from .prepare_ioend() to IO end. Signed-off-by: Zhang Yi --- fs/iomap/buffered-io.c | 1 + include/linux/iomap.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 2bc0aa23fde3..fd4d43bafd1b 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1676,6 +1676,7 @@ iomap_alloc_ioend(struct inode *inode, struct iomap_writepage_ctx *wpc, ioend->io_offset = offset; ioend->io_bio = bio; ioend->io_sector = sector; + ioend->io_private = NULL; return ioend; } diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 96dd0acbba44..8b3296a5474d 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -300,6 +300,7 @@ struct iomap_ioend { sector_t io_sector; /* start sector of ioend */ struct bio *io_bio; /* bio being built */ struct bio io_inline_bio; /* MUST BE LAST! */ + void *io_private; /* fs private pointer */ }; struct iomap_writeback_ops { -- 2.39.2