Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp762065pxk; Sun, 30 Aug 2020 23:19:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwse85n9Whw430PGhdt06lZWVFqnRfs2yKV1s47fWjkeBDYlZAtkoH6SrhBvZtPcb8pOpLi X-Received: by 2002:a50:d54b:: with SMTP id f11mr9894032edj.329.1598854784516; Sun, 30 Aug 2020 23:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598854784; cv=none; d=google.com; s=arc-20160816; b=mJrwkwXGkHVM+PzNT/moQkNq30IhoN2OFtTUUmGr3/FTTOTlfb9CkDyTxVLgCz5PdZ 1NUjq2xlblWY09cuLd3LnD/GPdSVlhjEtpjKfsYJqr327+6ti4FP7WQoBlVn+yVPzPES EBFmcjkTingN+ZxyzDOdZsd1MG4ZCgp+KMwv+BynPH3zURwocBGAKNhjqvVfGWMb8WPj WtkXUV4GoeJyui1F9NK8kyCoc2/UKj0wu2r/35I09obsx52kYD/xe0ftzygA7sLYk6Ta xwli2vTRdm0knBYeHkWa3exR9qZeXn8f7NTDzuLEon6SzvPePAgaBdmCElHuA+LW0PDN LzUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wuyLaVxjSrwxIvkp2IxPqXWRy1wwNZaJjHQ7rDHE6R8=; b=mYigJxy+9IOuVI2c7xvU2f7rg9z+5zqvjrd2l8L8256Xa7jcv5g/v+4Rmu6zsXZL7k Z16/NT98/S6Ced8twYF8TmIsQ4wE6pS7YVAA0HVytMvSUFCz7BfRiNMYj45NOc+d0iEO tLo/41Y04/mgfrVo1uqr0FSIcMJaIwZ1uPvA7ozpqKvZidrFox7KaS49ZSIAg4kaeTV3 hswq9RiLdV6GLiuaq26I4YAl5g8EacFsDOCJsVN80rth/By0OjMJbi4w54LXGG8pbUvP rRX5ZnkDtEzaXBRYLkwzvplg6jQB2drKPHx3xKc4g20AiVT8pk08eTF3Fw5EXmMT2/7b NmAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="kR3os/OT"; 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 b26si5004730ejc.196.2020.08.30.23.19.21; Sun, 30 Aug 2020 23:19:44 -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="kR3os/OT"; 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 S1726800AbgHaGQJ (ORCPT + 99 others); Mon, 31 Aug 2020 02:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgHaGQG (ORCPT ); Mon, 31 Aug 2020 02:16:06 -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 2C2D5C061573 for ; Sun, 30 Aug 2020 23:16:06 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id r69so1874491lff.4 for ; Sun, 30 Aug 2020 23:16:06 -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:content-transfer-encoding; bh=wuyLaVxjSrwxIvkp2IxPqXWRy1wwNZaJjHQ7rDHE6R8=; b=kR3os/OT6BRC3L4oP5KzyDneUktr1nxy3/N2aC9ju5O2lvshW++Wcl5LxGRycxEpeC l3If0m77zrzQbBCI4EVMo0PS+1NLM0jmMcYsTppkdnW54fL7He9omjwKmewfTbtXiJIs PT6GzxtZhEGFRt+ubd7UhWXOjvc6BB2Iu+nUULUO63t5TGlodTPq8wPD254dgYiQ0XSB DQZiZr9/KOT9Nf1l2XJ8VnRUY3BO2BXgbDOfmCeDbSGZwDoDbFgSZ8p7EPem2SAB8wSd 2TBffeRyosVALZSchjkcw5i5HxDGVz5v9J9R8cD/jPd87181TKcykcCwsBiWtz9xF+tI iNXQ== 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=wuyLaVxjSrwxIvkp2IxPqXWRy1wwNZaJjHQ7rDHE6R8=; b=tGSiKDSNHFieJ31mDsuK4XdrCFLUF4RBnsX6svL73/8pZlmmFBtEpnZ9UBa6calbTS eUSpEo1OQ8Sc5LI+8jsPzxHuvbvG+rZeppregioDqlAXK7fX3PO802zwA665os5T8hhJ zdcs/InX9w8UahlP+XJ7RE5CYR3F98qVekElCeTFvngzwfLKJcYqziyFOmJ1v1h5NWnH lrbpYT+Z6dQ/1AacnqCXmI7RrcSkqc8QfneCXb4XJCTz0p2xkCWaTSJn0DxpgKZMzD9O /j6+CcYgfy7gzO3IzDKidtYohiEOZ9NECyY4XFCDQugxNsjIKH4fNlbPnWT1lnovePdR C/LQ== X-Gm-Message-State: AOAM530tfHp1LKAt2q5nKA8pJrV7Z2g6aI97AvFpA1MFNaA8VzJWDAHV ZTjV/ncFKACs852iw0mm/+QvtRzdYpZJ5x410uo= X-Received: by 2002:ac2:5382:: with SMTP id g2mr2900580lfh.140.1598854564567; Sun, 30 Aug 2020 23:16:04 -0700 (PDT) MIME-Version: 1.0 References: <20200828054629.583577-1-daeho43@gmail.com> <61996dcd-6db1-13fc-8239-7e684f3ec49e@kernel.org> <78ffaf17-56a0-32bd-0bcf-212333b52f06@huawei.com> In-Reply-To: <78ffaf17-56a0-32bd-0bcf-212333b52f06@huawei.com> From: Daeho Jeong Date: Mon, 31 Aug 2020 15:15:52 +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" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I think this patch is enough for now. If you have anything else we should take care, please let me know~ 2020=EB=85=84 8=EC=9B=94 31=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 3:08, C= hao Yu =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On 2020/8/31 11:55, Daeho Jeong wrote: > >> - 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_R= DWR) 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. > > That's an example, after compressed block release, shouldn't we disallow = other ioctl > interface which updates immutable inode? > > > . > >