]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Explicitly reserve space for devreplace item
authorNikolay Borisov <nborisov@suse.com>
Tue, 14 May 2019 10:54:43 +0000 (13:54 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:54 +0000 (13:34 +0200)
commit7505b9b1cef5113e961f317f8b0efed4f30d77fb
treef015a2e619332c60cf834a718dd57ef54113b191
parentbf4e7cc6b1c0402653c6345f14a67485566ab533
btrfs: Explicitly reserve space for devreplace item

Part of device replace involves writing an item to the device root
containing information about pending replace operations. Currently space
for this item is not being explicitly reserved so this works thanks to
presence of global reserve. While not fatal it's not a good practice.
Let's be explicit about space requirement of device replace and reserve
space when starting the transaction.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c