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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A2135C433E7 for ; Mon, 31 Aug 2020 09:39:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 814E62068F for ; Mon, 31 Aug 2020 09:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598866772; bh=BFAEjVXWQNDEVFe9JLUFx50vhdunBDtT1ykoqjBUtRs=; h=Subject:To:Cc:From:Date:List-ID:From; b=Bo1MLm6Xf9weiXAmIW39NTN4ucj881aqye6XJJ+m+zFB0qxXfMhjwYD7kNuXuedcu LnUf7x3bagSJICdhoU+sQ6q2HW6rRlqYhjSbt7NaXgMcrHVH/zthmrg+ocfPUqnv/N Yzq3+YiBUZHFIOb7k+vmJ5oUBvi9v5Aqt4nZJL/A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725915AbgHaJjc (ORCPT ); Mon, 31 Aug 2020 05:39:32 -0400 Received: from wforward1-smtp.messagingengine.com ([64.147.123.30]:43865 "EHLO wforward1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbgHaJjb (ORCPT ); Mon, 31 Aug 2020 05:39:31 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 1C0FC858; Mon, 31 Aug 2020 05:39:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 31 Aug 2020 05:39:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=oruvtm 7J8U5EV9e2ZgxP64sO8TWU+n8b7MQyXyfsA4s=; b=AX+wXshHXoqYOGm7oGK0cw nPv0E+iGKIzvS5vIMIIOwakwsGRHgNoMYRSWqAecZOZcchiXM+WazebjT3B/hymL 1R6yLSpPm1OeIfzhpJsF0b/YkQfOiUtXcKyNMl74CPmpNb/mpGogTR0jizPHoTRy Vz73YokBBKwjDA299LPcIMZuuNE2ZH7d+AQX0Y7e6CnNMCT0PvB24t+kLpyD/SvT MJkg3woC0Z4PVRho4tTKhScbmLqaS9Yy5Zq7Cg3t6zZNblUqoraBgSLvPtFpunD/ yRR3pH+WujdlaZmUdZ07yPtZgrcD1l4Sy/DTCMDChSxuS6mwE9BEtj5yfRAlqH+Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudefhedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepieetveehuedvhfdtgfdvieeiheehfeelveevheejud etveeuveeludejjefgteehnecukfhppeekfedrkeeirdejgedrieegnecuvehluhhsthgv rhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrd gtohhm X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 5F36130600A6; Mon, 31 Aug 2020 05:39:29 -0400 (EDT) Subject: FAILED: patch "[PATCH] btrfs: reset compression level for lzo on remount" failed to apply to 4.9-stable tree To: mpdesouza@suse.com, dsterba@suse.com Cc: From: Date: Mon, 31 Aug 2020 11:39:37 +0200 Message-ID: <15988667771656@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 282dd7d7718444679b046b769d872b188818ca35 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Mon, 3 Aug 2020 16:55:01 -0300 Subject: [PATCH] btrfs: reset compression level for lzo on remount Currently a user can set mount "-o compress" which will set the compression algorithm to zlib, and use the default compress level for zlib (3): relatime,compress=zlib:3,space_cache If the user remounts the fs using "-o compress=lzo", then the old compress_level is used: relatime,compress=lzo:3,space_cache But lzo does not expose any tunable compression level. The same happens if we set any compress argument with different level, also with zstd. Fix this by resetting the compress_level when compress=lzo is specified. With the fix applied, lzo is shown without compress level: relatime,compress=lzo,space_cache CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index e529ddb35b87..25967ecaaf0a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -625,6 +625,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, } else if (strncmp(args[0].from, "lzo", 3) == 0) { compress_type = "lzo"; info->compress_type = BTRFS_COMPRESS_LZO; + info->compress_level = 0; btrfs_set_opt(info->mount_opt, COMPRESS); btrfs_clear_opt(info->mount_opt, NODATACOW); btrfs_clear_opt(info->mount_opt, NODATASUM);