]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: introduce F2FS_IOC_RELEASE_COMPRESS_BLOCKS
authorChao Yu <yuchao0@huawei.com>
Fri, 6 Mar 2020 07:36:09 +0000 (15:36 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:36:46 +0000 (20:36 -0700)
commitf1bb992cedf12f91429fbafbe6a26b39c479e03e
tree8525d2512d9bf64662815c3c4c67c0a0a42e6c79
parent1a28348806a510d4bc6c9f355ad709d982ce187d
f2fs: introduce F2FS_IOC_RELEASE_COMPRESS_BLOCKS

There are still reserved blocks on compressed inode, this patch
introduce a new ioctl to help release reserved blocks back to
filesystem, so that userspace can reuse those freed space.

----
Daeho fixed a bug like below.

Now, if writing pages and releasing compress blocks occur
simultaneously, and releasing cblocks is executed more than one time
to a file, then total block count of filesystem and block count of the
file could be incorrect and damaged.

We have to execute releasing compress blocks only one time for a file
without being interfered by writepages path.
---

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c