From mboxrd@z Thu Jan 1 00:00:00 1970 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 E7F98C63697 for ; Sat, 28 Nov 2020 16:15:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8C446246C3 for ; Sat, 28 Nov 2020 16:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="eJs+iBkC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C446246C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB4BE8D0002; Sat, 28 Nov 2020 11:15:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C3D458D0001; Sat, 28 Nov 2020 11:15:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2CFF8D0002; Sat, 28 Nov 2020 11:15:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 99E988D0001 for ; Sat, 28 Nov 2020 11:15:33 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5DF081EFD for ; Sat, 28 Nov 2020 16:15:33 +0000 (UTC) X-FDA: 77534327346.05.cent33_440260827392 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 45B671801368A for ; Sat, 28 Nov 2020 16:15:33 +0000 (UTC) X-HE-Tag: cent33_440260827392 X-Filterd-Recvd-Size: 3886 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Sat, 28 Nov 2020 16:15:30 +0000 (UTC) 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=0Ujl5N8juKc7YdWeiKXE35ZfCBKXX17oNrNBcAKARdM=; b=eJs+iBkCcXmuCXezMNfXNybbPN MnNoU2ZU/lFD+6CHva9FNik4J5OzMMvZeuv5JB1oR3zQptYicrH9fu702ftSZbP6oXKb7PiJFV94X UcE52O6uDK7omj3vVh+DislaFi2U84WSs1R0qoq7rUxujhyur81VoVmgr3aRj57emoG2ZPGfU5SfO MHsCxOqNF3W4S5NgfWG3iXjJEwBocS+uY5XI0zdsC4DWvPWUzTrzncOh+H3YaUrEdTOfxhOtZ4QTM B2rVkhtKzHEotmcEBI7twOnKiJEmNqOmDh/mSMRsTXHDxNnNwD/0yhYCtqZvQy27P8orJCFvmlvho LCQtAJig==; Received: from [2001:4bb8:18c:1dd6:48f3:741a:602e:7fdd] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kj2sS-0000BF-3K; Sat, 28 Nov 2020 16:15:12 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Tejun Heo , Josef Bacik , Coly Li , Mike Snitzer , Greg Kroah-Hartman , Jan Kara , Johannes Thumshirn , dm-devel@redhat.com, Jan Kara , linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: merge struct block_device and struct hd_struct v4 Date: Sat, 28 Nov 2020 17:14:25 +0100 Message-Id: <20201128161510.347752-1-hch@lst.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Jens, this series cleans up our main per-device node data structure by merging the block_device and hd_struct data structures that have the same scope, but different life times. The main effect (besides removing lots of code) is that instead of having two device sizes that need complex synchronization there is just one now. Note that this now includes the previous "misc cleanups" series as I had to fix up a thing in there with the changed patch ordering. The first patch already is in 5.10-rc, but not in for-5.11/block A git tree is available here: git://git.infradead.org/users/hch/block.git bdev-lookup Gitweb: http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/bdev= -lookup Changes since v3: - extend hold time of bdev_lookup_sem - use igrab bdget to make bdget_disk and disk_part_iter* safe - fix some error handling labels - remove a superflous cast - various comment fixups Changes since v2: - keep a reference to the whole device bdev from each partition bdev to simplify blkdev_get - drop a stale commen in freeze_bdev - fix an incorrect hunk that ignored error in thaw_bdev - add back a missing call to mapping_set_gfp_mask - misc typo fixes, comment and commit log improvements - keep using a global lock to synchronize gendisk lookup - do not call ->open for blk-cgroup configuration updates - drop a zram cleanup patch Changes since v1: - spelling fixes - fix error unwinding in __alloc_disk_node - use bdev_is_partition in a few more places - don't send the RESIZE=3D1 uevent for hidden gendisks - rename __bdget_disk to disk_find_part - drop a bcache patch - some patch reordering - add more refactoring - use rcu protection to prevent racing with a disk going away in blkdev_get - split up some of the big patches into many small ones - clean up the freeze_bdev interface