Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1069357pxu; Mon, 23 Nov 2020 10:49:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxXhhmEAon0uul5mi5hWHXV/qr/OWUe3xpPmltzVyh/CurlKhqcH621RO5eDZQNkNpzG6T X-Received: by 2002:a17:906:f289:: with SMTP id gu9mr917467ejb.514.1606157389735; Mon, 23 Nov 2020 10:49:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606157389; cv=none; d=google.com; s=arc-20160816; b=Vpz/Sdlx7QnpoR3Yj8iEhl9c/oXPhh0I3af0qWjtB4TykEQjo+nhhre9ar8rmQ4I56 cl0ApUnWk+6sgGmXiSdABaZD1HYYvazerk+54O50yAOdCwJPsbFREY4Jpw1DlbidxzzU VNhUUlSG0rDoxPg9mxo77RubGcSNmolL+WFpmgUb6FGm1W07aAPdQNUfRzNiMZHcA33w dF9yccR0/XfLSJHjbvc1GsruBpKQlqLe5p8iL9mUrjHs8v28reSl4gFZaREef4YYc3Lm jAU9Q1WEZJIRU3wnZgu87/JsQUUOSaNYFG8ADYR07H4NDAk5nBxC2DsHvj8VHW+Jx5v0 lcfg== 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=+Aw/smx76BeMn2XlDUhBnNXpwqGa4M3OBbFE1pWtmSg=; b=soD5iFDvKSJrTWuFXC2/Xwfw86tUEAzvGP670ENLdJUbB2nNpWFfMdmVv/nmpyNihD 3V0HBYj/NsucF10zuI9lffRNh+YhvFFlwlQVAQVA41EmduSx9V6IGCcFeb7nksHAtvA3 YkbYMkf9SYgX5bAzHnhKUrQ0fcRoNjv76QaUGvd4dzvKQRqjDpQ4ScCfE5lF+Qt+kg8K xBG6ZXPG+GWjBlPZIiPqRQpNVz2ds1aJ8voCguBpYqi7M089hOLwnQXuuSF8tnOe11ym yJHf6hVD61c7WAdg2dCD1GDUQi6iZ9IrUrUAl0RLK9xPgnwzeXMjvQzu6TFJ8837canF JI8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dGcuQcTX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf17si5861523ejb.541.2020.11.23.10.49.27; Mon, 23 Nov 2020 10:49:49 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=dGcuQcTX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732522AbgKWSqu (ORCPT + 99 others); Mon, 23 Nov 2020 13:46:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:43534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732338AbgKWSqt (ORCPT ); Mon, 23 Nov 2020 13:46:49 -0500 Received: from gmail.com (unknown [104.132.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C38FC20724; Mon, 23 Nov 2020 18:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606157209; bh=UtIMi0SFKxzigdnldRadgfBJUTnGFAzotVHREA3Z6uw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dGcuQcTXADPhCET2VVTwHQyHkkr8W7LYUFuKrcwcc/TIrRydZoBZWQ3IMxMUMf/qw fsQhVP6M9bBnOj4a7w7rkzz9NSK0cSB12Ep/iBNfd8cXGrQw2xyP5GahT8j/NnMP/4 uHqqCVKRFUWaPKfI/J3eZtFpjCajeQWVAo1SBo+g= Date: Mon, 23 Nov 2020 10:46:47 -0800 From: Eric Biggers To: Daeho Jeong Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: add compress_mode mount option Message-ID: <20201123184647.GA3694916@gmail.com> References: <20201123031751.36811-1-daeho43@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201123031751.36811-1-daeho43@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 12:17:50PM +0900, Daeho Jeong wrote: > From: Daeho Jeong > > We will add a new "compress_mode" mount option to control file > compression mode. This supports "fs-based" and "user-based". > In "fs-based" mode (default), f2fs does automatic compression on > the compression enabled files. In "user-based" mode, f2fs disables > the automaic compression and gives the user discretion of choosing > the target file and the timing. It means the user can do manual > compression/decompression on the compression enabled files using ioctls. > > Signed-off-by: Daeho Jeong > --- > Documentation/filesystems/f2fs.rst | 7 +++++++ > fs/f2fs/data.c | 10 +++++----- > fs/f2fs/f2fs.h | 30 ++++++++++++++++++++++++++++++ > fs/f2fs/segment.c | 2 +- > fs/f2fs/super.c | 23 +++++++++++++++++++++++ > 5 files changed, 66 insertions(+), 6 deletions(-) > > diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst > index b8ee761c9922..0679c53d5012 100644 > --- a/Documentation/filesystems/f2fs.rst > +++ b/Documentation/filesystems/f2fs.rst > @@ -260,6 +260,13 @@ compress_extension=%s Support adding specified extension, so that f2fs can enab > For other files, we can still enable compression via ioctl. > Note that, there is one reserved special extension '*', it > can be set to enable compression for all files. > +compress_mode=%s Control file compression mode. This supports "fs-based" and > + "user-based". In "fs-based" mode (default), f2fs does > + automatic compression on the compression enabled files. > + In "user-based" mode, f2fs disables the automaic compression > + and gives the user discretion of choosing the target file and > + the timing. The user can do manual compression/decompression > + on the compression enabled files using ioctls. Please clarify in the documentation what it means for compression-enabled files to not be compressed. It is not obvious. - Eric