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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 59358C2BB85 for ; Tue, 14 Apr 2020 08:17:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 399AE206E9 for ; Tue, 14 Apr 2020 08:17:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407101AbgDNIQy (ORCPT ); Tue, 14 Apr 2020 04:16:54 -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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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