Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2058861pxa; Fri, 7 Aug 2020 01:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/Dee5FV6qrkMMUTdNeadZ80orkKam/MFUs+G3grdpY1D8+/z8YLgZNRrVYuKjA6rNPMkm X-Received: by 2002:a05:6402:1bc5:: with SMTP id ch5mr7562599edb.364.1596790507537; Fri, 07 Aug 2020 01:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596790507; cv=none; d=google.com; s=arc-20160816; b=lCKrja4s792c3k4FzklC5Y0JELmQNYmvgKc0SMdqSPCmVvKsmtjJhlBNwaGyokDsXH If2DEmDRX+ck43ZUaFDCFJzpPcpyLIITo1GJ7/x/6rssayP9Rv6uWK/2egsV5qcfe8Pt pYRLpMgX/HZfFEmJJBggywUaeXWq9rag8m6RByj+bziWkdU5Ef2FYNuGFoyc1g63ubqr J7Uu9lejFDzyRuWG2OtMpWqHW/mlFElg06QJFM5jrM+NMBaPLDdpxbfMP383lFco75Bj euBpQ2rZI8NqIBNWFvcQVDbBRgDq4DXT2NtCx5S55Uf3uSzSPnzlxUBWD0y+wHid3XIz dCJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3FGWnMv3Ra19uyn9AeOMIZCjrthqxBwjXKI+/nqj324=; b=Mgbzh8fTHPNRiZN/OTyNRay9/3p8xgcqDoP/0RuCitRNzf7edP1h756Xk+EGZBu3v3 D3g6hGwMdotgZZwm6BHyckJVUQV3J6ntQiFk3iQsEq4lP4JJeFQL37NUYhC+obEaagMF 5fVGnGz4YUf5bO/OUOCJiJPWxUoZhYw0vFNtVY3KlTsMV8rtH3f8sZmaY/UcLP0Glnst Waj4bdOJBX6qfP5RzWVJfq74pJBaWzai8Gr00vz0vLalNf8GGPX4SLwoBzfLuiB43Fsg 1ClJEpjp5acZMH+kyCV+f5Y7nJ+uppy/lki+IbvxuCJaSWGxyI7uQf2lpwkntVwSlKB4 dxeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=Wh5GOcai; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si4927693edi.243.2020.08.07.01.54.44; Fri, 07 Aug 2020 01:55:07 -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; dkim=pass header.i=@android.com header.s=20161025 header.b=Wh5GOcai; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727820AbgHGIxQ (ORCPT + 99 others); Fri, 7 Aug 2020 04:53:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726940AbgHGIxO (ORCPT ); Fri, 7 Aug 2020 04:53:14 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F2FC061574 for ; Fri, 7 Aug 2020 01:53:14 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id w25so1349179ljo.12 for ; Fri, 07 Aug 2020 01:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3FGWnMv3Ra19uyn9AeOMIZCjrthqxBwjXKI+/nqj324=; b=Wh5GOcaifky54Z0qvkUeHFxg4l6hxxPVxyMNzLfFd+JZdNm5kBkLJzYa0vKm3Myz3p p4vxnOG/3h2NE9YQ9plmXzFRsHXZ7qxhVZCPViXuh3oIWgzk3NDoMju0C1bePkzmV3E8 9xeCfFbwFn+FiFOeltHwMD+7BeUiz7+76iCbsHcx6cbo62xiAvMi4tebmR4Gm32XqTG3 ZzlLefC7wjerYHpaziffpGq6cSxwvFPMu8HoPWuaT9xRoyiFTOdw7glN8ocYZ054vDlh 7yq0Cp6ypUXOvVXDDLq9HpGttUu5TGdyKIu/LVwh3hIAxXpryqzAKWguPGrMehIcZJv9 Nh3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3FGWnMv3Ra19uyn9AeOMIZCjrthqxBwjXKI+/nqj324=; b=GDfkVacQO3OVvt9m0OabllOoBSkqOnzH/B2WWGE9kiOATYAOnJpJIqRd+SEkk22bNM leIfaP7m8zoHPDw2fR507PIz5LoeOkcJVgHKACsWOoKWH5n631de2dNVOr4q5yu8BPqy jEc+vLm7DJlSbMaf0nn4SZA6h+R+oZZamVMEv9yyp/9yUiOBP2ZZEHiz5BYpKYnCdEBr vYzGdPG9bwQ7Ak/A9m8+0v9A8fephYEd3AqOyDOf5TZGR0GGVgc5oGaLFolO2YzsF9Y3 s1uMwGtXipJnnA/EMZjTOXfqMUt1qQC7O57iNXTXCfQDAGGhRpM6MDB4GxGd6PGeXAvi hh8A== X-Gm-Message-State: AOAM532LV0KBMZHve82WwYOFFJFa83JxFKH/lWVfznaZL290IUybx1k9 qbRsQV6e0xIWd+VfPX1xmE6cV7vyONj9ShNp+Amd5wuW X-Received: by 2002:a2e:9913:: with SMTP id v19mr5415222lji.292.1596790392713; Fri, 07 Aug 2020 01:53:12 -0700 (PDT) MIME-Version: 1.0 References: <20200806073221.GA219724@gardel-login> In-Reply-To: <20200806073221.GA219724@gardel-login> From: Martijn Coenen Date: Fri, 7 Aug 2020 10:53:01 +0200 Message-ID: Subject: Re: [PATCH] loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE To: Lennart Poettering Cc: linux-block , LKML , Jens Axboe , Christoph Hellwig , Yang Xu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lennart, Thanks again for the patch, I tested it and it looks good to me. I'll also add a test case to LTP for this. Two minor nits on the patch: On Thu, Aug 6, 2020 at 9:32 AM Lennart Poettering wrote: > Let's correct that and propagate the flag in LOOP_SETSTATUS too. Think you meant LOOP_CONFIGURE. Also, could you add a "Fixes" tag, like: Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl") > > Signed-off-by: Lennart Poettering > --- > drivers/block/loop.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index d18160146226..2f137d6ce169 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1171,6 +1171,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, > if (part_shift) > lo->lo_flags |= LO_FLAGS_PARTSCAN; > partscan = lo->lo_flags & LO_FLAGS_PARTSCAN; > + if (partscan) > + lo->lo_disk->flags &= ~GENHD_FL_NO_PART_SCAN; > > /* Grab the block_device to prevent its destruction after we > * put /dev/loopXX inode. Later in __loop_clr_fd() we bdput(bdev). > -- > 2.26.2