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 <borisb@xxxxxx> > > > <snip> > > > +/* 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/