[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78ffaf17-56a0-32bd-0bcf-212333b52f06@huawei.com>
Date: Mon, 31 Aug 2020 14:06:46 +0800
From: Chao Yu <yuchao0@...wei.com>
To: Daeho Jeong <daeho43@...il.com>
CC: Chao Yu <chao@...nel.org>, Daeho Jeong <daehojeong@...gle.com>,
<kernel-team@...roid.com>, <linux-kernel@...r.kernel.org>,
<linux-f2fs-devel@...ts.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent compressed file from being
disabled after releasing cblocks
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?
> .
>
Powered by blists - more mailing lists