From patchwork Wed Jul 21 12:43:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12390797 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 6AFCCC636CA for ; Wed, 21 Jul 2021 12:43:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 545E86120C for ; Wed, 21 Jul 2021 12:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237768AbhGUMDB (ORCPT ); Wed, 21 Jul 2021 08:03:01 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:44572 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhGUMDB (ORCPT ); Wed, 21 Jul 2021 08:03:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1626871417; x=1658407417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UqacTvKA8zu7lo0h2FE8f+bJnLjSwx4GkHwcOY7214E=; b=rnSKZua/cGXLcTYnWBse+HPNvmRRH271qAU/d6D8UY3PNDzgWd/mgPE1 wqATv7xzYAzrzO766rcLc3g1tqCFeus6phAQtGIwbTddqRcLT9tmSx5+m VULGGz3NY+i5anciCz9LPL/WuFhA5C01eWmD7yG/+PHvSUMDlDLHZwm7P Xxpoz9x5qlIfx1+ADgzqsdZxdyT2ngbSgzEQYrRbiXSPSIz8PW5+tDSoe qqfnUPyImvllw1ZOXBdv3kCfujIVzY78xrKt/hp5ljc9jpwFbe4qiJ6np 1jr2xNHBxw1+10P3C4tbyOlXbxvC/d6Em5e+EE8iIPRXFmSXYbymDL6IR w==; X-IronPort-AV: E=Sophos;i="5.84,258,1620662400"; d="scan'208";a="174366709" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Jul 2021 20:43:37 +0800 IronPort-SDR: 0vaq1Pyybk/wDi3XiR9U6z8Z1LeQZ9XIh0jgPyYmdwcTzoc2HQo3HFFIMp/oIulSxqq3Q+o5lb 9AuH4xv0pXFTNmjYQlKdiZHOuKprebbx6uOuwXUSGAeqtSvFHa3yio77ksO96PN+4y6G61jyZp XCaNtTQoQHnmxKg9jTE2O6b/FvBr84Cb+43N11gw+Mdz0pXbT8FcwMc5tY0moQxaUFMyLM0DtS ekL/mHI92SiW1T/Nn4S/p1DED7w0kl0WNIBr0SO//ZNM5BsVMmSCPh7TiFvJbwxvrKyQuZEIk4 qxK4Pj0V+RI7iavKmnE9Luy9 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2021 05:19:52 -0700 IronPort-SDR: cX+x9bySbCEoKj8hVZEd4i2s42N9fp2/g+Jd8g4iwD0EBAAf42hyigBDucKBaEMCHSUV3SncJ+ hWtykR2JPcPfXz0GW5iJ+2NEkQ2x7Z5X46ktizFPcry3AyV8uokGsoRRA3M06Vk6WzNraH8Dr3 Kl6rk2WAXBncly7IoMh5uY432Ws8YOQPy/c8OFM4rP0GszNfFyeDf9WluwkQWmHU4rI7kSB5+3 gniOKasMTI77NK7C67ZR85Q27JrR/uLxnGiQtXQoC0ijhGwxoWcUcTdLBsHTzzha8F/0tbg4rT RH8= WDCIronportException: Internal Received: from my8nr8qf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.49.83]) by uls-op-cesaip02.wdc.com with ESMTP; 21 Jul 2021 05:43:36 -0700 From: Naohiro Aota To: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org Cc: Jens Axboe , David Sterba , Chaitanya Kulkarni , Naohiro Aota Subject: [PATCH v3 1/3] block: fix arg type of bio_trim() Date: Wed, 21 Jul 2021 21:43:32 +0900 Message-Id: <4fc8537f6dbe0c27489a3431b3a3240013268031.1626871138.git.naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Chaitanya Kulkarni The function bio_trim has offset and size arguments that are declared as int. The callers of this function uses sector_t type when passing the offset and size e,g. drivers/md/raid1.c:narrow_write_error() and drivers/md/raid1.c:narrow_write_error(). Change offset and size arguments to sector_t type for bio_trim(). Also, add WARN_ON_ONCE() to catch their overflow. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Naohiro Aota Reviewed-by: Christoph Hellwig --- block/bio.c | 12 +++++++----- include/linux/bio.h | 2 +- include/linux/blk_types.h | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/block/bio.c b/block/bio.c index 44205dfb6b60..0bf2b865feaf 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1464,12 +1464,15 @@ EXPORT_SYMBOL(bio_split); * @bio: bio to trim * @offset: number of sectors to trim from the front of @bio * @size: size we want to trim @bio to, in sectors + * + * This function is typically used for bios that are cloned and submitted + * to the underlying device in parts. */ -void bio_trim(struct bio *bio, int offset, int size) +void bio_trim(struct bio *bio, sector_t offset, sector_t size) { - /* 'bio' is a cloned bio which we need to trim to match - * the given offset and size. - */ + if (WARN_ON_ONCE(offset > BIO_MAX_SECTORS || size > BIO_MAX_SECTORS || + offset + size > bio->bi_iter.bi_size)) + return; size <<= 9; if (offset == 0 && size == bio->bi_iter.bi_size) @@ -1480,7 +1483,6 @@ void bio_trim(struct bio *bio, int offset, int size) if (bio_integrity(bio)) bio_integrity_trim(bio); - } EXPORT_SYMBOL_GPL(bio_trim); diff --git a/include/linux/bio.h b/include/linux/bio.h index a0b4cfdf62a4..fb663152521e 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -379,7 +379,7 @@ static inline void bip_set_seed(struct bio_integrity_payload *bip, #endif /* CONFIG_BLK_DEV_INTEGRITY */ -extern void bio_trim(struct bio *bio, int offset, int size); +void bio_trim(struct bio *bio, sector_t offset, sector_t size); extern struct bio *bio_split(struct bio *bio, int sectors, gfp_t gfp, struct bio_set *bs); diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index db026b6ec15a..24dfb980fb3f 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -285,6 +285,7 @@ struct bio { }; #define BIO_RESET_BYTES offsetof(struct bio, bi_max_vecs) +#define BIO_MAX_SECTORS (UINT_MAX >> SECTOR_SHIFT) /* * bio flags From patchwork Wed Jul 21 12:43:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12390799 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 B5EECC636C9 for ; Wed, 21 Jul 2021 12:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FF0461221 for ; Wed, 21 Jul 2021 12:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237797AbhGUMDC (ORCPT ); Wed, 21 Jul 2021 08:03:02 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:44572 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhGUMDC (ORCPT ); Wed, 21 Jul 2021 08:03:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1626871419; x=1658407419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UcvflyF6Sr3l32JUsiG2KYWllwPGJ3YVp9x5kYVKYbk=; b=jVmNQR08znru3B3CjRW4r6OvZOnszVPLCElvGYQe5JeVoI/xeUE0hWta U+3oU3bl8RA7N16oChF5llLzq+jEiXykokUqXtfXWwwpo3nYywL9x0ENb wRqwp8zM58aQJ9JvSlU9tUoEMZHAp/ecHHhcQw2du+X/qvoU634ROLuHb uJMBsHe66o1ZyS7/q9J/4sqjeSlkzVbVR0oqh+kxh3HdAuwhQB1fFt4/S 37L+SXDg04IIDK2p8/PPeAAUlO4ll+E3b64LxBo2r2+ZXcipPIenDyeBi 6+gh+6B9iTwvAERFQq+SmEOUGHDtVyGJCuT36KVr4GYrJCcBHtC+LzxGS w==; X-IronPort-AV: E=Sophos;i="5.84,258,1620662400"; d="scan'208";a="174366711" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Jul 2021 20:43:39 +0800 IronPort-SDR: O2GytIaPopqHKJJRN2h2j6qqONLxiUxcY49PJVvtd/rbZtIzuTVK53A0FjoFGYJ7tFGoGNctob cWpjZJrjgRjLSZi7yNhO1qpnuSUzFmSqwI2wtRC/TZPTqtmlPh4yVbeKcl9qKfK6MSpVfLI7Rj GGeNyTnvd0ExvvZIEnQCKSE79g59Qiu+JKGqa/f2KZtQiJSKZzXcCV/lBER+SY3uZIiaIFGkyC lHU6d9V0KUjVYf7e+Cr6vTnmHvc27k+2ZSLxqX9BFcYT47+ddFp39Becb3x61mBh6gqxKt2HyE 6OvfkPEDZkBb00bvPaEmqhFx Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2021 05:19:53 -0700 IronPort-SDR: /fR06Vu9mOQOpevVvXu955grwVUOudBwYkLPeLWlHV7uuawSDC9drZXvbE3IaJ+pDzDUM6ErAz 569hO8mhCewsyCpSR+03azKgo8lbKL0zTwMjWz069P+0BY8DSASGHnnvnmA9Z+T1mkSAsuFgYL cqtWEG0HYaC7v6rUavSvFEDHcO3x9aR5KnxXT/Lya85iloDYEo0DPA6guQChNtYU94A9l9TWRT wvIBYrRcwxeZG44ypE1Ue3FUQPmB/zJ2Yly5eXu7JFT5vziBm/RFEIWif/FG0t837wvxWifLQ8 JWo= WDCIronportException: Internal Received: from my8nr8qf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.49.83]) by uls-op-cesaip02.wdc.com with ESMTP; 21 Jul 2021 05:43:38 -0700 From: Naohiro Aota To: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org Cc: Jens Axboe , David Sterba , Chaitanya Kulkarni , Naohiro Aota Subject: [PATCH v3 2/3] btrfs: fix argument type of btrfs_bio_clone_partial() Date: Wed, 21 Jul 2021 21:43:33 +0900 Message-Id: <54a957c10f01437a4e28ca9381388745244fb427.1626871138.git.naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Chaitanya Kulkarni The offset and can never be negative use unsigned int instead of int type for them. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Naohiro Aota Reviewed-by: Christoph Hellwig --- fs/btrfs/extent_io.c | 4 +++- fs/btrfs/extent_io.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 1f947e24091a..97c275b5631e 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3153,11 +3153,13 @@ struct bio *btrfs_io_bio_alloc(unsigned int nr_iovecs) return bio; } -struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size) +struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size) { struct bio *bio; struct btrfs_io_bio *btrfs_bio; + ASSERT(offset <= UINT_MAX && size <= UINT_MAX); + /* this will never fail when it's backed by a bioset */ bio = bio_clone_fast(orig, GFP_NOFS, &btrfs_bioset); ASSERT(bio); diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 62027f551b44..53abdc280451 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -280,7 +280,7 @@ void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end, struct bio *btrfs_bio_alloc(u64 first_byte); struct bio *btrfs_io_bio_alloc(unsigned int nr_iovecs); struct bio *btrfs_bio_clone(struct bio *bio); -struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size); +struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size); int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start, u64 length, u64 logical, struct page *page, From patchwork Wed Jul 21 12:43:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12390801 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 E7B2DC636CE for ; Wed, 21 Jul 2021 12:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D44DC61249 for ; Wed, 21 Jul 2021 12:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237813AbhGUMDE (ORCPT ); Wed, 21 Jul 2021 08:03:04 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:44572 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhGUMDD (ORCPT ); Wed, 21 Jul 2021 08:03:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1626871420; x=1658407420; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+AOmYnp5eWwCpHbiJveVjM12q0Aiis7WZQe+HfKdN1k=; b=Mf2Ucni6WB/4VfagXOb/D87rkHtOjZWzhE8pNS6pw8b4JbGXmRi4Xa0O WbWc6suDXxDnpl1PN5iSdATsWPmKPrLVxDt7ohbBUw0AELjIELwEz/9qP XRZTbx0jcu+o9qqzghWEaiDv2UP06u0zi/l5h9Or9YWZ9xXTPxmnvucs4 g9I/vF306xeINUP3Xd6Wfca82lMrK08QUKjmw7yhai5m6T//5U4dEnCu3 iTvgh4RJtj49fPOfFdUKbIagiFzoYQXrS+wt3mY25BIZs+cB5RwO/azHZ OEVIKz0Y7Lnip/5Qh15QnkZV3aUBUJsZIWlMxfuUrNewrwkjA53HxWTNt g==; X-IronPort-AV: E=Sophos;i="5.84,258,1620662400"; d="scan'208";a="174366712" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Jul 2021 20:43:40 +0800 IronPort-SDR: GCoQug1cBxEWJodie1R+kLOcuDONRUG7AnUAhM+by73Fcz0XEqCYrne4y7g56OShTsTUOXXKzM Uiy2rhkingLDLW/a5q4K1kXjW6Q0cosFBsgRVYPaZLHMVBdS/LX6eT2ax7JCVGrDCoE4RyUYx9 fZ20Q7jsq20d/6T3xk6XF/Sa85iGTg/U0DRdFSaGoaCHkPxgyBMczzuZ01+C4jqXNvXNkvvEdT aaNjxeKkrREo88DOhFB57QSWOSs5TyMU4OuwFgPsAhRZ7Gk6uVC0cFny0Mf51AIREJBnkIds2b Zh3Wfaz/WNB8Q1irZVYdeAvs Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2021 05:19:55 -0700 IronPort-SDR: RJSbz3nvaJqmgbTocMX6w3UNFHfD/f6H55O/Jr9AQm1WE3tftR2Gkl4mGKsiz885NCMIDE9wzK qs6ZenpakotAMjLE4IH3RRBe1PCtkfAsNKIbK7NtL+x/xE0VKD0LQJakYLDxrV1f51bx0gPthY RFRMq+zjgI1/S4q9ijCTJrnZAAcQ1qlv+dF1pUOOGDzjv0G9rlxJBi4Xg/yV8inZ7nrTszQE0c +OpClsyde+CmYVRbJLfy2Nzl3XpK/iJehHqpyh5siTGcKX2hGZ5Qf5mf5YaAc49wp37F3J6Z4N yMg= WDCIronportException: Internal Received: from my8nr8qf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.49.83]) by uls-op-cesaip02.wdc.com with ESMTP; 21 Jul 2021 05:43:39 -0700 From: Naohiro Aota To: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org Cc: Jens Axboe , David Sterba , Naohiro Aota Subject: [PATCH v3 3/3] btrfs: drop unnecessary ASSERT from btrfs_submit_direct() Date: Wed, 21 Jul 2021 21:43:34 +0900 Message-Id: <13a38aa3e4b99f11970f96a85ce0a71498ff0737.1626871138.git.naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org When on SINGLE block group, btrfs_get_io_geometry() will return "the size of the block group - the offset of the logical address within the block group" as geom.len. Since we allow up to 8 GB zone size on zoned btrfs, we can have up to 8 GB block group, so can have up to 8 GB geom.len. With this setup, we easily hit the "ASSERT(geom.len <= INT_MAX);". The ASSERT looks like to guard btrfs_bio_clone_partial() and bio_trim() which both take "int" (now "unsigned int" with the previous patch). So to be precise the ASSERT should check if clone_len <= UINT_MAX. But actually, clone_len is already capped by bio.bi_iter.bi_size which is unsigned int. So the ASSERT is not necessary. Drop the ASSERT and properly compare submit_len and geom.len in u64. Then, let the implicit casting to convert it to unsigned int. Signed-off-by: Naohiro Aota --- fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8f60314c36c5..8cd1a4f0174a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8206,8 +8206,8 @@ static blk_qc_t btrfs_submit_direct(struct inode *inode, struct iomap *iomap, u64 start_sector; int async_submit = 0; u64 submit_len; - int clone_offset = 0; - int clone_len; + u64 clone_offset = 0; + u64 clone_len; u64 logical; int ret; blk_status_t status; @@ -8255,9 +8255,9 @@ static blk_qc_t btrfs_submit_direct(struct inode *inode, struct iomap *iomap, status = errno_to_blk_status(ret); goto out_err_em; } - ASSERT(geom.len <= INT_MAX); - clone_len = min_t(int, submit_len, geom.len); + clone_len = min(submit_len, geom.len); + ASSERT(clone_len <= UINT_MAX); /* * This will never fail as it's passing GPF_NOFS and