From patchwork Sat Jan 17 01:14:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1577 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768612575; bh=fovTEyiA4y/Roxz5QXy/1dn7N+D35tZ+T2v8NTZTtx8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jtdHFIpzsERHMT/S4JYnR7FoN7nkqmJEBV4UuvpDZ5KqfMcxeOv0wtLejz1or1WYN B9j3yKX/H7ax/ig2O0X/a6sD+oIY1tA9H/oS8MkjNbXnrdYXl4HrVLxswl1a9p03d4 rbYqd8LWrxI9gcgRQ+FuzYoy03WK3R1B7e2+J9al7bTX9IidgazW8hsJzGCXKWecf7 NNLdTaLsDIdmfV4ad1p5BG9mS9UBQJjdf94AyvE2d78vGWToJknK19Jtb2h0oJzCb1 bcdWwLcc0eCSTwsWiGXJfU8PSzITYBi07p83vixutpKvQacCKfJZvebEfJAWV3Ai+4 23D+q9LPWETjA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 728D469405 for ; Fri, 16 Jan 2026 18:16:15 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YAsoy3WIldWn for ; Fri, 16 Jan 2026 18:16:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768612575; bh=fovTEyiA4y/Roxz5QXy/1dn7N+D35tZ+T2v8NTZTtx8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jtdHFIpzsERHMT/S4JYnR7FoN7nkqmJEBV4UuvpDZ5KqfMcxeOv0wtLejz1or1WYN B9j3yKX/H7ax/ig2O0X/a6sD+oIY1tA9H/oS8MkjNbXnrdYXl4HrVLxswl1a9p03d4 rbYqd8LWrxI9gcgRQ+FuzYoy03WK3R1B7e2+J9al7bTX9IidgazW8hsJzGCXKWecf7 NNLdTaLsDIdmfV4ad1p5BG9mS9UBQJjdf94AyvE2d78vGWToJknK19Jtb2h0oJzCb1 bcdWwLcc0eCSTwsWiGXJfU8PSzITYBi07p83vixutpKvQacCKfJZvebEfJAWV3Ai+4 23D+q9LPWETjA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6191F693F4 for ; Fri, 16 Jan 2026 18:16:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768612573; bh=ynnDCa3CHzi9n86R4onYpVZ9N90lFcK/b7FOnPkOcic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CBEWDmt92kXljWFvJf261DgH8LdAphRktBtXE72zbkhYzn77qEtS1+wTteUm93K8u 92Zxp+ui2kPk/P7k/O/xloskba6MX7uxE1Cg+ZCSAGW5nclPMsX0xD8B8RNy3AZcoa 9Ey737SX7yQjykBc8MuQssp1zOmUHnP/+VrRUF3ZOJAv4FeiYl+k5gL1Y5gMVpJu4j 5R72BUycYhm76VCKy5pRkKEaGNDVdYgNo5WgkwVzCViSZmdnHv9A1aCGkScrAk5WIH eumB8Ua4VnsBlU2I+TweCYv+IWyLSh9cmpsyPNkE4UZ5xXa9nrmJFvZramTVG2ShU/ 2+fIkyzZgmF0Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 61753693F4; Fri, 16 Jan 2026 18:16:13 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id q2LP_hxYaSBa; Fri, 16 Jan 2026 18:16:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768612567; bh=STl4Rrx8lS6neYCLZCRyR3K9zD/3FzVaJvsZADKGqBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G9ZJBI+BQc8laU+9f1RZaChwbUgnhpe29p2OhtovLGgpSCKg6Uu8FRchtkjFWc03i HJBz4M1vRfGslsgiYeae/6k9vg1K9X6apt1TBBSOWaJLiqUc31UHKAepqltDuyVoEA bQ2pEAr7SloGVjbJtVXVC2Dl402I5r4y4MfEyHHQTB6b2ktbFEPmWFcUWUxZLxqwYG 9kqEtGd3oUENvUxSPeVJ0s+0TWFU24vCJZ5t4x1kJbMs+Ls5mnUqIqPpdokis63MOT 05FmXVlfoDv4uD5d8fF0DY3BtiAMihjZDSmnv2gEkBpih0Zp+aCmlh8ggsG+DJVzgI Qe/X5WmTRZm4w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A61E86913F; Fri, 16 Jan 2026 18:16:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 16 Jan 2026 18:14:39 -0700 Message-ID: <20260117011448.3007171-18-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260117011448.3007171-1-sjg@u-boot.org> References: <20260117011448.3007171-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IGJPJLZK3URNI2RIIP7PQ6F65PUL552T X-Message-ID-Hash: IGJPJLZK3URNI2RIIP7PQ6F65PUL552T X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 17/19] linux: blkdev: Add blk_plug structure and operations List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move block I/O plugging stubs to linux/blkdev.h where they belong in the Linux kernel organisation. Add to blkdev.h: - struct blk_plug - block I/O plug structure - blk_start_plug() - start plugging (stub no-op) - blk_finish_plug() - finish plugging (stub no-op) These are stubs since U-Boot doesn't use block I/O plugging. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 7 +------ include/linux/blkdev.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index aa357599449..979af9ed22a 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -925,12 +925,7 @@ static inline xa_mark_t wbc_to_tag(struct writeback_control *wbc) return PAGECACHE_TAG_DIRTY; } -/* blk_plug - block I/O plugging stub */ -struct blk_plug { - int dummy; -}; -#define blk_start_plug(p) do { (void)(p); } while (0) -#define blk_finish_plug(p) do { (void)(p); } while (0) +/* blk_plug is now in linux/blkdev.h */ /* Writeback reasons */ #define WB_REASON_FS_FREE_SPACE 0 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 92878b01c3e..8c848139a7e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -18,4 +18,29 @@ struct gendisk; /* Block size helpers */ #define bdev_logical_block_size(bdev) 512 +/** + * struct blk_plug - block I/O plug + * + * U-Boot stub - block I/O plugging is not used. + */ +struct blk_plug { + int dummy; +}; + +/** + * blk_start_plug() - start plugging block I/O + * @plug: plug structure + * + * U-Boot stub - no-op. + */ +#define blk_start_plug(plug) do { (void)(plug); } while (0) + +/** + * blk_finish_plug() - finish plugging and submit I/O + * @plug: plug structure + * + * U-Boot stub - no-op. + */ +#define blk_finish_plug(plug) do { (void)(plug); } while (0) + #endif /* _LINUX_BLKDEV_H */