linux-stable/include
Qu Wenruo 733e03a0b2 btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans
Btrfs uses 2 different methods to reseve metadata qgroup space.

1) Reserve at btrfs_start_transaction() time
   This is quite straightforward, caller will use the trans handler
   allocated to modify b-trees.

   In this case, reserved metadata should be kept until qgroup numbers
   are updated.

2) Reserve by using block_rsv first, and later btrfs_join_transaction()
   This is more complicated, caller will reserve space using block_rsv
   first, and then later call btrfs_join_transaction() to get a trans
   handle.

   In this case, before we modify trees, the reserved space can be
   modified on demand, and after btrfs_join_transaction(), such reserved
   space should also be kept until qgroup numbers are updated.

Since these two types behave differently, split the original "META"
reservation type into 2 sub-types:

  META_PERTRANS:
    For above case 1)

  META_PREALLOC:
    For reservations that happened before btrfs_join_transaction() of
    case 2)

NOTE: This patch will only convert existing qgroup meta reservation
callers according to its situation, not ensuring all callers are at
correct timing.
Such fix will be added in later patches.

Signed-off-by: Qu Wenruo <wqu@suse.com>
[ update comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-31 01:41:14 +02:00
..
acpi ACPICA: Update version to 20180105 2018-02-06 10:32:13 +01:00
asm-generic mm/vmalloc: add interfaces to free unmapped page table 2018-03-22 17:07:01 -07:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-31 14:22:45 -08:00
drm drm/nouveau: prefer XBGR2101010 for addfb ioctl 2018-02-23 13:51:42 +01:00
dt-bindings MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
keys
kvm KVM: arm/arm64: Reset mapped IRQs on VM reset 2018-03-14 18:29:14 +00:00
linux libcrc32c: Add crc32c_impl function 2018-03-26 15:09:38 +02:00
math-emu
media media: dvb: update buffer mmaped flags and frame counter 2018-02-23 11:44:08 -05:00
memory
misc powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
net mac80211: add ieee80211_hw flag for QoS NDP support 2018-03-21 10:56:18 +01:00
pcmcia
ras
rdma RDMA/verbs: Remove restrack entry from XRCD structure 2018-03-19 14:10:30 -06:00
scsi SCSI fixes on 20180306 2018-03-07 10:50:15 -08:00
soc ARC fixes for 4.16-rc4 2018-03-01 14:32:23 -08:00
sound Merge branch 'topic/fixes' into for-linus 2018-02-12 09:36:26 +01:00
target
trace btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans 2018-03-31 01:41:14 +02:00
uapi media fixes for v4.16-rc7 2018-03-23 10:59:38 -07:00
video fbdev changes for v4.16: 2018-02-07 13:10:43 -08:00
xen