No description
Find a file
Filipe Manana cef7820d6a btrfs: fix missed extent on fsync after dropping extent maps
When dropping extent maps for a range, through btrfs_drop_extent_cache(),
if we find an extent map that starts before our target range and/or ends
before the target range, and we are not able to allocate extent maps for
splitting that extent map, then we don't fail and simply remove the entire
extent map from the inode's extent map tree.

This is generally fine, because in case anyone needs to access the extent
map, it can just load it again later from the respective file extent
item(s) in the subvolume btree. However, if that extent map is new and is
in the list of modified extents, then a fast fsync will miss the parts of
the extent that were outside our range (that needed to be split),
therefore not logging them. Fix that by marking the inode for a full
fsync. This issue was introduced after removing BUG_ON()s triggered when
the split extent map allocations failed, done by commit 7014cdb493
("Btrfs: btrfs_drop_extent_cache should never fail"), back in 2012, and
the fast fsync path already existed but was very recent.

Also, in the case where we could allocate extent maps for the split
operations but then fail to add a split extent map to the tree, mark the
inode for a full fsync as well. This is not supposed to ever fail, and we
assert that, but in case assertions are disabled (CONFIG_BTRFS_ASSERT is
not set), it's the correct thing to do to make sure a fast fsync will not
miss a new extent.

CC: stable@vger.kernel.org # 5.15+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-09-29 17:08:30 +02:00
arch arm64 fixes for -rc7 2022-09-23 15:28:51 -07:00
block block-6.0-2022-09-22 2022-09-24 08:22:53 -07:00
certs certs: make system keyring depend on built-in x509 parser 2022-09-24 04:31:18 +09:00
crypto crypto: blake2b: effectively disable frame size warning 2022-08-10 17:59:11 -07:00
Documentation I2C driver bugfixes for mlxbf and imx, a few documentation fixes after 2022-09-25 08:44:46 -07:00
drivers dax-and-nvdimm-fixes-v6.0-final 2022-09-25 08:53:52 -07:00
fs btrfs: fix missed extent on fsync after dropping extent maps 2022-09-29 17:08:30 +02:00
include btrfs: stop tracking failed reads in the I/O tree 2022-09-26 12:28:05 +02:00
init arm64 fixes for -rc3 2022-08-26 11:32:53 -07:00
io_uring io_uring-6.0-2022-09-23 2022-09-24 08:27:08 -07:00
ipc Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
kernel Cgroup fixes for v6.0-rc6 2022-09-24 08:36:10 -07:00
lib Makefile.debug: re-enable debug info for .S files 2022-09-24 11:19:19 +09:00
LICENSES
mm mm: export balance_dirty_pages_ratelimited_flags() 2022-09-26 12:28:07 +02:00
net Including fixes from wifi, netfilter and can. 2022-09-22 10:58:13 -07:00
samples Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
scripts Makefile.debug: re-enable debug info for .S files 2022-09-24 11:19:19 +09:00
security Landlock fix for v6.0-rc4 2022-09-02 15:24:08 -07:00
sound Revert "ALSA: usb-audio: Split endpoint setups for hw_params and prepare" 2022-09-20 13:40:18 +02:00
tools dax-and-nvdimm-fixes-v6.0-final 2022-09-25 08:53:52 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() 2022-08-19 04:05:43 -04:00
.clang-format PCI/DOE: Add DOE mailbox support functions 2022-07-19 15:38:04 -07:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes
.gitignore kbuild: split the second line of *.mod into *.usyms 2022-05-08 03:16:59 +09:00
.mailmap Devicetree fixes for v6.0, take 2: 2022-09-14 10:22:39 +01:00
COPYING
CREDITS drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
Kbuild
Kconfig
MAINTAINERS I2C driver bugfixes for mlxbf and imx, a few documentation fixes after 2022-09-25 08:44:46 -07:00
Makefile Linux 6.0-rc7 2022-09-25 14:01:02 -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.