Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp405296ybz; Wed, 15 Apr 2020 10:59:19 -0700 (PDT) X-Google-Smtp-Source: APiQypKERayC+VeB/0Nx+jPOLydtPlonnndAs0wt+PKARmekr4m2IwRiwjCLMRvu8JBjFMV85lIw X-Received: by 2002:a17:907:435d:: with SMTP id oc21mr6405430ejb.100.1586973559162; Wed, 15 Apr 2020 10:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586973559; cv=none; d=google.com; s=arc-20160816; b=mBrgzNFeSmClyxnu6KgR9Y2x5iVeFWxKZ/a6fXbWniP8qXL7Ij98MN76PDpMgi2pf5 uUoidHzUZy9BONdCDGf+wVpd+bhucIbM5KCIHtD4/KLgyWbx53IIMr9F6TyODiaAF6NA RNOmZS1lC95zqcQdn73Q7x9KYawGWtBQ0mmIKwVhy06a3PDrIswxXp6b9JsTC9k9PLhj b157pEEiyE7EAryHDHxLYgpeg9FYwj4j96DDIY3dZBVO1MW1VsYsV7e9K5J1vgXIimLq bRhoZMEGWSBNfp8Woi2Pt3Es2s33oqNxskiCgkR4hi6at5b6TN6D4X56arxvsgq6gxgE oWqA== 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=dEU0NnctIXtJTyQjoERQRrET996NxnSoPg7QFvbIR48=; b=aXrXwx7YaYNb5tyCquYMovfJNFyOa/grUlETxqVVjyl+f+2MVlTHxpQMhNgqjc5eCw k/KKKn4gXv/lwdDhV4/CbOj+FaZQFlxhV0cXu3EUY/MJDiSJ8f2PzNKU4UZIsN1yf4IM 3gE/WsdIh6Tb61NW5MId865RPFQ14rFxg5v/Shp6+d+MQ26+xhRfgc7YJB6cPu3BaEwr gPNbf2Id1dRvMwK4aTCoBvwHKz6fU83FrzsNlN5zXWBbpAwvvUTkY50ARIaaNdWVODpk FjjfYS/DYUquti3X8CL/+wTAaIrCiDBA90VmV4do3FdYMd+Pmdy0ipGBQh6VxO9d/Z+8 KVkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for 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 j10si12149411edn.396.2020.04.15.10.58.55; Wed, 15 Apr 2020 10:59:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 S2407105AbgDNIQ4 (ORCPT + 99 others); Tue, 14 Apr 2020 04:16:56 -0400 Received: from verein.lst.de ([213.95.11.211]:38066 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407099AbgDNIQt (ORCPT ); Tue, 14 Apr 2020 04:16:49 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 1527168BEB; Tue, 14 Apr 2020 10:16:47 +0200 (CEST) Date: Tue, 14 Apr 2020 10:16:46 +0200 From: Christoph Hellwig To: Martijn Coenen Cc: axboe@kernel.dk, hch@lst.de, ming.lei@redhat.com, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH] loop: Call loop_config_discard() only after new config is applied. Message-ID: <20200414081646.GA26486@lst.de> References: <20200331114116.21642-1-maco@android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331114116.21642-1-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 Tue, Mar 31, 2020 at 01:41:16PM +0200, Martijn Coenen wrote: > loop_set_status() calls loop_config_discard() to configure discard for > the loop device; however, the discard configuration depends on whether > the loop device uses encryption, and when we call it the encryption > configuration has not been updated yet. Move the call down so we apply > the correct discard configuration based on the new configuration. > > Signed-off-by: Martijn Coenen Looks good, Reviewed-by: Christoph Hellwig