Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp247338lqe; Fri, 5 Apr 2024 22:22:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLNQnuj64Exgx+QqeGncApoPA0bMLQQ52IPpvTd++v5YsENebUSwHxYLIg+b47EjHsmST3DqFL7KgSDFYidfR80l4aX57AOyGHyhpw6w== X-Google-Smtp-Source: AGHT+IFb8bsug0v3VTqQE5zbYGIMwkPLlkIcFcbe4tWlemgMuAEmWfIGpflgAVy81IZNeTg7kWMk X-Received: by 2002:a05:6a20:3d90:b0:1a3:bd97:4cab with SMTP id s16-20020a056a203d9000b001a3bd974cabmr5958064pzi.6.1712380932517; Fri, 05 Apr 2024 22:22:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712380932; cv=pass; d=google.com; s=arc-20160816; b=Jn/pl3GOX3rhLJz3ffJZTgwgufYcJumygyVOkXdR8tfpws93rF+NPGlwsiLzVv4QsD te1kpTqSyfPS82ya3+PWclfz0oYLL7Op8dFb5CepyQbrgAVgBDaf40YT/W3oog9E8eJn RY9ijkjZerY9sN99Nj9ChE/PlhmdZs8h08UOdPWjyzeQc0VxImFSNFh49Jo5/1ZfHa5E AmLqovjHvrl4w4GD+XwLN0RvwUmDYG0PPe3Hx0mXyjT301/YPUl5lAQAKglQjGofaX7p UFneM1qGHMqVworYjJMJMoHAvmHW4/mQZO++DNcA2VEBkg1WWGIc4M8pYVmQ6mEwJD56 4rhg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=bhfWeUnybAsPC5w2wnk+v+3mDew6UZBufRKxuTERnpI=; fh=nhX+lvssxaJteAPunm8PNGRgGQGpxEuU3JRJiAiRkZc=; b=Y6pqbme5AOuhbLd7QD2r+YFC/xPqHyponIvdu8fMOabj0TB4tG6hwCYsJbFY3gGzD7 w2LbxmCmi7xCIkTSS47VGfPhX/hAnLKlGjeKI4xzI9CfPZiJpzarf20dEaPCPoJ3dMND UUyOPRRwEYk3LB2QURSIypKIHShP4V4F7Zd1cQdlqGqASn7OftLQ85YsNmXJKDVwOEhk tcRsLcz6quzBuwnr+flrlimG39fIeRxTFl55f9r55NNDimsxT2f/gs+9PM2sjFxzF+b2 aAc0LVfrPvqxZ9tA6C/u6fOuiC38HeRwg8oumF5ZuFYnDGBlwq4IO7zLk7MIZ9pKPEgi hdgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lLPAYrt5; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-133808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p9-20020a63e649000000b005dc430e6e30si2576596pgj.788.2024.04.05.22.22.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 22:22:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lLPAYrt5; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-133808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 20A70B217C5 for ; Sat, 6 Apr 2024 05:21:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9164200D1; Sat, 6 Apr 2024 05:20:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lLPAYrt5" Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61C1F1CAAC; Sat, 6 Apr 2024 05:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712380856; cv=none; b=i75F6AeYSMGwts9u2XWiazuqqhnRhnk/3SQSdhMEkW2Dj5oBQxuFkhZafJXvxC0jb7va24vR/dLNPu/q3CJ2NbIcbNGm8jOyRADw0ud6ilN/UymbABzAIP0Xhv4Sw/EH0MjCUs6os6ScZjPrDoj7dKW+LhW+S2VASH6Gs5O9Tcc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712380856; c=relaxed/simple; bh=PIoOgNzqkPt6pFqlUzqJVdnsJcxBBJL9KPIQo8L9CWE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=heQrbeE7Ijt2hhEKpgYF1KUAJAC/C1cQvwoDgIjGMDp+NWg2F1nS2JQkEX7wo7wEUbv7wYr/NFI0DQ4lNwAacRM1EtNrIYAymaDK4LUq/NUzEXVPeTJeQSGYjM0tMZRgc4rMFus9kfhc/Qop1sB2OTTFDM+xzKdoscCc9D7grVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lLPAYrt5; arc=none smtp.client-ip=91.218.175.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Sat, 6 Apr 2024 01:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1712380852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bhfWeUnybAsPC5w2wnk+v+3mDew6UZBufRKxuTERnpI=; b=lLPAYrt5fteZomt541z2r9imi7ugwkVNiZC5pZZu3KjNFo/chRlOU1XA+bzccxMdMbIll9 iA+zhVqapFEEo0NHoRaICnZZ4CQhn70DUUTzecq//OFELR8OzaQySC7v12I2ZtwQTy4tva HKowOJToS6St8IaHHb2Zg43DVWkqMkE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Andreas Dilger Cc: Sweet Tea Dorminy , Jonathan Corbet , Brian Foster , Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , Alexander Viro , Christian Brauner , Jan Kara , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-doc@vger.kernel.org, Linux Kernel Mailing List , linux-bcachefs@vger.kernel.org, linux-btrfs , linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel , kernel-team@meta.com Subject: Re: [PATCH v3 13/13] bcachefs: fiemap: emit new COMPRESSED state Message-ID: <2iyoi665o6hogzzlfhs6ets6vq2joh4xi5t3fbcpdmlv2cyrxu@7umadxpnaql7> References: <943938ff75580b210eebf6c885659dd95f029486.1712126039.git.sweettea-kernel@dorminy.me> <7CF0A3D0-50E7-448F-A992-90B9168D557F@dilger.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7CF0A3D0-50E7-448F-A992-90B9168D557F@dilger.ca> X-Migadu-Flow: FLOW_OUT On Fri, Apr 05, 2024 at 01:17:45PM -0600, Andreas Dilger wrote: > On Apr 3, 2024, at 1:22 AM, Sweet Tea Dorminy wrote: > > > > Signed-off-by: Sweet Tea Dorminy > > --- > > fs/bcachefs/fs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c > > index d2793bae842d..54f613f977b4 100644 > > --- a/fs/bcachefs/fs.c > > +++ b/fs/bcachefs/fs.c > > @@ -921,7 +921,7 @@ static int bch2_fill_extent(struct bch_fs *c, > > flags2 |= FIEMAP_EXTENT_UNWRITTEN; > > > > if (p.crc.compression_type) { > > - flags2 |= FIEMAP_EXTENT_ENCODED; > > + flags2 |= FIEMAP_EXTENT_DATA_COMPRESSED; > > (defect) This should *also* set FIEMAP_EXTENT_ENCODED in this case, > along with FIEMAP_EXTENT_DATA_COMPRESSED. Both for compatibility with > older code that doesn't understand FIEMAP_EXTENT_DATA_COMPRESSED, and > because the data still cannot be read directly from the volume when it > is not mounted. > > Probably Kent should chime in here with what needs to be done to set > the phys_len properly for bcachefs, or leave this patch out of your > series and let him submit it directly. With proposed wrapper in the > first patch of the series there isn't a hard requirement to change > all of the filesystems in one shot. You get phys len from crc.compressed_size - that's always guaranteed, even if it's not compressed