Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1388321iol; Fri, 10 Jun 2022 06:35:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3bWup+roDOuzzD7IDCaW4zIXtdG1N2uroXH4ZJYnmujUsKMAi+lZoGglNjNpruL6UQEzY X-Received: by 2002:a05:6402:40d4:b0:430:97a9:fa53 with SMTP id z20-20020a05640240d400b0043097a9fa53mr38628160edb.158.1654868113755; Fri, 10 Jun 2022 06:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654868113; cv=none; d=google.com; s=arc-20160816; b=GrvkBBWk2tedx/0EsNNVkVdYKL2xv+KlyNc84ezjBp/4w5lToXp3GlDMNYiEwDvtju 7A6A22ZH+HZCizTFmENvab7CxQLoMqHwjgvR0bLfUkaE6mUJX8ga9cIT6jeYqLSsCDsM +tZhQIqUyuH4RkwRU7+Du3Un10e7wWxV4zA9HsH6CZaYaqnGgIMKjAF1zq3FsH1DBrLI OQrSkdgeI2sUaE9YFYIh4oKob/vxL6HwEQbMBfj7QZsWFTpPPIB5tGaWvfCB9S/2UrBH p/CrDHtQ8wsRPbfvGs4G4e/pTezQW2qE0MwaPNwTMrIq5fpccHSUN3B6BOCG/k3/P+wp 49nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=+ENZFfDnbzILi+cmvy/mV7hYyC34+MIvzq/NU6bj1Lg=; b=xBs/C8sZgCuWGJ6riPxTEfbk1MjtNU/evWyLo83e5vwRA9VPVMQVAbpIeKNmz0nyy0 GTICi/OTSMvZZIgitYJX3IyZhH4MbI96ERiQjXJ9X0AvOWjdAfCKl1J6eNuMVE22ctwX uzlZQ4eNhmRAF+N1/rzPDy037piaN+Dx3bBZir/EZDoJMutTzMF0nIthutDh8kQyZoNV QVw8/ZIwonCOpRVd2vvrtY4/Uwfm/Y0CpajpZM6wVK8EevgNixNf0lkxUD8cX3f/oX2l wVPnSbzXbPxN6AIPbED8vEVqDt798LY2hM0xgmRSL3W3vvD37o6iba/BDJTmS/py+gmx XaYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Nf/UQFyu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a05640240c700b00430d38d9c6dsi9639405edb.2.2022.06.10.06.34.42; Fri, 10 Jun 2022 06:35:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Nf/UQFyu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238170AbiFJNGI (ORCPT + 99 others); Fri, 10 Jun 2022 09:06:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbiFJNGF (ORCPT ); Fri, 10 Jun 2022 09:06:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2F2B212; Fri, 10 Jun 2022 06:06:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 2B334CE3584; Fri, 10 Jun 2022 13:06:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40AAFC34114; Fri, 10 Jun 2022 13:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654866360; bh=xkCJiA855qlPrws/61dN5ylG/Dd/FlQB186Hu3KHC2I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Nf/UQFyu0Gb6hxnCkffPqNTS5oF5hm4QLJRJWaWGbxDS2n4VemEepH3dO2SobKZ76 iBYTPCh3mX5ldY79S5Bwe1dvGN7+9pFRhXJhyL/R94YGBWrIsyWo65utQfXa1EZ1/+ AZ26IMyqOA04h2+4VbhNfTjGr6TLuIb7zltPIdrAdiIWRRmzxD2IRQEqsiyzxg7EA0 gsTgru0aXRtmwbn7aExCICJb9GM9z/FlkaBLC2UiVevHX80wyDFVH8ZAj7tOK8L4TT KO0ccMbpqDHZkyXLYnjKhjg0USQC6dGYSvrh4TYr6rAmvNSUYuj81waLQX2uYvoOaU RX0ip3KKyuRGw== Message-ID: <0e451780-31c8-b1e9-0205-b9e68a57e958@kernel.org> Date: Fri, 10 Jun 2022 21:05:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] docs: filesystems: f2fs: fix description about compress ioctl Content-Language: en-US To: Chao Liu , Jaegeuk Kim , Jonathan Corbet Cc: linux-f2fs-devel@lists.sourceforge.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Yue Hu , Wayne Zhang , Chao Liu References: <20220602072540.998638-1-chaoliu719@gmail.com> From: Chao Yu In-Reply-To: <20220602072540.998638-1-chaoliu719@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/6/2 15:25, Chao Liu wrote: > From: Chao Liu > > Since commit c61404153eb6 ("f2fs: introduce FI_COMPRESS_RELEASED > instead of using IMMUTABLE bit"), we no longer use the IMMUTABLE > bit to prevent writing data for compression. Let's correct the > corresponding documentation. > > BTW, this patch fixes some alignment issues in the compress > metadata layout. > > Signed-off-by: Chao Liu > --- > Documentation/filesystems/f2fs.rst | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst > index ad8dc8c040a2..98dc24f5c6f0 100644 > --- a/Documentation/filesystems/f2fs.rst > +++ b/Documentation/filesystems/f2fs.rst > @@ -818,10 +818,11 @@ Compression implementation > Instead, the main goal is to reduce data writes to flash disk as much as > possible, resulting in extending disk life time as well as relaxing IO > congestion. Alternatively, we've added ioctl(F2FS_IOC_RELEASE_COMPRESS_BLOCKS) > - interface to reclaim compressed space and show it to user after putting the > - immutable bit. Immutable bit, after release, it doesn't allow writing/mmaping > - on the file, until reserving compressed space via > - ioctl(F2FS_IOC_RESERVE_COMPRESS_BLOCKS) or truncating filesize to zero. > + interface to reclaim compressed space and show it to user after setting a > + special flag to the inode. Once the compressed space is released, the flag > + will block writing data to the file until either the compressed space is > + reserved via ioctl(F2FS_IOC_RESERVE_COMPRESS_BLOCKS) or the file size is s/file size/filesize/ Reviewed-by: Chao Yu Thanks, > + truncated to zero. > > Compress metadata layout:: > > @@ -830,12 +831,12 @@ Compress metadata layout:: > | cluster 1 | cluster 2 | ......... | cluster N | > +-----------------------------------------------+ > . . . . > - . . . . > + . . . . > . Compressed Cluster . . Normal Cluster . > +----------+---------+---------+---------+ +---------+---------+---------+---------+ > |compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 | > +----------+---------+---------+---------+ +---------+---------+---------+---------+ > - . . > + . . > . . > . . > +-------------+-------------+----------+----------------------------+