linux/Documentation
Darrick J. Wong 880b957785 fs: distinguish between user initiated freeze and kernel initiated freeze
Userspace can freeze a filesystem using the FIFREEZE ioctl or by
suspending the block device; this state persists until userspace thaws
the filesystem with the FITHAW ioctl or resuming the block device.
Since commit 18e9e5104f ("Introduce freeze_super and thaw_super for
the fsfreeze ioctl") we only allow the first freeze command to succeed.

The kernel may decide that it is necessary to freeze a filesystem for
its own internal purposes, such as suspends in progress, filesystem fsck
activities, or quiescing a device prior to removal.  Userspace thaw
commands must never break a kernel freeze, and kernel thaw commands
shouldn't undo userspace's freeze command.

Introduce a couple of freeze holder flags and wire it into the
sb_writers state.  One kernel and one userspace freeze are allowed to
coexist at the same time; the filesystem will not thaw until both are
lifted.

I wonder if the f2fs/gfs2 code should be using a kernel freeze here, but
for now we'll use FREEZE_HOLDER_USERSPACE to preserve existing
behaviors.

Cc: mcgrof@kernel.org
Cc: jack@suse.cz
Cc: hch@infradead.org
Cc: ruansy.fnst@fujitsu.com
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
2023-07-17 09:00:09 -07:00
..
ABI Merge branch '6.5/scsi-staging' into 6.5/scsi-fixes 2023-07-11 12:15:15 -04:00
accel
accounting
admin-guide A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
arch ARM64: 2023-07-03 15:32:22 -07:00
block
bpf sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
cdrom
core-api workqueue: Changes for v6.5 2023-06-27 16:32:52 -07:00
cpu-freq
crypto docs: crypto: async-tx-api: fix typo in struct name 2023-06-09 01:59:30 -06:00
dev-tools - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
devicetree linux-watchdog 6.5-rc2 tag 2023-07-10 10:04:26 -07:00
doc-guide docs/doc-guide: Clarify how to write tables 2023-06-09 01:57:56 -06:00
driver-api Fixes for pci_clean_master, error handling in driver inits, and various 2023-07-09 09:35:51 -07:00
fault-injection lkdtm: replace ll_rw_block with submit_bh 2023-05-31 20:26:57 +01:00
fb
features LoongArch: Add jump-label implementation 2023-06-29 20:58:44 +08:00
filesystems fs: distinguish between user initiated freeze and kernel initiated freeze 2023-07-17 09:00:09 -07:00
firmware_class
firmware-guide
fpga
gpu Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
hid
hwmon hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO 2023-06-24 20:17:18 -07:00
i2c i2c: i801: Add support for Intel Meteor Lake PCH-S 2023-06-05 10:13:48 +02:00
iio
images
infiniband
input
isdn
kbuild kernel-doc: don't let V=1 change outcome 2023-06-10 16:39:02 +09:00
kernel-hacking
leds - New Drivers 2023-07-03 11:26:05 -07:00
litmus-tests
livepatch
locking
loongarch
maintainer Documentation: update git configuration for Link: tag 2023-06-21 09:15:15 -06:00
mhi
mips
misc-devices Documentation: Add TI TPS6594 PFSM 2023-06-15 13:41:53 +02:00
mm - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
netlabel
netlink netlink: specs: add display hints to ovs_flow 2023-06-24 15:45:49 -07:00
networking Including fixes from bluetooth, bpf and wireguard. 2023-07-05 15:44:45 -07:00
nvdimm
nvme
PCI Merge branch 'pci/controller/endpoint' 2023-06-26 13:00:00 -05:00
pcmcia
peci
power
powerpc Documentation: Document PowerPC kernel DEXCR interface 2023-06-19 17:36:27 +10:00
process Networking fixes for 6.5-rc2, including fixes from netfilter, 2023-07-13 14:21:22 -07:00
RCU
riscv Documentation: RISC-V: hwprobe: Fix a formatting error 2023-07-11 10:43:51 -07:00
rust docs: rust: point directly to the standalone installers 2023-05-31 18:52:35 +02:00
s390
scheduler sched/deadline: Update GRUB description in the documentation 2023-06-16 22:08:12 +02:00
scsi
security
sound ALSA: compress: allow setting codec params after next track 2023-06-21 07:28:31 +02:00
sphinx
sphinx-static
spi
staging
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
timers
tools Documentation: Add tools/rtla timerlat -u option documentation 2023-06-13 16:43:37 -04:00
trace Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
translations A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
usb
userspace-api media updates for v6.5-rc1 2023-07-05 10:42:32 -07:00
virt A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
w1
watchdog
wmi platform/x86: dell-ddv: Fix mangled list in documentation 2023-07-11 12:15:30 +02:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00