From patchwork Thu Nov 9 21:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13451744 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64B59374E8 for ; Thu, 9 Nov 2023 21:06:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oxWF7Uvk" Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41744688 for ; Thu, 9 Nov 2023 13:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=EA2vdzmSDI5EwKrWk7HPBoWgZr1qpG6yziTSnHPxlgw=; b=oxWF7UvkLfHv6FZTgzSdZck4K9 XqlJKnMqeo4LUyirRuj6nfujmkC+rO46A687CiRFum66FFlZ/uQbR9LEbUewtL34AKWyqDqqQzkN1 MLSk0tNZyUAj83uDPrD1EXOluXSIDuAo16IhlcIUmJ1TSEsGoOtndzyjkALNXiptsyzXJjlr7F4d2 z5IF3OnA99mWdSP6bKiqsBdeocrQUvXOk41YjbwEVXuZzTz4qwV5yXTLAhtf3P7U9jcZhyGeVrCbq iqeLnAhpHySs/SSZtXvfm+CoHHK8NJM7tVkU+u2uxH+56D8OF8HGjXKqKEJhIsLpa0YdR7s1BtS13 u1cHHhLw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r1CE7-009Rvz-HZ; Thu, 09 Nov 2023 21:06:11 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , Hannes Reinecke , Luis Chamberlain , Pankaj Raghav , linux-fsdevel@vger.kernel.org Subject: [PATCH v2 0/7] More buffer_head cleanups Date: Thu, 9 Nov 2023 21:06:01 +0000 Message-Id: <20231109210608.2252323-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The first patch is a left-over from last cycle. The rest fix "obvious" block size > PAGE_SIZE problems. I haven't tested with a large block size setup (but I have done an ext4 xfstests run). v2: - Pick up R-b tags from Pankaj - Use div_u64() instead of a raw divide. Thanks, i386. - Add a patch for __block_write_begin_int(), spotted by Ryusuke Konishi - That inspired the seventh patch which finally eliminates block_size_bits(). Matthew Wilcox (Oracle) (7): buffer: Return bool from grow_dev_folio() buffer: Calculate block number inside folio_init_buffers() buffer: Fix grow_buffers() for block size > PAGE_SIZE buffer: Cast block to loff_t before shifting it buffer: Fix various functions for block size > PAGE_SIZE buffer: Handle large folios in __block_write_begin_int() buffer: Fix more functions for block size > PAGE_SIZE fs/buffer.c | 130 +++++++++++++++++++++------------------------------- 1 file changed, 53 insertions(+), 77 deletions(-)