linux-stable/Documentation
Lukas Czerner 0d94230343 fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE
commit cbfecb927f upstream.

Currently the I_DIRTY_TIME will never get set if the inode already has
I_DIRTY_INODE with assumption that it supersedes I_DIRTY_TIME.  That's
true, however ext4 will only update the on-disk inode in
->dirty_inode(), not on actual writeback. As a result if the inode
already has I_DIRTY_INODE state by the time we get to
__mark_inode_dirty() only with I_DIRTY_TIME, the time was already filled
into on-disk inode and will not get updated until the next I_DIRTY_INODE
update, which might never come if we crash or get a power failure.

The problem can be reproduced on ext4 by running xfstest generic/622
with -o iversion mount option.

Fix it by allowing I_DIRTY_TIME to be set even if the inode already has
I_DIRTY_INODE. Also make sure that the case is properly handled in
writeback_single_inode() as well. Additionally changes in
xfs_fs_dirty_inode() was made to accommodate for I_DIRTY_TIME in flag.

Thanks Jan Kara for suggestions on how to make this work properly.

Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220825100657.44217-1-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 12:34:27 +02:00
..
ABI Documentation/ABI: Mention retbleed vulnerability info file for sysfs 2022-08-31 17:16:50 +02:00
accounting sched/psi: report zeroes for CPU full at the system level 2022-06-09 10:22:48 +02:00
admin-guide x86/bugs: Add "unknown" reporting for MMIO Stale Data 2022-08-31 17:16:47 +02:00
arm Documentation: arm: marvell: Add 88F6825 model into list 2021-08-24 13:26:32 -06:00
arm64 arm64: errata: Add Cortex-A55 to the repeat tlbi list 2022-10-26 12:34:24 +02:00
block Documentation: block: blk-mq: Fix small typo in multi-queue docs 2021-08-24 13:30:00 -06:00
bpf
cdrom
core-api Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE"" 2022-04-08 14:24:13 +02:00
cpu-freq cpufreq: Remove ready() callback 2021-09-02 18:04:17 +02:00
crypto
dev-tools kfence: default to dynamic branch instead of static keys mode 2021-11-12 15:05:49 +01:00
devicetree ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer 2022-10-12 09:53:27 +02:00
doc-guide
driver-api firmware: sysfb: Add sysfb_disable() helper function 2022-07-21 21:24:35 +02:00
fault-injection Char / Misc driver changes for 5.15-rc1 2021-09-01 08:35:06 -07:00
fb
features RISC-V Patches for the 5.15 Merge Window, Part 2 2021-09-11 14:29:42 -07:00
filesystems fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE 2022-10-26 12:34:27 +02:00
firmware-guide Documentation: ACPI: EINJ: Fix obsolete example 2022-08-25 11:40:01 +02:00
firmware_class
fpga
gpu drm/i915/display: Move DRRS code its own file 2022-03-08 19:12:40 +01:00
hid
hwmon hwmon: (lm90) Add basic support for TI TMP461 2021-12-29 12:28:48 +01:00
i2c
ia64
ide
iio
infiniband
input Input: iforce - add support for Boeder Force Feedback Wheel 2022-09-20 12:39:45 +02:00
isdn
kbuild Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
kernel-hacking docs: kernel-hacking: Remove inappropriate text 2021-09-03 15:56:45 -06:00
leds
litmus-tests
livepatch
locking Documentation/locking/locktypes: Update migrate_disable() bits. 2021-12-14 10:57:18 +01:00
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking Documentation: fix sctp_wmem in ip-sysctl.rst 2022-08-03 12:03:49 +02:00
nios2
nvdimm
openrisc
parisc
PCI pci-v5.15-changes 2021-09-07 19:13:42 -07:00
pcmcia
power Documentation: power: include kernel-doc in Energy Model doc 2021-09-07 21:17:28 +02:00
powerpc powerpc/doc: Fix htmldocs errors 2021-08-27 00:56:34 +10:00
process docs: update mediator information in CoC docs 2022-10-12 09:53:26 +02:00
RCU
riscv
s390
scheduler
scsi
security
sh
sound ALSA: usb-audio: Add quirk bits for enabling/disabling generic implicit fb 2022-06-09 10:22:41 +02:00
sparc
sphinx docs: sphinx/requirements: Limit jinja2<3.1 2022-04-08 14:22:49 +02:00
sphinx-static
spi
staging
target
timers
trace tracing: Add ustring operation to filtering string pointers 2022-03-08 19:12:33 +01:00
translations Merge branch 'gcc-min-version-5.1' (make gcc-5.1 the minimum version) 2021-09-13 10:43:04 -07:00
tty/device_drivers serial: 8250: Add proper clock handling for OxSemi PCIe devices 2022-08-17 14:24:23 +02:00
usb
userspace-api media: hevc: Embedded indexes in RPS 2022-08-17 14:23:31 +02:00
virt ARM: 2021-09-07 13:40:51 -07:00
vm Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
w1
watchdog
x86 Another collection of documentation patches, mostly fixes but also includes 2021-09-08 16:28:14 -07:00
xtensa
.gitignore
arch.rst
asm-annotations.rst
atomic_bitops.txt locking/atomic: Make test_and_*_bit() ordered on failure 2022-08-25 11:39:54 +02:00
atomic_t.txt
Changes
CodingStyle
conf.py docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0 2022-06-09 10:23:30 +02:00
COPYING-logo
docutils.conf
dontdiff
index.rst
Kconfig
logo.gif
Makefile
memory-barriers.txt
SubmittingPatches
watch_queue.rst