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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 C09AFC4360C for ; Thu, 26 Sep 2019 17:46:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9993021D56 for ; Thu, 26 Sep 2019 17:46:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=osandov-com.20150623.gappssmtp.com header.i=@osandov-com.20150623.gappssmtp.com header.b="hEt+uhNn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727755AbfIZRqQ (ORCPT ); Thu, 26 Sep 2019 13:46:16 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36282 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727707AbfIZRqP (ORCPT ); Thu, 26 Sep 2019 13:46:15 -0400 Received: by mail-pg1-f195.google.com with SMTP id t14so1960812pgs.3 for ; Thu, 26 Sep 2019 10:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=flT9fBZ3P9UgjuIhDnrmFe1JBs07Z3/pZQTsLWyd9cQ=; b=hEt+uhNndXeewILcwlsE0TLOnrSKZMugFJU1eiZSqB+9MpBdP1TNUXRaQk4MKDMVZe l+iETQcCMKckv0by/kdrKrx5vgnqqAZ1eY2VCLlixwoZVvUIevQPtFgpPcp5qEmvG9OS zr+j9hKna+ZSWp20G79kebYIopAXtWbAlN3lMtavfj1eybsIK1XWtGc03ZQVYq+IDa28 oPZAIzblukGGNl7tqEemMXQE1FkI8q8Lq16TRLnolZXgKovKmHQ7pBZ0LidOlaMomb8A UqgkOIbb/y/meCLWSxqb6JZPpJNWCfx9mCbOGGOlqZr5XT+7vjocl5+tG5ronTksUcpp GwDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=flT9fBZ3P9UgjuIhDnrmFe1JBs07Z3/pZQTsLWyd9cQ=; b=c6HhUatVL/9lIJu9x1Xo6jVYpvOknedDFThBqMLaRs0dk4iHPyJm6TNUfbGncJWF7z l9mN90fzmQy1t1gOgbwqCOo/E2wICANY5bfDmwk5+0kPAqahg3QJYWFZ9mWB4J4TgAhj 6vTIRHGSq8XLLsjqMqUWinw0zdqPHp/Ik6uUOKTx6GP0W+NN6QEA9ZurA+fZmv25iBR3 gAMArq8zWmQBu6AJAewH+BkEqoRkp5NPEnJNRAB7CsZl5AMt+i57JwsXjUp+iEruekyC it8l4mF/q8cJlUJZYmALhh3KL5MZLtt+g8xPR0EQEnVd8sNk3BENhWYaDzuGqOe9d7So oE8g== X-Gm-Message-State: APjAAAW5z9V5qHcwMdKPxX9GbAFc1+cbHgXpRNv7Sl9qSRkzN/oaCX0U gpXgakSN7Cn0o693iYbJgjJ+gQ== X-Google-Smtp-Source: APXvYqwikFaK5XBjZGwGMstfgfcvJbjtYSKlxkonOjE0aRskm6PvRu3wUykQUKZN0mIO/lfXIu2qNA== X-Received: by 2002:a17:90a:3748:: with SMTP id u66mr4906667pjb.4.1569519973085; Thu, 26 Sep 2019 10:46:13 -0700 (PDT) Received: from vader ([2620:10d:c090:200::e132]) by smtp.gmail.com with ESMTPSA id w189sm3852504pfw.101.2019.09.26.10.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 10:46:12 -0700 (PDT) Date: Thu, 26 Sep 2019 10:46:09 -0700 From: Omar Sandoval To: Colin Walters Cc: Chris Mason , Dave Chinner , Jann Horn , Aleksa Sarai , Jens Axboe , linux-fsdevel , "linux-btrfs@vger.kernel.org" , Linux API , Kernel Team , Andy Lutomirski Subject: Re: [RFC PATCH 2/3] add RWF_ENCODED for writing compressed data Message-ID: <20190926174609.GA18238@vader> References: <230a76e65372a8fb3ec62ce167d9322e5e342810.1568875700.git.osandov@fb.com> <20190924171513.GA39872@vader> <20190924193513.GA45540@vader> <20190925071129.GB804@dread.disaster.area> <60c48ac5-b215-44e1-a628-6145d84a4ce3@www.fastmail.com> <4e6e03c1-b2f4-4841-99af-cbb75f33c14d@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e6e03c1-b2f4-4841-99af-cbb75f33c14d@www.fastmail.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Sep 26, 2019 at 08:17:12AM -0400, Colin Walters wrote: > > > On Wed, Sep 25, 2019, at 10:56 AM, Chris Mason wrote: > > > The data is verified while being decompressed, but that's a fairly large > > fuzzing surface (all of zstd, zlib, and lzo). A lot of people will > > correctly argue that we already have that fuzzing surface today, but I'd > > rather not make a really easy way to stuff arbitrary bytes through the > > kernel decompression code until all the projects involved sign off. > > Right. So maybe have this start of as a BTRFS ioctl and require > privileges? I assume that's sufficient for what Omar wants. That was the first version of this series, but Dave requested that I make it generic [1]. > (Are there actually any other popular Linux filesystems that do transparent compression anyways?) A scan over the kernel tree shows that a few other filesystems do compression: - jffs2 - pstore (if you can call that a filesystem) - ubifs - cramfs (read-only) - erofs (read-only) - squashfs (read-only) None of the "mainstream" general-purpose filesystems have support, but that was also the case for reflink/dedupe before XFS added support. 1: https://lore.kernel.org/linux-fsdevel/20190905021012.GL7777@dread.disaster.area/