Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp129054ybh; Tue, 10 Mar 2020 21:04:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt0hAqokHiMfctkvK6xOq7Dv7qrBFXT+ZG55XFCmR+QRYn9BLxqiUU6ki5VFmxgvnXMqbDA X-Received: by 2002:a05:6830:1581:: with SMTP id i1mr759717otr.349.1583899496740; Tue, 10 Mar 2020 21:04:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1583899496; cv=pass; d=google.com; s=arc-20160816; b=xfLIU8qX8hxBhq+AQCQCHpE7JQMfGJEMaggytW4FoXCbhd57dpr3nUpR7giQL+6RdD /P/lPASd0m1G7BnO2DOHe+hXrFWy4VEjEi1rbS18ib1SJujgRFqUdn9joeJe93mP9wJ5 hWBBxamglKcCo+f969Yaz5fACpZ4/sU7yxzDSsWRBSTFVhDGsHO7n9wEIsNvriOKVhf6 atxXjCRwMjNKoB+8MHnDbpPflEfbSnD3ukcax6PQUfE6Z+jzUMV4OCsL8l2rj7/1nzFB KzCXmi80vCGXV6yqApd0rktw2JjXugyx3Sc0bHZ/KYvQ1bg71Kr/FQ4d7F+3KzvR6vqG Ad6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature; bh=wnqGGJ/YZIcJnZUnivCOZ7zrQrNsQLPkFMGyTpbbaGo=; b=uBc5+792rsMVulQfgy8tV0onwspftlaxCOAJZTG6MMci1gEKpF2OXsvMnvViehoJGC 171m+MGswjp/5uaMEFhUFXRhtPJzd8xmBfqHP/1+Ut9j7Lex/QoAas9Q3OEcY0E6Moo+ Ma1eEdUoHnZVR/arZO8Dgslo1Pvdo3dkKNxYUYG2I8xh3WIjBKWHkJ9yjE6dUcOmyJ4B 2WuS1BDLzxLsTMIEKzJucOtUUdwFGyLxLtJLy3P1i4ZCmTwbPLubk6hEs+gddfOal19l vHz7jCyrvTDeYYgfj3NZ7tcTI/LcHBWgITaveIhob60+9HcSaTlcXopuaZKTtpewQIRB TU5Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@windriversystems.onmicrosoft.com header.s=selector2-windriversystems-onmicrosoft-com header.b=oqzQpnQI; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si437973oih.89.2020.03.10.21.04.44; Tue, 10 Mar 2020 21:04:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@windriversystems.onmicrosoft.com header.s=selector2-windriversystems-onmicrosoft-com header.b=oqzQpnQI; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726310AbgCKEDz (ORCPT + 99 others); Wed, 11 Mar 2020 00:03:55 -0400 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72]:35150 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725379AbgCKEDz (ORCPT ); Wed, 11 Mar 2020 00:03:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a/knOl/+cZEbv2jPXy/ozNPU7/U9u2/+kADOd839FMdTZbt75Dx0YRyo+nK90tJuIGNXMwykPfvA2yiA0KsID9s5oZtozN+NRo5MHzGDQWThs61z9dF9hPm/CVXVvdKj5CjA4Zh7G0JokVpScaTb5FOsNAigzNjXYHCMat15oi337G7m8GqXC9ty4Hem25iyLWxmNYddub/nyBThffntIcxNaK3wXyWSiKFL+qs8An/7MglQeHSkEL5yKXNFeMY2JWAeqMOlsqqCJp2QU9PQTU6woifB/EHFedM0z9Cqqgb/I0yQJUugjDXMGzRU9cd8YvmOlasdEj92oKS9Qr8sWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wnqGGJ/YZIcJnZUnivCOZ7zrQrNsQLPkFMGyTpbbaGo=; b=Nn/DXQjhcFkdX8Rq3nHaqR9Lw/qnZvNv+7K9sPmRIGObkjxBvnv+uVaWu6ArELqWxpxnYQw/KH2Xl9jYbBItfzttYTKmJ70AFdb66inD9KiSjJk0zp8X6wX+oXa3rosttlN2W8zNMHVFR/jLWptgFuthG42kCQA6NpM84yd7wrViNjt22RZfUUWe2cQ6w9YUtgmURS5c3+Ohs3zvRdeoSiq1QFafDAKJnh2PhO9YrhpFOSBMF92nOep1RkgUx+w8hLpUi9ilinOo+eRCwzEiNbHAEZc6B5A7gIfxBNEb952EjVaypIv8egsYVbV7FbxYbns5x2z/fxkbZwlOR5Ffmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriversystems.onmicrosoft.com; s=selector2-windriversystems-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wnqGGJ/YZIcJnZUnivCOZ7zrQrNsQLPkFMGyTpbbaGo=; b=oqzQpnQI3LhAzA69iB28hRQoz7zGbsh1TnPC7HL5yD/iUhX9ZkJYVNkUz6wqzoRr/kHVXuanm13PMwcWq06fN7+apZj/BDM/oVm70+B3XRjs199ly3j8OJQ9bUvNSE9S76nsz9QX4ej5ug+f4oBTnpBtFdhX3MEiggcDo5qVWMg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Zhe.He@windriver.com; Received: from SN6PR11MB3360.namprd11.prod.outlook.com (2603:10b6:805:c8::30) by SN6PR11MB3326.namprd11.prod.outlook.com (2603:10b6:805:bc::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 04:03:52 +0000 Received: from SN6PR11MB3360.namprd11.prod.outlook.com ([fe80::d852:181d:278b:ba9d]) by SN6PR11MB3360.namprd11.prod.outlook.com ([fe80::d852:181d:278b:ba9d%5]) with mapi id 15.20.2793.013; Wed, 11 Mar 2020 04:03:52 +0000 Subject: Re: disk revalidation updates and OOM To: Christoph Hellwig Cc: jack@suse.cz, Jens Axboe , viro@zeniv.linux.org.uk, bvanassche@acm.org, keith.busch@intel.com, tglx@linutronix.de, mwilck@suse.com, yuyufen@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <93b395e6-5c3f-0157-9572-af0f9094dbd7@windriver.com> <20200310074018.GB26381@lst.de> <75865e17-48f8-a63a-3a29-f995115ffcfc@windriver.com> <20200310162647.GA6361@lst.de> From: He Zhe Message-ID: Date: Wed, 11 Mar 2020 12:03:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 In-Reply-To: <20200310162647.GA6361@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-ClientProxiedBy: HK2PR04CA0089.apcprd04.prod.outlook.com (2603:1096:202:15::33) To SN6PR11MB3360.namprd11.prod.outlook.com (2603:10b6:805:c8::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [128.224.162.175] (60.247.85.82) by HK2PR04CA0089.apcprd04.prod.outlook.com (2603:1096:202:15::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.16 via Frontend Transport; Wed, 11 Mar 2020 04:03:48 +0000 X-Originating-IP: [60.247.85.82] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9d315c3-787b-4613-0f20-08d7c57135d2 X-MS-TrafficTypeDiagnostic: SN6PR11MB3326: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(376002)(396003)(39850400004)(346002)(136003)(199004)(7416002)(5660300002)(478600001)(66946007)(2616005)(66556008)(31696002)(16576012)(316002)(53546011)(6666004)(956004)(66476007)(86362001)(4326008)(16526019)(186003)(6706004)(36756003)(6916009)(52116002)(8936002)(2906002)(31686004)(81166006)(81156014)(8676002)(6486002)(26005)(78286006);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR11MB3326;H:SN6PR11MB3360.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: windriver.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6nhI65631lvmXxV54X7imbeEedGahUGyggZJkItO8E7twz4cMjuXh1GFiDkuLSC6Q1V6m1ih+8jTyRjtgUqUS1HxvTgXdB2uYEuL1VUuwusaq0d/r+K0Q4bYtTiAfI0d0K9z+QfXSJJOAvkFtQCUsItCDyDOh7a7vgmK3tuCvb3ceF5VaMe3LqeKKUaLDMzTrwutzvyrOuuvnOTRXJIvU2ZExUe7xpBWtoGB9z5NVfl9LC5Yu0vbuAm/r5QmtLvMlMg/sEZZPqJJwJMTAYRRfNUImuQ/FnHYRmOYpEzNr6p74wMgC8WnlerCejx663n0CGOYeXsMkCur62incy607yZNhemSP1Qs+i9bCvXtdFbCeknN99i/ViucD1KD1tDh/HhHBu8b6dLbWi/GEZptNFfp4YRk30kzQFo0BYbvpY3j60Zg7bOmBR3BJpVEeqoV8EghzaBXjhqslSbRuiz3qlvwwLAdXz4SFXuvZ35aQUOjwlUFGKodztlPvKxfortLbVQd4pxGpFWg0yEgk/QpiIAsewxx8vPNhEY8IdoivIM= X-MS-Exchange-AntiSpam-MessageData: BedbGS+2nS9CO5QJBC7eE+rsTzoovuNbosfvHruMKaYtqRuNtvex4Eg7TZ98mDnwEG+VWnFWmLRv7b+6ufhl4ZKlf8I8porx1mhDwdlphNwK3fYxBy+LJtwg4XiiQh/7VST0eNghLeRdiaDitpst7Q== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9d315c3-787b-4613-0f20-08d7c57135d2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 04:03:52.3618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0NvsCwhHK+tkhvM0pSwpSIkl0TzcWUyIgQzdqImYoFZ/YvAxllf3B98HBXfciHWHhIKhXZZJJz3MKhb7Z/EJvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3326 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/11/20 12:26 AM, Christoph Hellwig wrote: > On Tue, Mar 10, 2020 at 11:30:27PM +0800, He Zhe wrote: >>> So this is the exact requirement of commits to be reverted from a bisect >>> or just a first guess? >> Many commits failed to build or boot during bisection. >> >> At least the following four have to be reverted to make it work. >> >> 979c690d block: move clearing bd_invalidated into check_disk_size_change >> f0b870d block: remove (__)blkdev_reread_part as an exported API >> 142fe8f block: fix bdev_disk_changed for non-partitioned devices >> a1548b6 block: move rescan_partitions to fs/block_dev.c > Just to make sure we are on the same page: if you revert all four it > works, if you rever all but > > a1548b6 block: move rescan_partitions to fs/block_dev.c > > it doesn't? After reverting 142fe8f, rescan_partitions would be called in block/ioctl.c and cause a build failure. So I need to also revert a1548b6 to provide rescan_partitions. OR if I manually add the following diff instead of reverting a1548b6, then yes, it works too. diff --git a/block/ioctl.c b/block/ioctl.c index 8d724d11c8f5..bac562604cd0 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -192,6 +192,7 @@ static int compat_blkpg_ioctl(struct block_device *bdev,   * acquire bd_mutex. This API should be used in case that   * caller has held bd_mutex already.   */ +extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev, bool invalidate);  int __blkdev_reread_part(struct block_device *bdev)  {         struct gendisk *disk = bdev->bd_disk; diff --git a/fs/block_dev.c b/fs/block_dev.c index ec10dacd18d0..30da0bc85c31 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1508,7 +1508,7 @@ EXPORT_SYMBOL(bd_set_size);  static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part); -static int rescan_partitions(struct gendisk *disk, struct block_device *bdev, +int rescan_partitions(struct gendisk *disk, struct block_device *bdev,                 bool invalidate)  {         int ret; Zhe