| Message ID | 20260416165733.2923423-7-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1776358745; bh=2BG86rQXdkQipoK49RLlexkjpBs6IeyvfRnsFGd9bDI=; 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=pydxLh47rxhBqelnrWDt2wozbr7u3IPyr4QiuZMiN4vniSv8xZRtjFA1AkJko6lC/ Yh6K2BbzI45WzwrTiQm//zudmwzk3XgrRkwf77O04yxvNHUA3X4I4wt+KPjQqL8QQj vtAupEvgO7iYPKfANtqK3ve9+fcrrE4wxSFZhUqI= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 58BEA6A4F1 for <u-boot-concept@u-boot.org>; Thu, 16 Apr 2026 10:59:05 -0600 (MDT) 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 0qF4YL-NC9_r for <u-boot-concept@u-boot.org>; Thu, 16 Apr 2026 10:59:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358743; bh=2BG86rQXdkQipoK49RLlexkjpBs6IeyvfRnsFGd9bDI=; 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=Ywo6D//mDCUKsgyWyaOXp40gvyu4wW1qrdggQa1qYjS9yvCUcJIrcVtw9QbFYvDcn LREK2MeNL93gFJw0Ru6BRLXf8aomRxqXC0JKBaQPo8EP/1ekDpibO2rnKJGFOuT7iZ zuLPc37dcDjbp8CJakxMowI8UXcl5vwJ2h4DqEx0= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 572026A4E8 for <u-boot-concept@u-boot.org>; Thu, 16 Apr 2026 10:59:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358741; bh=lS12DOzQQLZ8AjfOVNgbNYQZCjP97oilhsq+GUxMWPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FzTeZiBC2XHk++DqeoxwHDNJyG0sCW9ipxiWRFPeX4357dmpUUKnFh8Hr9llaUC/G zkKQ1Y1HaaIF5dYHFMvtTIcug8BaC1751z/DTP+XwnZDQRz5K0ZVfhdXWwNZKfMQFs yirbfehGw8aSbNrIvznznN4zYdJOei8Yuc1YzhFw= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 83D026A4A5; Thu, 16 Apr 2026 10:59:01 -0600 (MDT) 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 lc3PAvU-P0Oa; Thu, 16 Apr 2026 10:59:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358741; bh=0PBJbBNQGTxg+MrXo+k26XFicooyTpM7j6/48vSdxmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IcogwMCMs5U7pZY/o6xd3HoPmVkRMDozWP9fvp1/hrtQGgt52HHM8R8GQa30K1gr1 L3wiyM+9sNme3niMrLW7i9tGngxUKvj+2qViH+qznkEBBwMygPAwKk9RyUsiK3sJT9 V4nMduML2NKuXNTnD5IZzB4XCHutgnm2rUixNo1I= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0F1896A4D8; Thu, 16 Apr 2026 10:59:01 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Thu, 16 Apr 2026 10:56:56 -0600 Message-ID: <20260416165733.2923423-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260416165733.2923423-1-sjg@u-boot.org> References: <20260416165733.2923423-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5BV3UUDCRGFUK6TV2BE67F7CIYYZRXBZ X-Message-ID-Hash: 5BV3UUDCRGFUK6TV2BE67F7CIYYZRXBZ 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 <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/21] linux: buffer_head: Implement map_bh() properly List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/5BV3UUDCRGFUK6TV2BE67F7CIYYZRXBZ/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
fs: Add ISO 9660 filesystem driver ported from Linux
|
|
Commit Message
Simon Glass
April 16, 2026, 4:56 p.m. UTC
From: Simon Glass <sjg@chromium.org> The map_bh() macro is used by isofs_get_blocks() to record the physical block number for a mapped buffer head. The current no-op stub causes isofs_bmap() to return uninitialised block numbers, leading to reads from invalid disk locations. Implement map_bh() to set b_blocknr and mark the buffer as mapped. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/linux/buffer_head.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index ea317a6488d..3b829e035aa 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -283,7 +283,8 @@ static inline void end_buffer_read_sync(struct buffer_head *bh, int uptodate) #define try_to_free_buffers(f) ({ (void)(f); true; }) #define block_commit_write(f, f2, t) do { } while (0) #define block_page_mkwrite(v, f, g) ((vm_fault_t)0) -#define map_bh(bh, sb, block) do { } while (0) +#define map_bh(bh, sb, blk) \ + do { (bh)->b_blocknr = (blk); set_buffer_mapped(bh); } while (0) #define block_read_full_folio(folio, get_block) \ ({ (void)(folio); (void)(get_block); 0; })