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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72EB1C433EF for ; Thu, 21 Oct 2021 16:53:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 549D8613A0 for ; Thu, 21 Oct 2021 16:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232059AbhJUQzP (ORCPT ); Thu, 21 Oct 2021 12:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhJUQzP (ORCPT ); Thu, 21 Oct 2021 12:55:15 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC644C0613B9 for ; Thu, 21 Oct 2021 09:52:58 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id c29so1194917pfp.2 for ; Thu, 21 Oct 2021 09:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=IcgK3jqVdAfaeLFQJYqlQnHUd7xPkY+EUw9K+n+kqs8=; b=NxX5zcQUO+fne7dKWR46fV4PfZld2HLI49rRywG0foVkSd+cBb+s1hZ40e+nH5onfn kBsEQ3w9oie1KHcQr7FmveD1vCIgEOMIhNzr4IPD+8IFTd7FvWajZC3kIb+OG6OZl7FM V9i2a0bXHzZCPJnk5cFtALFaewEnD0eEm7l3E3fjrX4rZD8Azo7znuj6s+XI6TRo0LEq JhI7rhLSJqOcHFz+QoCPrIW8GTUypGTBPb7DV/uIsFP2z41xHu5DDxIKY1e2FOCWB6Jn 9T+VkHm+RKcUZ9P/bDxXDqUgIrGyUCR8dCoWxYYhywAbHUkEBDurwoUVbXsSOf4hPbBs x8BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=IcgK3jqVdAfaeLFQJYqlQnHUd7xPkY+EUw9K+n+kqs8=; b=JdMzsVR6vFRdv+VOUg7hVzYk5441JXHliLXSmO1rYuvu9LRXfQypekEnijthxXfXFD +icgvz8oZuBWC11N8CHKvmfSGJG6sXf97D0sepmsnwRnc4iwSjGzDORhQ0dcsPvi+TcV +6/dVtdGok4iFCBWy3AghMBFlFlt6/IlOyzg0pGJ4v/fmRnZqpnNddWtkgZOZOq8johH +U2I7uxDsmpjVJor8owwNpFbV+r0M932b4ThY9RM41nkdHrCFY8Acv3pMPs1PMGwSXOM NsCwQCqbjQlz6zsUYlNSuZZ909y3bXkATrY7dd0nfbVtI3d+tZ4/EdG/9MuziKJlLL/Z ZMDA== X-Gm-Message-State: AOAM530nAsUbAE9hoO57GQz44eSX6hPW1jm3AXDJgA8Rbdbm1O9jw8mG /wBTsEZmnpUxoUiZyFWGFKoGPA== X-Google-Smtp-Source: ABdhPJwnRX/13QCgPfeN04lkAFNZK/zCphybLsqgGISYluyjPOdd7zMQGUBgzQJecMMoMzKX5MKdkg== X-Received: by 2002:a63:b203:: with SMTP id x3mr5321714pge.239.1634835178331; Thu, 21 Oct 2021 09:52:58 -0700 (PDT) Received: from relinquished.localdomain ([2601:602:8b80:8e0::381]) by smtp.gmail.com with ESMTPSA id rm6sm6602236pjb.18.2021.10.21.09.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 09:52:57 -0700 (PDT) Date: Thu, 21 Oct 2021 09:52:56 -0700 From: Omar Sandoval To: Nikolay Borisov Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v11 05/10] btrfs-progs: receive: process encoded_write commands Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Thu, Oct 21, 2021 at 04:33:00PM +0300, Nikolay Borisov wrote: > > > On 1.09.21 г. 20:01, Omar Sandoval wrote: > > From: Boris Burkov > > > > > > +/* Data is not compressed. */ > > +#define BTRFS_ENCODED_IO_COMPRESSION_NONE 0 > > +/* Data is compressed as a single zlib stream. */ > > +#define BTRFS_ENCODED_IO_COMPRESSION_ZLIB 1 > > +/* > > + * Data is compressed as a single zstd frame with the windowLog compression > > + * parameter set to no more than 17. > > + */ > > +#define BTRFS_ENCODED_IO_COMPRESSION_ZSTD 2 > > +/* > > + * Data is compressed page by page (using the page size indicated by the name of > > + * the constant) with LZO1X and wrapped in the format documented in > > + * fs/btrfs/lzo.c. For writes, the compression page size must match the > > + * filesystem page size. > > + */ > > +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_4K 3 > > +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_8K 4 > > +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_16K 5 > > +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_32K 6 > > +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_64K 7 > > +#define BTRFS_ENCODED_IO_COMPRESSION_TYPES 8 > > nit: Make those an enum ? Same applies for the kernel counterpart patch. I responded to this before: https://lore.kernel.org/linux-btrfs/YR%2Fq69Tiz6PFqFJN@relinquished.localdomain/