No description
Find a file
Zhang Yi 4ba3fcdde7 jbd2,ext4: add a shrinker to release checkpointed buffers
Current metadata buffer release logic in bdev_try_to_free_page() have
a lot of use-after-free issues when umount filesystem concurrently, and
it is difficult to fix directly because ext4 is the only user of
s_op->bdev_try_to_free_page callback and we may have to add more special
refcount or lock that is only used by ext4 into the common vfs layer,
which is unacceptable.

One better solution is remove the bdev_try_to_free_page callback, but
the real problem is we cannot easily release journal_head on the
checkpointed buffer, so try_to_free_buffers() cannot release buffers and
page under memory pressure, which is more likely to trigger
out-of-memory. So we cannot remove the callback directly before we find
another way to release journal_head.

This patch introduce a shrinker to free journal_head on the checkpointed
transaction. After the journal_head got freed, try_to_free_buffers()
could free buffer properly.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210610112440.3438139-6-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2021-06-24 10:54:49 -04:00
arch ARM: SoC fixes for 5.13 2021-06-06 13:00:36 -07:00
block
certs
crypto
Documentation ext4: update journal documentation 2021-06-22 21:34:17 -04:00
drivers SCSI fixes on 20210606 2021-06-06 15:39:56 -07:00
fs jbd2,ext4: add a shrinker to release checkpointed buffers 2021-06-24 10:54:49 -04:00
include jbd2,ext4: add a shrinker to release checkpointed buffers 2021-06-24 10:54:49 -04:00
init pid: take a reference when initializing cad_pid 2021-06-05 08:58:11 -07:00
ipc
kernel
lib lib: crc64: fix kernel-doc warning 2021-06-05 08:58:12 -07:00
LICENSES
mm mm, hugetlb: fix simple resv_huge_pages underflow on UFFDIO_COPY 2021-06-05 08:58:12 -07:00
net
samples
scripts
security
sound
tools Merge branch 'akpm' (patches from Andrew) 2021-06-05 10:55:41 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: use private address for Michel Lespinasse 2021-06-05 08:58:12 -07:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.13-rc5 2021-06-06 15:47:27 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.