Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1272579pxu; Mon, 23 Nov 2020 16:41:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwF2m6ZCLZx+Qazo5WdcW5EXhJhz0jnA07RfaYZI9Bv/kdeztC0k5xD8HPlWA+DVB1bmb9H X-Received: by 2002:a17:906:adcd:: with SMTP id lb13mr1912249ejb.362.1606178462559; Mon, 23 Nov 2020 16:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606178462; cv=none; d=google.com; s=arc-20160816; b=NCgSWDNvR/VdQNZW343FXqxmj/b5yBbsHfD42bjfFOCfkuLFphveP+2B5pED551bub 3s6+GY9XQPqr5t6vRhVnJpEgxaTaJqoh4QIR+PB4sdZhADfCC54CBYrOg+bZ/kjXSJ/z rGmJvhw3fSEJKOrMO+2/J6SefuCiL6fpB4DR2yqozMmwW8/sN3RPYplaFKGgDGSpZH9y RC5Yc4mLoDN1oIU2FUEYMC+dA7GHtstXs74gc8kMsdHaNQc0kozRlpJSI5YxHssvyK2g 4SjX2OBafzWKFDK3wGBvl9mAmDH9xn1uNtR0Q2xrGaKo0PhxIr8DJNHKjF+x+ZqwLs1U Etqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WJDR7q4xZx9dSoLzieIGiWyC6I1HarpZQYL3DEjKNzY=; b=CvXqxysAEkAXqxdqehmt9wh1h6nuiOVba4DvNYGpaqXPHECw099vz4qjsmZnsb3RHc kRR7Tqms4B+26rosKzf1l+prFqU+qCpr+burKF8qQGhwxDfkBCbXHV/BDuiIBW25KkLB o95OOZi/cmpqO54khQeGxPWFHeoIkjE0SgCcY3qBpArVYimQQX+X0wmIt2oaquiwbAmo PNTjpSJ2GpTa300ZuFwLVRlB5yRnk+FxxIM+yTvYhQmSOFcQWoIJ5veBvAbyDIJLR06P hEVpAPfxYkj7fQR/dgC8rk7vb9VDsTtTnQBmXgZ5jl0l4qAnACgGtlzDlEbsZYWj2bhE 0LRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X9fPdSLi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si7669957edx.235.2020.11.23.16.40.40; Mon, 23 Nov 2020 16:41:02 -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=@gmail.com header.s=20161025 header.b=X9fPdSLi; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732847AbgKWXD7 (ORCPT + 99 others); Mon, 23 Nov 2020 18:03:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbgKWXD7 (ORCPT ); Mon, 23 Nov 2020 18:03:59 -0500 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C422EC0613CF for ; Mon, 23 Nov 2020 15:03:58 -0800 (PST) Received: by mail-io1-xd41.google.com with SMTP id m9so19927473iox.10 for ; Mon, 23 Nov 2020 15:03:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WJDR7q4xZx9dSoLzieIGiWyC6I1HarpZQYL3DEjKNzY=; b=X9fPdSLiQwi3gnTRdk9SYUai8we5jG1eFdz6ooUJOj1os3Vv1+e82I21OisQ1flfLV /PSC0QnyL9vQMBlXEzXhI+ecs4zHHrjihBBp0n7Im3BebTkW3MEnYO0BS6perBRHHlcX zzpfHpwwC+QOYx4/3x5krzY1rA9yAJJt+I1fwx/fu0igbCk0TO8srvBfmIsJ1TnLGp0d vvT+v3np4CTh02gUfgHe1lmR/GNa3dUSD8o1VD0oregn6S2IS7YCtC6WSxxHDAql/Go2 dD9N4HzvROaYPi6s0nppjGknGrnGH37Ok+9lBAXY2RdJlozPYOy0CAmHqCv7W1horwsc RIGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WJDR7q4xZx9dSoLzieIGiWyC6I1HarpZQYL3DEjKNzY=; b=lJpQsvn14rPbFUqJSB5FH+nBgbOka6wqWMflyrjqcxzSCruXgy1ha5oh6kcJZlSVbL L7ovAvS6EeVA4MZGqCSoyRZ7NeipSJP7Mh+gPI4Q28ZYjIXUXQcIAaMPyV/+kb1lUvWi lWfHswZzXSw9YY69gITbyCoDAhr4Fk+aivZNFY3Hz0nSERMxLpiazxjAjO8xbRQzqaUP tQPP+rBJ36S9ypHpK+BafmgKpMQlLcSQ97m46xYDluGZ8wjib9SR5lvLYspLa/4o+jZi Nx3hN7YUQziBiQHVPsuUMbJSzI9I7H9T41fVWho4MqjIg9LG5BX/OfUIu1ny64JBDFOv AUWg== X-Gm-Message-State: AOAM531ag0iPg0Rk4KnckNZtH2IMGiB0vOsnEBzXj/z1YuLMqLlfxpLt ctfb1i5t+ucfnBQUoJLdhtMfh5H8EptqmxNxF00= X-Received: by 2002:a5d:8ad6:: with SMTP id e22mr1757787iot.154.1606172638121; Mon, 23 Nov 2020 15:03:58 -0800 (PST) MIME-Version: 1.0 References: <20201123031751.36811-1-daeho43@gmail.com> <20201123184647.GA3694916@gmail.com> In-Reply-To: <20201123184647.GA3694916@gmail.com> From: Daeho Jeong Date: Tue, 24 Nov 2020 08:03:47 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: add compress_mode mount option To: Eric Biggers Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jaegeuk, Got it. Eric, Yep. 2020=EB=85=84 11=EC=9B=94 24=EC=9D=BC (=ED=99=94) =EC=98=A4=EC=A0=84 3:46, = Eric Biggers =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > 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/filesys= tems/f2fs.rst > > index b8ee761c9922..0679c53d5012 100644 > > --- a/Documentation/filesystems/f2fs.rst > > +++ b/Documentation/filesystems/f2fs.rst > > @@ -260,6 +260,13 @@ compress_extension=3D%s Support adding specifi= ed extension, so that f2fs can enab > > For other files, we can still enable compression= via ioctl. > > Note that, there is one reserved special extensi= on '*', it > > can be set to enable compression for all files. > > +compress_mode=3D%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 ta= rget file and > > + the timing. The user can do manual compression/d= ecompression > > + 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