linux-stable/include
Boris Burkov bd7c1ea3a3 btrfs: qgroup: check generation when recording simple quota delta
Simple quotas count extents only from the moment the feature is enabled.
Therefore, if we do something like:

1. create subvol S
2. write F in S
3. enable quotas
4. remove F
5. write G in S

then after 3. and 4. we would expect the simple quota usage of S to be 0
(putting aside some metadata extents that might be written) and after
5., it should be the size of G plus metadata. Therefore, we need to be
able to determine whether a particular quota delta we are processing
predates simple quota enablement.

To do this, store the transaction id when quotas were enabled. In
fs_info for immediate use and in the quota status item to make it
recoverable on mount. When we see a delta, check if the generation of
the extent item is less than that of quota enablement. If so, we should
ignore the delta from this extent.

Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-10-12 16:44:11 +02:00
..
acpi
asm-generic hyperv-fixes for v6.6-rc6 2023-10-10 11:01:21 -07:00
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux \n 2023-10-11 14:21:15 -07:00
math-emu
media
memory
misc
net net: mana: Fix oversized sge0 for GSO packets 2023-10-05 11:45:06 +02:00
pcmcia
ras
rdma
rv
scsi
soc
sound
target
trace btrfs: merge ordered work callbacks in btrfs_work into one 2023-10-12 16:44:10 +02:00
uapi btrfs: qgroup: check generation when recording simple quota delta 2023-10-12 16:44:11 +02:00
ufs
vdso
video
xen