Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4129952iob; Tue, 17 May 2022 14:53:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOm5JsTG4rIiyZ3n3btEzUXIa6PS6joR/xBTmKffC6sT3GecuKeWe0ITezwaJt7+Tv0RDu X-Received: by 2002:a17:902:e5cc:b0:15e:b8b2:25be with SMTP id u12-20020a170902e5cc00b0015eb8b225bemr24586238plf.27.1652824422100; Tue, 17 May 2022 14:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652824422; cv=none; d=google.com; s=arc-20160816; b=u1rMLgenB8qwCa1DiERStDMk+tyYl9own04bkx8Y/v1mxt5Bt5f3FVPrMr13OfX4Co Xq+iHi4RAeS+W1fEnCCEAoSWhDHL7yHUyD9itd9A2pCYqhUSBfNWGGAtZuhe/6FsBbh3 yxPxQHo6FakualXcKu5f8Gc/SdGSFdSuA/FuabYUrYBdqpN7S03ogBVA1MCcdPVCN9nz tOjWz78DJedgmKUZVVhbQLHBBgEEp0D/8hFAdHT8E5KTb5yj8CZxePwDeJVa50gfnmDp s4XeuPD5fJ/x6XtwfGrBdn0CLuRHa3S5L0jlgf75G3MKs7zkmcY7GmOkIyMHDqerrr0f 5Vzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fnfaxAucxs/q+SyolBFPSK2oqrTT+AfgwYSQpHGcpGE=; b=sESFbhp2Zdf26m/OoA8dEVQ+WKJDmYIz6zL6Gfb1zRGIDXyjvTp3JX2KMywOr0mkUJ NONpoPFcRz6tfX9nxEKHTHfI+aQkfRmw2FPlX0LT9HiB1iuhKvnGrYMZFClkVb3ua2SU 5Orb6eOPBIbw0s/2YDfgKS/iPmbrPEdlPUXJidGmDfNCHGLdpc60ZoCiR+A7QLowhlvz s4gndKvs1mpDqkfC5sTHHCBkb19PofV6jmUmzWqsl8UZPzg0ymyTUH3QpFKOS2slpIr8 +yXtJyXlq0RjjTgbKZc31KkUq/fz+Sc8wkaJY37G89moYS9Z/tWznajqGBIOBgmWMU4l LXAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hYkM+p1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020a056a00079500b004fa3a8e004csi553246pfu.259.2022.05.17.14.53.29; Tue, 17 May 2022 14:53:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hYkM+p1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbiEQG1Y (ORCPT + 99 others); Tue, 17 May 2022 02:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbiEQG1W (ORCPT ); Tue, 17 May 2022 02:27:22 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA8B9443D3 for ; Mon, 16 May 2022 23:27:21 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id k2so13700332qtp.1 for ; Mon, 16 May 2022 23:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fnfaxAucxs/q+SyolBFPSK2oqrTT+AfgwYSQpHGcpGE=; b=hYkM+p1K6E73DRLa5DKm8rn+zHABAeRQPnMUdftYwP21kD91vIjIJ9X+cCIS0Vf8vd g23ZDZkRXdI5xPm5/mqSneeBVCoa9jvhJhqnWf//YNfPlWInGrSTTe2FT4fLXomTNpM2 743fvv9jV75Z+swEMyWYpG+byBTXSIOSjG1Y3qojqAfJcC6gwGXF3Gm9ghnq1iN7/UYS S0d7Nf0Tg79RdpQE9q91MnFyuEUCeyLfN5ARsPymm2GPhwews3lSIZgg6Wc/bORe2xGq L7lsJNidmPALZit8lQd87SZZoIF79m0q+5fhThiDaOHFEufHy2rsNjhaaUKS0i3Loiq/ 0WFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fnfaxAucxs/q+SyolBFPSK2oqrTT+AfgwYSQpHGcpGE=; b=OuBugmp5MUiUFzuirlHLWs17smZadDjdLKus5HC3sAdJxDU2QGFrbW1BjaV2VRMA3Q 3usEpuWmh2xb8iJcGNsP7qDymBS0ZbUapneq2CRp41naFzAz0L3Y+Frp1jev/aI5TmTm ckC61enC5MhOtWxWexz9KiUwqzZmtJHD+i6+KC/HkcTvTg6Nea/7qpA4Ct3cEYMm3M9Y s9bGK1RI0GRMzC3otzc4twIV2yZsxqsdZOpelxFkjGWf3t2JAMYFTyQgPvli68H/ho9D A6pKWMbXF2cqcsH3DqDbDVYAas3+zxsmVefdZWvF8LqMJuvenTaMbiJK5YA6AQ0zydlv 3XRQ== X-Gm-Message-State: AOAM531UnVUO+DQeCp/Vf/rf62ks2THt4HCPW2A2vlrtuDSnmODucVLC aGCxocuk0uYTFR6HZrdJF6/vMKzqvtK6DbpLdt82sg== X-Received: by 2002:ac8:584d:0:b0:2f3:ec5e:3708 with SMTP id h13-20020ac8584d000000b002f3ec5e3708mr18704435qth.306.1652768840670; Mon, 16 May 2022 23:27:20 -0700 (PDT) MIME-Version: 1.0 References: <20220513174030.1307720-1-khazhy@google.com> <20220517061238.GB4789@lst.de> In-Reply-To: <20220517061238.GB4789@lst.de> From: Khazhy Kumykov Date: Mon, 16 May 2022 23:27:09 -0700 Message-ID: Subject: Re: [RESEND][RFC PATCH] blkcg: rewind seq_file if no stats To: Christoph Hellwig Cc: Tejun Heo , Jens Axboe , Alexander Viro , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000ab12ee05df2f3b4f" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000ab12ee05df2f3b4f Content-Type: text/plain; charset="UTF-8" On Mon, May 16, 2022 at 11:12 PM Christoph Hellwig wrote: > > On Fri, May 13, 2022 at 10:40:30AM -0700, Khazhismel Kumykov wrote: > > Restores the previous behavior of only displaying devices for which we > > have statistics (and removes the current, broken, behavior of printing > > devname with no newline if no statistics) > > > > In lieu of get_seq_buf + seq_commit, provide a way to "undo" writes if > > we use seq_printf > > I have to say I much prefer the simpler fix from Wolfgang. But Wolfgang's fix still results in a change in behavior, and in my opinion a worse behavior - we don't need to print out the device names if there are no stats. > if we want to go down this route it needs to split into a patch > for the seq_file infrastruture and a separate one for the blk-cgroup > code. Of course - I can spin this into a series if we think it's worthwhile --000000000000ab12ee05df2f3b4f Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPmwYJKoZIhvcNAQcCoIIPjDCCD4gCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz1MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4 AJXB1Q3nGNl2tNjVpcSn0uJ7aFPbAgMBAAGjggGKMIIBhjAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0l BBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMBIGA1U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