Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp243071iog; Mon, 13 Jun 2022 01:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMfbKbCuy4fHilz1s/52iN0l2PrMSqhxC4CZ+NRsYIbmz9D0paAVYD17PShSjuJJo/RBKR X-Received: by 2002:a63:1544:0:b0:402:de15:b4d2 with SMTP id 4-20020a631544000000b00402de15b4d2mr14457267pgv.128.1655108812780; Mon, 13 Jun 2022 01:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655108812; cv=none; d=google.com; s=arc-20160816; b=Ug6yzj36oBVU76derC+FBbFXsgGcMUURBpr0AHdfxJrl9DcD2YZC0HHmQcrsI1ioo5 BAAdGbMkFx9o4TPkQca1IpJg8h0dx2+/TrER3zz/e5Q0F5DIMNeBo825Dwn63DUoQB2v +2egQub9q4cbDYrLspMFoqoCjosxchJP8x29iaCwZjIX4835cBzl7J/jslrb6OVU9Z/b uxpDpDqJnyErOOn75NQy7kSBl4taSyuO7VZWEhE/cIWx7+ube4h+YyIW3xupMLfMc1TQ 8IJR2GXrLKLpwJg2VKt+G6uphI5o5FggVC90xkq4AJIE0sUJ2y9NAAnKZjmX7WITknAk RXNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p1C8yN+vY8r/BHzAHLXxk073G3pWCMQ/vUB+HuPD1g4=; b=EibfzlpZxY/bpvJwv3w4N4Ewh1KPbdL/h5QLshmyFotxNSaSrhi8Yv5nIGRsqJnguO hB0emqvc78NSEDnmkCJVRlJH40W7uTJfF2a+BLzZL1XeoMsgBVBZm9UqF+SAywc4jV9B hiSH/c6lmuXgf6rQnyo6VQDFkW/aRl4CZwzFHq9kqEHmE/tvc5LWEJoOsRW3J+M70hXx HTD3b3tgAlzVJj6VLc1IXwJJr8byJBN0a4fGMXmBtOvuH6ReVQNj6VDrs7mOzl51ZW9y ppIxpYFxJEGaSIkAkad5wm5nHf1g1yh+PXFiFmg2HiBbwJSz9i2a6C4GhMWsQjyidIYl t07w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aSepHBzq; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a170903409400b00161e3a8fdcesi7121318plc.479.2022.06.13.01.26.39; Mon, 13 Jun 2022 01:26:52 -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=@gmail.com header.s=20210112 header.b=aSepHBzq; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235248AbiFMICX (ORCPT + 99 others); Mon, 13 Jun 2022 04:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239307AbiFMICH (ORCPT ); Mon, 13 Jun 2022 04:02:07 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCC7615A24; Mon, 13 Jun 2022 01:02:06 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id k12-20020a17090a404c00b001eaabc1fe5dso2222014pjg.1; Mon, 13 Jun 2022 01:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=p1C8yN+vY8r/BHzAHLXxk073G3pWCMQ/vUB+HuPD1g4=; b=aSepHBzqKyR8Qo5Ni0Ko6/WPnq+LpRSeEYfmQngvGmWanOcbzx2aiaaZQa8eQadyJ9 dDlrjox3fpUosoUz8TVBuRrVDb+97Wl2wvvmZQ5PjWF+MckNqtoF0Yqjfp1JiEGapoH9 wz1pf8EuHtCVmFBbIXiY9LmPpzE9OQpoIIgx91IYpnQxpyTRTtfb+1GAi3DxhIKrbkKN N1NK74nkvvYnOtImC2zpVWDa2FwLrek2i8y6h66bEXMWyg0IOiDQAdHJY5QSIbr2K94S gdujIYqPT1xp+21GLpVsPtRLshj81Who+zb4KBxHDhX6J7NLhycAWX+JQaOSSNbDRwf4 bSxQ== 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:in-reply-to; bh=p1C8yN+vY8r/BHzAHLXxk073G3pWCMQ/vUB+HuPD1g4=; b=alPhgJ9J3a1QqtxWyWasHuSvBayF3JL4dTB7Scq+BEAeY2qLkwmX4vqFYINNYOY9X3 hBMX53dR5hrmVnDSj36cfbTWt0s0Q+kE8SwRp7Uyojh+yccQpYAxkb1V7L3AX8dONPPd les8+fBLI+ybcrePMGmIr0dMVVpooSKauyfy6BIqgtznb7CdvvG15lv60eZkx83i0XHq WmxknNbOnFFeY1F8K9XJgJKUy9KbUTiL+YMz98j3fqBv0x/2V3IFHVjhf/xI5Pqu2ohb l8qIJxw4Y4Fu37kq+mR5OGCUps5G6SE1Gbp6Xb649wj6AS8FRnKkpsaZrDG3z3zkNmzF +/mg== X-Gm-Message-State: AOAM53276Im6mQfPx7T8h2Crcu4oOA+/LL3KyzLux0wgnd2vOpcriaNf xqnWie7wFRANtnt/081F9Mk= X-Received: by 2002:a17:90b:350f:b0:1e6:94e1:bd17 with SMTP id ls15-20020a17090b350f00b001e694e1bd17mr14587004pjb.162.1655107326065; Mon, 13 Jun 2022 01:02:06 -0700 (PDT) Received: from liuchao-VM ([156.236.96.165]) by smtp.gmail.com with ESMTPSA id ct21-20020a056a000f9500b0051c0784cb45sm4728274pfb.99.2022.06.13.01.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 01:02:05 -0700 (PDT) Date: Mon, 13 Jun 2022 16:02:00 +0800 From: Chao Liu To: Matthew Wilcox , Chao Yu Cc: Jaegeuk Kim , Jonathan Corbet , linux-f2fs-devel@lists.sourceforge.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Yue Hu , Wayne Zhang , Chao Liu Subject: Re: [PATCH v2] docs: filesystems: f2fs: fix description about compress ioctl Message-ID: References: <20220613020800.3379482-1-chaoliu719@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Mon, Jun 13, 2022 at 04:37:01AM +0100, Matthew Wilcox wrote: > On Mon, Jun 13, 2022 at 10:08:00AM +0800, Chao Liu wrote: > > v2: > > - s/file size/filesize/ > > Why would you change it to be wrong? > This is a suggestion from Chao Yu. Maybe he has some other considerations. Hi Chao, Can you help with this question? Thanks. > > 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..531b0f8a3946 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 filesize is > > + 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 | > > +----------+---------+---------+---------+ +---------+---------+---------+---------+ > > - . . > > + . . > > . . > > . . > > +-------------+-------------+----------+----------------------------+ > > -- > > 2.36.1 > >