Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp683135ybi; Fri, 7 Jun 2019 15:10:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwN6tjzOaHNY4xp3rKdbP/A6u9iOlmWvXoOAR8iFz00AhaiVmoEXYNSZym6SQ11jFZDXftW X-Received: by 2002:a17:902:9897:: with SMTP id s23mr54456283plp.139.1559945454194; Fri, 07 Jun 2019 15:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559945454; cv=none; d=google.com; s=arc-20160816; b=QKObnGOf//ngfcpEgA5yv6JgKXbNGlBmZgF7uo6Jm9JtZpIeeRUl502O1G65Jmcg1r f9La0ojcLWJ4ozXn8X1m8468xZzMpQc359HCexEnSSfVIDC78fPC4QLcuIWUUucWIF01 p4hOIMITFrdzLbDnNxkE0Rgk8gRI5xuqPSwAscDg7ADFRAP1AL3SBcj4AGVEJay27g/n 2wbCOAvLm/nW7i8p8UYZJFo6XyZ4GjeyrZMlNRh+9/3AjcMsNGiwL73dionJ+9a0JPeu Y7d1HrE5EB+AE33pNnTzTvTNoeEFd4Ic9KMZJjEldIJ33uHuRRaW6jW/hJnGMsZMZ0/w 9rDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=cbe7InaIlxRKMvUKl4Cm+0ukYIoQJbyxAnx43cjNBlE=; b=KRfflLqkvUtRojDIBRpFFY2r3EFsezAtgUtZLdHrsaccDcdVOW/hWu9docueWbp5SB GP0v4OQsAM3wBw1kQ7wkWm0/MeHejJaSsqfmEU9ITaXoy+v7tiN66v6x+0I+WquhQYPp I0U+vNOdB2DKb5zsIPnPTUiQRfyCO8rboSR0WEO7jw9adXTCa5ibjdnf6ltHGXpNJDXK hxLgo4E/1WeRgl92msdbWnE+/Dw6azdvYCFeyF0tBbkFcUCDKvYeTYOJS2gg7M+G8Qbb 7uQweRuTiJFj/AJdBsuctwOyvxHQToScp0Ku6vz69gDwf3Fa075+fEXePwrMYtvppLRt 99Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e64si3296190pfe.178.2019.06.07.15.10.38; Fri, 07 Jun 2019 15:10:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730099AbfFGUJ1 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 7 Jun 2019 16:09:27 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:46050 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728724AbfFGUJ1 (ORCPT ); Fri, 7 Jun 2019 16:09:27 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 12E096074CC1; Fri, 7 Jun 2019 22:09:25 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id kNthjU-GYg1E; Fri, 7 Jun 2019 22:09:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id B8741608310F; Fri, 7 Jun 2019 22:09:24 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qx-a-PPfJeha; Fri, 7 Jun 2019 22:09:24 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 8D0BC608F45A; Fri, 7 Jun 2019 22:09:24 +0200 (CEST) Date: Fri, 7 Jun 2019 22:09:24 +0200 (CEST) From: Richard Weinberger To: Emil Lenngren Cc: linux-mtd , Sebastian Andrzej Siewior , linux-kernel , Michele Dionisio Message-ID: <1644731533.84685.1559938164477.JavaMail.zimbra@nod.at> In-Reply-To: References: <20190515210202.21169-1-richard@nod.at> Subject: Re: [PATCH] ubifs: Add support for zstd compression. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.8_GA_3025 (ZimbraWebClient - FF60 (Linux)/8.8.8_GA_1703) Thread-Topic: ubifs: Add support for zstd compression. Thread-Index: rnvHZUv9ubNCdBXV/imbNn3Xo5b/uw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Emil, ----- Ursprüngliche Mail ----- > In fs/ubifs/sb.c we have > > static int get_default_compressor(struct ubifs_info *c) > { > if (ubifs_compr_present(c, UBIFS_COMPR_LZO)) > return UBIFS_COMPR_LZO; > > if (ubifs_compr_present(c, UBIFS_COMPR_ZLIB)) > return UBIFS_COMPR_ZLIB; > > return UBIFS_COMPR_NONE; > } > > Maybe add an entry for zstd here as well? Where would you add it? If we add it after UBIFS_COMPR_ZLIB, it will effectively never get selected, unless someone builds a kernel without lzo and zlib but zstd. If we add it before UBIFS_COMPR_ZLIB, it will be used always and users end up with unreadable files if they reboot to an older kernel. Please note that we didn't raise the UBIFS format version for zstd. So I'm not sure what is the best choice for the default filesystem. Thanks, //richard