Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2978388ybz; Mon, 27 Apr 2020 07:56:13 -0700 (PDT) X-Google-Smtp-Source: APiQypKqkoJl2Q8cHTVFeKcLCGSWvWh4445/jM483BTeXN20alhfoZkhNzbpW0HDuBEGX1t8kXip X-Received: by 2002:a17:906:f106:: with SMTP id gv6mr20646207ejb.271.1587999373313; Mon, 27 Apr 2020 07:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587999373; cv=none; d=google.com; s=arc-20160816; b=qIzxgb+cHNBz8z4cVbzTfS6jrczt4QH7JcEfIWw1jgtYrtabnGitdWKtsM9+akZpQq 03N6k5jdLjk5w5ezzAvSjhhym7gHUO5V6+T/JQHERCpEUNoUfWfyKWfIUUhOd2H42UEb 116Zi+XhP3qPm3KMptkIkbPKj1GF2pdrbmings9jBb+GxKJIgznvs22rPghn93QOQnp5 N4aQGlgPuLbhvl2UF5EXZMEcl43ol2r46m8X/rb0uChn87uOQw3E5s2XD1xW/Mkae0UN 6wBG6KlbntNQ2IRe/CZYYH9Fturoj54GjmxwndOzS1VMogoM8MKndX1LZyqMwfSJgr+i d2Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Kb7FZIEkwrQnw+pJ0nHhrNF/xCSvHFgr6S5Ug/w/klk=; b=FzOINzu6wr99Fl/PZZ2c8rRvJ4s7GNmkGDYs4/fMncNddLCQW/iDhp0CHSwhauuh76 ZLas+0sewhg4wAvC/kGgDjH57YLB1P+MFCcKmsEv8+Ukt1byuOHiMnZAitIGB1kmGkEP 7Sm05ToSTEA64xQAW/RjyWchMZN1URv7kEpiRTUCLpe2/K1k2UeLjqJxJ6q9FPB1qnNH 3Rw+NuXMTgquVutU47G6JkhV2ToslgljGlN4Xrv0a/GGrFTsE+kT37Rgfd/Slm0r47CA d2GTNQ3vEfoDflksCV0clQ5SQxfcvcUQqJZWM2CgXw8y2Pj1NgHPA46YBHLBfKWojPDD S5uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si7934712edu.55.2020.04.27.07.55.49; Mon, 27 Apr 2020 07:56:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727980AbgD0OyJ (ORCPT + 99 others); Mon, 27 Apr 2020 10:54:09 -0400 Received: from verein.lst.de ([213.95.11.211]:48747 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbgD0OyI (ORCPT ); Mon, 27 Apr 2020 10:54:08 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6822068C7B; Mon, 27 Apr 2020 16:54:06 +0200 (CEST) Date: Mon, 27 Apr 2020 16:54:06 +0200 From: Christoph Hellwig To: Martijn Coenen Cc: axboe@kernel.dk, hch@lst.de, ming.lei@redhat.com, narayan@google.com, zezeozue@google.com, kernel-team@android.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, maco@google.com, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com, jaegeuk@kernel.org Subject: Re: [PATCH v3 3/9] loop: Switch to set_capacity_revalidate_and_notify() Message-ID: <20200427145406.GC5490@lst.de> References: <20200427074222.65369-1-maco@android.com> <20200427074222.65369-4-maco@android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200427074222.65369-4-maco@android.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 09:42:16AM +0200, Martijn Coenen wrote: > struct block_device *bdev = lo->lo_device; > > - set_capacity(lo->lo_disk, size); > bd_set_size(bdev, size << SECTOR_SHIFT); > + > /* let user-space know about the new size */ > - kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); > + set_capacity_revalidate_and_notify(lo->lo_disk, size, false); I'd drop the comment as that is pretty explicit with set_capacity_revalidate_and_notify. Otherwise looks good: Reviewed-by: Christoph Hellwig