Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2751710pxb; Tue, 13 Apr 2021 09:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqHp1oVnfUMz6I/A50WSrqVZHdgeC7xMy58BhQpxBtAMJ5E6KD+/WRxpzPjzvEYsnePs47 X-Received: by 2002:aa7:c9cb:: with SMTP id i11mr21024733edt.219.1618330723398; Tue, 13 Apr 2021 09:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618330723; cv=none; d=google.com; s=arc-20160816; b=Ztam4UUEZ8y3jaTBhCqiajXAWAhx5V4/98hrTJ+m56GrciVY6a5wwQXlXbjseZ0P/U kixUd4b2kZE9mEd40tasCtJbaXB9hteTF8UThzFTNP8qIofej0hyMU4076BlnhGj5LFx WuuTOBDoYJo3Vf7ygJa963gIFeAFQFPKWVbZcwXWsk6ZHuBLdiB54a9qPaawsrig6odf ITPFtRdr/fMLfyJgHCLIZkl+PsQZR9ybVG3T7FoN6z0MsYUW4VLVgYmlTDpPBsU7ZSGd 8bKmGMj/9qVKUk/rt13g/qzUfFiOu+qVuc1Bt6/W471/OqfAlTqOdxItAH9M3zHhwroU uAiQ== 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; bh=Rv8wT0ga653Wgb0OdTPegLRoViRgIOjtrVoav2J6kck=; b=YQGt3+uXb/zdfRQGeIJ/xtj+e3tq9rZtokE4mJ4LYdDNVVkPFzn5EPK4uIjyuerDnb KTcIScXHAKUP48SXxtl51NwC7X0y41s0mqDQMw0+SZJv97wEgBz0lKl/dv3jsd2ItNwq fUrSLOuNq5DBymfKImevZwGPJzYQ2gBaRKse3JfxxIMPPNlaCqsS8vkuPLlynCfaWZ2J XM1jfaazjQ/u/kkxvdZtn8dRxemOQZqWT4S+4Kn+JaL43kBGICAiAwQBj4K3ew+MqFKs rvlEWbNtxwtITuJRSgq2UAn4uSIX05PP+kvcrgPyvYC/r+7gWAhlptn8T1Iz0YkDhAGx n2Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn42si11197164ejc.715.2021.04.13.09.18.19; Tue, 13 Apr 2021 09:18:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbhDMJ5k (ORCPT + 99 others); Tue, 13 Apr 2021 05:57:40 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:16907 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243128AbhDMJ5c (ORCPT ); Tue, 13 Apr 2021 05:57:32 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FKLZH0QPdzlXjF; Tue, 13 Apr 2021 17:55:19 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Tue, 13 Apr 2021 17:57:01 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH] f2fs: document: add description about compressed space handling Date: Tue, 13 Apr 2021 17:56:53 +0800 Message-ID: <20210413095653.28231-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org User or developer may still be confused about why f2fs doesn't expose compressed space to userspace, add description about compressed space handling policy into f2fs documentation. Signed-off-by: Chao Yu --- Documentation/filesystems/f2fs.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst index 63c0c49b726d..992bf91eeec8 100644 --- a/Documentation/filesystems/f2fs.rst +++ b/Documentation/filesystems/f2fs.rst @@ -819,6 +819,14 @@ Compression implementation * chattr +c file * chattr +c dir; touch dir/file * mount w/ -o compress_extension=ext; touch file.ext + * mount w/ -o compress_extension=*; touch any_file + +- At this point, compression feature doesn't expose compressed space to user + directly in order to guarantee potential data updates later to the space. + 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 interface to reclaim compressed + space and show it to user after putting the immutable bit. Compress metadata layout:: -- 2.29.2