Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6237605ioo; Thu, 2 Jun 2022 01:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2W1UL1DXCD2ZwGGDlDkZy0Ppstp2aqmMm8FYHq0+Sk4nxAEq/LXjugBoeHD10+0yk0Pzy X-Received: by 2002:a17:907:3f90:b0:6fe:cd08:dc21 with SMTP id hr16-20020a1709073f9000b006fecd08dc21mr3383705ejc.136.1654160217101; Thu, 02 Jun 2022 01:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654160217; cv=none; d=google.com; s=arc-20160816; b=QDcX5vPcUMZalTKCtlew4LBCoZ4M5590bofnnlDFPXjsdOGCmw2X2nDJmLHk40UKSp J3QWOJsu0JgBsXJ6Qk2Bl4ELPOglvHxZ9wPxLMaxBYR2PMKvsiyCtKBZoAPuKCOigbUY BuLvRdPJeSUKSNe8+tE2Sgpk1fp0w9qZF/fAkn2WL3tLcJeOdgRXulIxSSw4ooPn2z4P 6hYACb0razrChYfsLX1z04zF5SW1bpS88RZTSGbJfl8SBnmyHUak8VuZ+4Iey9LctvBC tQjaJ/BZmg6s5OxNKH7MH64H7X+Be7WIvXMgt+O4/IGliHDj/AmfXqSCl/CXDTPwLRm3 +nlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dO8F4huKrg7HK40w6R+II0EDqtahfzCwucyNeG/6yhE=; b=OicCruWAoApjl08fB7rtGKm619FJGxRB/POBTXvVCOf4pXNN+ORBDmKiEmd0hbOe5u C+3Vc7wslB2dp07TaP4F7QqZCOTv4MIGixkN6ylOKvxbPY93i3iag5/qRgU7psnwlZV9 PfW2eGN3eMSbMtJAB28mh+QTqmLcUme2mMxE0rF+wCd9/Vn1sFOBXEeGjUTHYy5qoNnI DWNiCLHVRJRyct2oCBopv2E6O0htgnbWquTvZSIPGip+IlS/8bkzWXdK8DnO+E2mKbpe jLTRhWBZWnWcn67l0d6uCC/zHkYOpjdsOvsURUzeQkngw/yLwqDFGNQS4edw0bgyqyeU Acfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YbmlsAf5; 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 ne36-20020a1709077ba400b006feb4205ecdsi4839440ejc.742.2022.06.02.01.56.30; Thu, 02 Jun 2022 01:56:57 -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=YbmlsAf5; 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 S231721AbiFBH1x (ORCPT + 99 others); Thu, 2 Jun 2022 03:27:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbiFBH1v (ORCPT ); Thu, 2 Jun 2022 03:27:51 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DBD529FE6C; Thu, 2 Jun 2022 00:27:50 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id g205so4022551pfb.11; Thu, 02 Jun 2022 00:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dO8F4huKrg7HK40w6R+II0EDqtahfzCwucyNeG/6yhE=; b=YbmlsAf5cKN+CIdt4ksyeiFsXj0EO16r04pJvRYTBKJYl61jvLfDPpgpGksmXE6pna f0o9KsvP7NHWOUk3Me3mfFvf89XjY/S+STrfm10JmnFCI8kJdybbtZGmP7v0QqyXOvec /b3p05S/iWQNhtPipEU3TFT8HplJgJtc8UaN9lMK4BIhSD6WSw73oa0z82tkxZQEiDtp VmNI88iAEOPDH7L0GG78ABi26dMu5+TROVORxgoYoCMbFyveOI6jW1eBZoNAW0umuoG8 7mT7ZOkcL4pfHlESth8wdpUw5eoe2Kkl2Ac/EZ0AaEsqX8SotY9JRn8hmEzfUrRoDf49 y/IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dO8F4huKrg7HK40w6R+II0EDqtahfzCwucyNeG/6yhE=; b=r0WPwzDZENiT5NqF0Z6ctHI+V2ONG6onaTY+BOVBR48lE6aH1z8S2etVFK5E8hDTKX tlR3GCE0fYTij9aqy3lTu9eNBS4j+6pDDs9Kay3XaTEtNCCZwlBhkQ4/Szt39mt6mYYO FCILQ/qOtNuHT66BnIaP7h0KAdYiq/nq4cHnt3t/zs3W8qK8YiF+KM9S9A24Qddgz/B2 5Ouul8lGm3i6iO0fBTjYr9cKb7ttTltzVuqZGjEjEP466wq5HavR1KwjimbN+2xlcefg 2agwE0kiNwjrt8vj/nGz9jGZjYkDWLLH8rAxZIKh+ZQH2VGB5RQkwOp3W2WyZmXC1nho twng== X-Gm-Message-State: AOAM533vsVj+FJ2FcbZYVotUHRnbt7/jq7tIyHWFmF417H7MVCqFsW7w ncJWn5pmKAEUJY8qtiRmdw8= X-Received: by 2002:a63:114d:0:b0:3fc:cfa3:52f0 with SMTP id 13-20020a63114d000000b003fccfa352f0mr2978866pgr.243.1654154869625; Thu, 02 Jun 2022 00:27:49 -0700 (PDT) Received: from localhost.localdomain ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id c7-20020aa79527000000b0050dc76281ecsm2705091pfp.198.2022.06.02.00.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 00:27:48 -0700 (PDT) From: Chao Liu To: Jaegeuk Kim , Chao Yu , 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 Subject: [PATCH] docs: filesystems: f2fs: fix description about compress ioctl Date: Thu, 2 Jun 2022 15:25:40 +0800 Message-Id: <20220602072540.998638-1-chaoliu719@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 + 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