From patchwork Mon Jan 19 06:15:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1626 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=1768803436; bh=dnIQNveI5OPRo77uCO9Vup+cPWfomxbU0JE5815E0U0=; 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=Cfu8Xvla/MpHlmd/xlPm+MS4qONndOn+Nx6Fzmi0ps3sLNgtfVqd4vkhRXtONSk2z /4id11V1kzdfqr//9Fu8hf7trvJvuxO5Orqj5CV4ebwJZgt/0TqExxGJ1l01MZKQvf pC6HwmIjoEDg3X52GIqZWlRHRebgIQVH8AvaJOGm019kL1ga9Fth7IL0HPGaOfs8P+ E/7x8m43QekxREW6Ey29iw8JRyekaWbgzOnDakssG5MTLfhaG+frYNzh+uW5GC1bMG nWG9FKY0ltv+etriG0GbV5MKbXBOXhZbmKIIkTKKU+WDfFK00phbD8MBlmaWrhfE2C I8h2ecuI4rZOw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 41650694E1 for ; Sun, 18 Jan 2026 23:17:16 -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 P1y91mnTwLPj for ; Sun, 18 Jan 2026 23:17:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803436; bh=dnIQNveI5OPRo77uCO9Vup+cPWfomxbU0JE5815E0U0=; 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=Cfu8Xvla/MpHlmd/xlPm+MS4qONndOn+Nx6Fzmi0ps3sLNgtfVqd4vkhRXtONSk2z /4id11V1kzdfqr//9Fu8hf7trvJvuxO5Orqj5CV4ebwJZgt/0TqExxGJ1l01MZKQvf pC6HwmIjoEDg3X52GIqZWlRHRebgIQVH8AvaJOGm019kL1ga9Fth7IL0HPGaOfs8P+ E/7x8m43QekxREW6Ey29iw8JRyekaWbgzOnDakssG5MTLfhaG+frYNzh+uW5GC1bMG nWG9FKY0ltv+etriG0GbV5MKbXBOXhZbmKIIkTKKU+WDfFK00phbD8MBlmaWrhfE2C I8h2ecuI4rZOw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2C887694CE for ; Sun, 18 Jan 2026 23:17:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803433; bh=Qum2tpiZ4v+WWIDFQjQfGhMqIatBf8WpvYd1an7rjfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YtgivFF60nhG0YA/MPcjp4NIXIZfVAtay5WXXivwlj0wo1aZarEiDCg598mlngimZ Sqhmc3IPLp/4t+F7l079hDuaPyE+4CTxCrO7b2YEyLYk1BE/Ur/azMd8VDnahTbns0 tvFcM2W/01sm3JXMENWngUAVhzRCOMgPAa65+pEKTdhqzesTjyppejE1MapE2ZPXyK qilOJ+tlFmYsq+bzmFIW0fj8D5UgWlJo763MJfqtngjdCr3LWgPUJmMHZE/BhXDSEW nF5RrkKyqconZGyeWHVqM5wqxJ3QAl7jKQjizsxsD5dcV+YVjfOZ2oEo58JDSnp8or 2yKTXkZaInNlA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9DF4F693AE; Sun, 18 Jan 2026 23:17: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 T3e2XGywSkSn; Sun, 18 Jan 2026 23:17:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803429; bh=UKw6hkMVv+ijmVjo2Xpmzj4YP7muhkEzqvsYMx6IJbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aSu5FPOAb4HXPUdmHII+0MEkBWRJizedZ2/Z/ItRR+UnD1YPDdr+aTK9XsTl5eS+S 3yGj5QbxlwrcoY4TgZltIsGF17wq9z2U2CVU9aa2pg4At2MB8/4MkkaRu98Ve7IpCb FFdp5lFgPEsyO2CKLJXIdV3HemRZf4vCKuvNYzKpLfUQrdWw9WoY/HP408Z3b4vmwT KomxkC5T9Ku5fkJa4J3/qXXs6ucjVMe8YU/A4NrekuUZvL6fnQNyrgBOKUOguRQs4j qwsreQ0BMZfyRJuTfht4bvHUEbyrqJJJSUehY2whXAQR9g9V8p3tBaGiDXp0MKINWK K5a/FN/WhU8Ig== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5BCF0694C0; Sun, 18 Jan 2026 23:17:09 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 23:15:17 -0700 Message-ID: <20260119061529.3383191-20-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119061529.3383191-1-sjg@u-boot.org> References: <20260119061529.3383191-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: V6UKD67YKJ3LJSGRUNBMHVICV5P5FGIB X-Message-ID-Hash: V6UKD67YKJ3LJSGRUNBMHVICV5P5FGIB 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 19/23] ext4l: Move BLK_OPEN_* flags to linux/blkdev.h 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 the block device open flags to include/linux/blkdev.h where they belong with other block device definitions, matching Linux kernel organisation. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 6 +----- include/linux/blkdev.h | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 9e3d59a3174..dc6d4c3910a 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1194,11 +1194,7 @@ void ext4_unregister_li_request(struct super_block *sb); #define SB_I_CGROUPWB 0 /* Not supported in U-Boot */ #define SB_I_ALLOW_HSM 0 /* Not supported in U-Boot */ -/* Block open flags */ -#define BLK_OPEN_READ (1 << 0) -#define BLK_OPEN_WRITE (1 << 1) -#define BLK_OPEN_RESTRICT_WRITES (1 << 2) - +/* BLK_OPEN_* flags are in linux/blkdev.h */ /* REQ_OP_*, REQ_SYNC, REQ_FUA are in linux/blk_types.h */ /* blk_holder_ops for block device */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8c848139a7e..f1a4cc12d3c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -18,6 +18,13 @@ struct gendisk; /* Block size helpers */ #define bdev_logical_block_size(bdev) 512 +/* Block device open flags */ +#define BLK_OPEN_READ (1 << 0) +#define BLK_OPEN_WRITE (1 << 1) +#define BLK_OPEN_EXCL (1 << 2) +#define BLK_OPEN_NDELAY (1 << 3) +#define BLK_OPEN_RESTRICT_WRITES (1 << 4) + /** * struct blk_plug - block I/O plug *