OSDN Git Service

f2fs: don't allow any writes on aborted atomic writes
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 27 Jul 2018 09:15:11 +0000 (18:15 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 18 Sep 2018 20:39:19 +0000 (13:39 -0700)
commit06da8b3d9ba5904933b889f4a78987675d02c19b
tree35841957c91762347260769e0c9c7e38f2997846
parenta2ee1be2b06a82a248c3591f8c3ffd4fa1eee074
f2fs: don't allow any writes on aborted atomic writes

In order to prevent abusing atomic writes by abnormal users, we've added a
threshold, 20% over memory footprint, which disallows further atomic writes.
Previously, however, SQLite doesn't know the files became normal, so that
it could write stale data and commit on revoked normal database file.

Once f2fs detects such the abnormal behavior, this patch tries to avoid further
writes in write_begin().

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/file.c