Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp708910pxk; Sun, 30 Aug 2020 20:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyISbDTj0jd9Zv1yIW9dKiHL5IOsYFQ9BYxEMiQv7M9rmRVtg6wNo87BYewfnz68kN5j24L X-Received: by 2002:a17:907:b0d:: with SMTP id h13mr9580366ejl.368.1598846235647; Sun, 30 Aug 2020 20:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598846235; cv=none; d=google.com; s=arc-20160816; b=JLmXXDgcj4Caqol2mhlUuzSLBCdieBxa54rVDkxnwWXVsQEh3EGHEOz2VahDFacEMS l3tEViViFKCaxnZILHA7pjlfQeCkqlEHlDxqfpv8OWmdJfzX+aoNf4KhS43kCfNsxOWB +il9gWIfvr/LZaAXsRXAFkprg95UvUkc95l5rKpZd/pwXwjCYuUY3AH3/EQM2EHvlYEv TDM3ZYYgvalcqRWTd41ms3Se7wJuT7AEliVl26R7sQsnR4NS/QN8M2ykmm3uVGxX92Jd lfJG5P8CbPC/hzpLgxa9vuNDvEFtIAOt7WWYVLPt0k45mFfqgiFuGwK+hJqqaL3FCFLK mERA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=st+ArUspW4cfoVkyw71QvK5Tr7yiSZTbcPXCqE9k4Fs=; b=S0+CEWtkKIpiGKchvMkod0dl0GlOlzfOUJIH7P5MHKjlGzp+c+5rBwHIbWLNTfQsTp C7Nklz+joo7UDzihOOgAi3gi9tIxfLxF+BwodK/5Izt7AxThbf1usWu3AXQ2rGAvY5/D F6s86ttIxlKlnRjNCMQL7KEGEHrjDK5THrVp3q6DlYGVzP8MB3lrIkDCVr6lF8GpD06z Ly7FjYeAcMGD8fYGE3KrnziQeZIJ+f6B5+ZMw0DSwz6LRyM9iygCoe6Mc8TV5yh1A70y IYoLzJJ0kDTW4WJsBfZqgezDoYKBpMA6bt4reSoQpKxCgOs6csGXktNvUw7RPUAVzDzg GyPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kLzRPQ09; 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 s25si4774263edi.140.2020.08.30.20.56.53; Sun, 30 Aug 2020 20:57:15 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kLzRPQ09; 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 S1726946AbgHaDzl (ORCPT + 99 others); Sun, 30 Aug 2020 23:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgHaDzk (ORCPT ); Sun, 30 Aug 2020 23:55:40 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2935FC061573 for ; Sun, 30 Aug 2020 20:55:40 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id q8so2713841lfb.6 for ; Sun, 30 Aug 2020 20:55:40 -0700 (PDT) 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; bh=st+ArUspW4cfoVkyw71QvK5Tr7yiSZTbcPXCqE9k4Fs=; b=kLzRPQ096GT9g3Z+Z8cryY7oTlxYxGQ3+9PjvhuhX0gtolEE7ANyqgOLS64/MrdzYL qT7C6i97ah1Hpvy5sk7dNDITzb0XdLQGKH5vU+LQJxFTxrEW8IBjy4HcD/xMiX6vP79q hz41kqbBJPJ1USTcMqbya11vdMb3gJBpaev2y2MR1KAb8pisKETcRdQY1M7nnD8wvbP5 cfvTJr2k4Inm45vgiXD3gWku7+JxRJluQOBAAVuC6KpCuAZ8negB623XbcH9IDJhoE33 CpIZvDOdCTyiAWSWurA2SEdaw+yQU20kaxZg8d0eLe4fwpVlMcwyNtyDEn3+qa2Ale9K fxrA== 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; bh=st+ArUspW4cfoVkyw71QvK5Tr7yiSZTbcPXCqE9k4Fs=; b=oIQOgF1Bv2uXVnOZYOilt7xLAYxbmL0zejfhipe1FZYQQcOUvmycrdoo9oAr1A0tBW ug4TiOpI4sQheDOMCso9TS74CCO7xU6GHigINdURwuUpBjfGz2ApXV/QHx+2ueqx4YD8 76EsXcnIntoB5HSkMK57dW2/LPNpeaoQMTbgxx2JJGud9KifmMpSVxYcD7HaVqPbHPbQ reN+tCoaWgKq3cKvHpEMjOtAuqiu/2KszOSKVqRMBM9EzRB0CW/8z+byV5G6L01OvDD5 cL3PGhQ6WRnC6Tc1AN2LpVfndp3yxucBZNNCdxFwegrS8dVzcjrcTDbYOiPhYwHITb3X BXKA== X-Gm-Message-State: AOAM530tW3lr+bdpqWndTvfHPMXT+ZsFrSads66w95eDTyRlJjNb7N7l vYsp1LniAzOLQsUKSRYt+kyfAQM8dfyaKfZbmXI= X-Received: by 2002:a05:6512:6c1:: with SMTP id u1mr4692195lff.28.1598846138571; Sun, 30 Aug 2020 20:55:38 -0700 (PDT) MIME-Version: 1.0 References: <20200828054629.583577-1-daeho43@gmail.com> <61996dcd-6db1-13fc-8239-7e684f3ec49e@kernel.org> In-Reply-To: From: Daeho Jeong Date: Mon, 31 Aug 2020 12:55:27 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent compressed file from being disabled after releasing cblocks To: Chao Yu Cc: Chao Yu , Daeho Jeong , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > - open(O_RDWR) > - ioctl(FS_IOC_SETFLAGS, F2FS_COMPR_FL) > - write() > - ioctl(RELEASE_COMPRESS_BLOCKS) -- inode is immutable now > - ioctl(FS_IOC_SETFLAGS, ~F2FS_COMPR_FL) -- Should we allow to update immutable inode? > as we know, normally, immutable inode should deny open(O_WRONLY or O_RDWR) and later update. > For this case, with this patch we'll return -EINVAL for ioctl(FS_IOC_SETFLAGS, ~F2FS_COMPR_FL). I thought RESERVE_COMPRESS_BLOCKS ioctl is always required to get the file to normal mode after RELEASE_COMPRESS_BLOCKS is called.