Commit Graph

6 Commits

Author SHA1 Message Date
Jaegeuk Kim
77aa322fb7 Remove unnecessary config.h
Instead, we should use <config.h> generated by configure.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-15 11:29:16 +08:00
Robin Hsu
e66e4c1f3b fsck: prevent buffer overrun in quota code
A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by fsck.

To fix it, quota file sizes are checked against real allocated
block index tables (inode, direct nodes, indirect nodes, double
indirect nodes).  If the size mismatches, the quota file is considered
corrupted and will be regenerated.

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-06-23 16:58:44 -07:00
Chao Yu
29e035d5c4 fsck.f2fs: fix to propagate error of write_dquots()
Propagate correct error number from write_dquots() to
quota_write_inode().

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-08-27 14:51:05 -07:00
Jaegeuk Kim
83c64019e8 fsck.f2fs: don't allocate new blocks on unclean shutdown
We have to keep data for roll-forward recovery. Without this patch, we're
able to lose there-in data by quota overwrites.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-11-21 11:38:23 -08:00
Jaegeuk Kim
bbdbca4e22 fsck.f2fs: add an option to preserve quota limits
If it detects quota file errors, we can see insane quota limits. In order
to recover that, this patch adds an option to reset them as zeros.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-11-11 18:01:07 -08:00
Hyojun Kim
6c6bb35c89 fsck.f2fs: support quota
This patch let fsck to check and fix quota file contents.

Signed-off-by: Hyojun Kim <hyojun@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-06 20:07:40 -08:00