Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1671216ybg; Thu, 4 Jun 2020 16:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQxFmssqnyaN7VZoPSkhAJHy48yb5MIhrDyYRtqL6CEhINEZ0ayl6+DRKUFzUBGc+B6trk X-Received: by 2002:a17:906:670d:: with SMTP id a13mr6119193ejp.290.1591312432245; Thu, 04 Jun 2020 16:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591312432; cv=none; d=google.com; s=arc-20160816; b=yruCVUH9xqvI4RVsF+i7wqiyeYPZ41LmLrwJTYjpwsTck3Vvpv+SKJVhhAe/xik+Zz BOzE6w0LAzBjgiMHrSMoqhXbNFHC//ekuqttdZXW6+eJTA4jNKKdnZPpLv9nq7dcXb/h BPE7FHtOOf/vQO44AGKv8JarlawoBMK2a+EZGPbp1LdvJWJmvLI6c8G2Jj/AP16vlUnj rM6A456o3jpCdPztM1rCuaye/gT68h+uvFio5z7iH5Na28SYG1iyt26dZOF2JHaoWmHv PO+VK9MZJgsqrwy23db+3Q2/hCmEE2L7CckFl7TC0gRSOA+j9hpD6eLy+ydrbwXGzay0 Hfbg== 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=22Wtqy8gIHx/OWMtNzE9YiY36SfGsi23Baca0TrE4fM=; b=j7SqgDUMS3refI8SbaPAyozxZipT1hkLzipBSPKdy11uv/mwcxgd8j4PK7bx/VXeiN jYOWo+Jd26m4+Z351+6sXOCh2OlKCH0arnkv1AEyVXwJmlxEFDeczCTHFOj5d69/GPNs 9U8MuA5hwdOWtR9dFX+wLDcDV8LD8tX9S0H+ZY6ltNyYzjlMj52tyXkmnNd+m364nOG4 f28qHdgqtLWl/fjdcObDH98SH5JpcyB+xO9KqtzL7MIIHs4w70BoWrbAC4Of1QJeXelm M25XhQoY+AWry0bJrtjLdr/pOFKCEf9rmotns/wgqyT6PTu3bN78bLxkISt3gMtlutv5 xAcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jkIWzy5d; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si2388398ejy.5.2020.06.04.16.13.29; Thu, 04 Jun 2020 16:13:52 -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=@linaro.org header.s=google header.b=jkIWzy5d; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726197AbgFDVyC (ORCPT + 99 others); Thu, 4 Jun 2020 17:54:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgFDVyB (ORCPT ); Thu, 4 Jun 2020 17:54:01 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A566BC08C5C1 for ; Thu, 4 Jun 2020 14:54:01 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id y11so7573803ljm.9 for ; Thu, 04 Jun 2020 14:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=22Wtqy8gIHx/OWMtNzE9YiY36SfGsi23Baca0TrE4fM=; b=jkIWzy5dTcu3OCzuFGGAKdTxSEkZa/GbVmnv3CtVS4Vw7b+eo8ckPTZ/AZqP4GF5of m9AeZS80XkNU81VVJ7X5P2un/xTMK6zv24F5RXgLsxGfZNlYysZf3CSI5Ao7+rtvCDWH dcfKZd7ibPHok//s5g08AkmFZ8k8g3DS7EwnkdVFrVMFw4O3WYScpmJU/pRzhdLHSAIt DReEoT4dUFqWEs5YIb/9yJnprGn5o5rDiahW4KLYsjdwVWX0OccYZO4ZYu5s80taR3eY BX1ZUV/zt1Og5vNdZSy0lOL9PADD4vtEp3oGGQ9f/sOf67vhA3UvC4Qtu4ejkMLXvUed /vWA== 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=22Wtqy8gIHx/OWMtNzE9YiY36SfGsi23Baca0TrE4fM=; b=WX3JS65t6f8EwhOdoeSZ7nM6i8RzZW10TTaOz7mK8EMuiDJ3KiYGDbNM7rFukN5/AL V68bjsFbue678VjfsKt+zYeQMfp5036D8JUK5fvQl3Ab6dNAHZDpIV4JwDS3pSimkMC4 STihL1VwooHlZ2NbmG7F97YOYKV4oYaB/5JKo2f6i+rYChp4e92EyCLLIM/sZCLGk7o7 GqO537IIvIMlJXYCSFiqndvQN4ix4tapUR+Z+b9yFclitKSOv4sK786ZFcLloQKYfHhf SrqVUfLmCpyuOK4vSCVefd7TMlA/Pbuz7l3nSofnAemGHBIJBDWjqa7n16RaUw+R29CK q89A== X-Gm-Message-State: AOAM533hIFHJQJusii1g897rS8tDaW0QPQBMubfVveUfMq655ThATcRe /x3usczeYUlMwV3dYog8JBU/8mXTQ/egmesLx++rgw== X-Received: by 2002:a2e:984b:: with SMTP id e11mr2897161ljj.358.1591307639810; Thu, 04 Jun 2020 14:53:59 -0700 (PDT) MIME-Version: 1.0 References: <20200604202520.66459-1-maco@android.com> In-Reply-To: <20200604202520.66459-1-maco@android.com> From: Naresh Kamboju Date: Fri, 5 Jun 2020 03:23:48 +0530 Message-ID: Subject: Re: [PATCH] loop: Fix wrong masking of status flags To: Martijn Coenen Cc: Jens Axboe , Christoph Hellwig , linux-block , open list 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 On Fri, 5 Jun 2020 at 01:55, Martijn Coenen wrote: > > In faf1d25440d6, loop_set_status() now assigns lo_status directly from > the passed in lo_flags, but then fixes it up by masking out flags that > can't be set by LOOP_SET_STATUS; unfortunately the mask was negated. > > Re-ran all ltp ioctl_loop tests, and they all passed. > > Pass run of the previously failing one: > > tst_test.c:1247: INFO: Timeout per run is 0h 05m 00s > tst_device.c:88: INFO: Found free device 0 '/dev/loop0' > ioctl_loop01.c:49: PASS: /sys/block/loop0/loop/partscan = 0 > ioctl_loop01.c:50: PASS: /sys/block/loop0/loop/autoclear = 0 > ioctl_loop01.c:51: PASS: /sys/block/loop0/loop/backing_file = > '/tmp/ZRJ6H4/test.img' > ioctl_loop01.c:65: PASS: get expected lo_flag 12 > ioctl_loop01.c:67: PASS: /sys/block/loop0/loop/partscan = 1 > ioctl_loop01.c:68: PASS: /sys/block/loop0/loop/autoclear = 1 > ioctl_loop01.c:77: PASS: access /dev/loop0p1 succeeds > ioctl_loop01.c:83: PASS: access /sys/block/loop0/loop0p1 succeeds > > Summary: > passed 8 > failed 0 > skipped 0 > warnings 0 > > Fixes: faf1d25440d6 ("loop: Clean up LOOP_SET_STATUS lo_flags handling") > Signed-off-by: Martijn Coenen Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Thanks for the quick fix patch. I have tested with the patch applied on x86 and arm64 and confirm it fixes the reported problem [1]. Test log link, https://lkft.validation.linaro.org/scheduler/job/1471435#L1299 https://lkft.validation.linaro.org/scheduler/job/1471574#L714 ref: https://lore.kernel.org/linux-block/CAB0TPYEx4Z8do3qL1KVpnGGnorTLGqKtrwi1uQgxQ6Xw3JqiYw@mail.gmail.com/T/#t - Naresh