Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp756995pxk; Sun, 30 Aug 2020 23:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9xCYb8SyDyXQUn3Pul4fsJ1aG4YjBHKi4Rp9eC1i7i+5q5FM4upf58jJFwgh6xdpa1O5k X-Received: by 2002:a17:906:7204:: with SMTP id m4mr10457199ejk.342.1598854069141; Sun, 30 Aug 2020 23:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598854069; cv=none; d=google.com; s=arc-20160816; b=G8nHK/K4IBCbL4mXOfpmuqoYt5OaQkFjT8g8/86herGbV4aZiKNJHvZSpi4KfqkEeM 3blidkbi3cgCVv/A0qheuEEio2RwOoPV1gMDA/EVJn7p0OqQQqG1uM5fBQ/cJhVuvN2f RpgXjTvsrZWJkQER4eP6m4iwDNDlQvylU1RbjFJ0QbLRgqESF2qcEiNuyQ98LVil1ceV rqJ21QIJ7CMW4KVqqriiay8OFJjAS6zgCjj1FdP7VC+t2z1C7MdXGKiQW+B2FrCE0W5e tVrOlV7k/sigJ3FLMfuAiZEt1SsR7Tsjf0J/01FRI6ExbxUXT0J0/saBLaCpYC15hykN bLiQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=f8gICr5+ZNSDDhJMH/VG4+pq3wQaTEDFkrbK4hvvkzY=; b=qYDrhIeCsP0emBpdtUlrXNL8bgc+h+6VpahWR5FIFI6N8LAkbq9REz8yxL0Y4MjAuP Iz9V+dtrud6pj4Jyq843c1EehFGFq55Qas+bChOOovxxY/VoXWALB2foouh5R5v59yCL ptFbaA2DHP98OvMx8xiZ6+1MmZMxuoi7HGdYvv8+fQgPwTgTnIZW2VA2dU6xyuG8TAKw oDbzxVIgbwU8itAkQt3o9eDYoK7/1oZKJn0JCVmtXU7BMdpq1JdVjnLPZjeF+GPadOgk lTmlRkBHgRxPS5/K42ovrKpYGcHT+vQp0o1e7zS3am/oewI0UNWVQ8YY2jg4c8poPZFG mlDQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z17si4685378edx.532.2020.08.30.23.07.26; Sun, 30 Aug 2020 23:07:49 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725937AbgHaGGu (ORCPT + 99 others); Mon, 31 Aug 2020 02:06:50 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10350 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725794AbgHaGGu (ORCPT ); Mon, 31 Aug 2020 02:06:50 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3C9F8B21441495282C45; Mon, 31 Aug 2020 14:06:48 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.487.0; Mon, 31 Aug 2020 14:06:46 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent compressed file from being disabled after releasing cblocks To: Daeho Jeong CC: Chao Yu , Daeho Jeong , , , References: <20200828054629.583577-1-daeho43@gmail.com> <61996dcd-6db1-13fc-8239-7e684f3ec49e@kernel.org> From: Chao Yu Message-ID: <78ffaf17-56a0-32bd-0bcf-212333b52f06@huawei.com> Date: Mon, 31 Aug 2020 14:06:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_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. That's an example, after compressed block release, shouldn't we disallow other ioctl interface which updates immutable inode? > . >