Thread (10 messages) 10 messages, 4 authors, 2020-05-14

Re: [PATCH 2/2] btrfs: Don't set SHAREABLE flag for data reloc tree

From: David Sterba <hidden>
Date: 2020-05-13 13:52:46

On Wed, May 13, 2020 at 02:49:11PM +0800, Qu Wenruo wrote:
quoted
quoted
 {
 	struct inode *inode = NULL;
 	struct btrfs_trans_handle *trans;
-	struct btrfs_root *root;
+	struct btrfs_root *root = fs_info->dreloc_root;
So why haven't you added code in btrfs_get_fs_root to quickly return a
refcounted root and instead reference it without incrementing the refcount?
This is exactly the same as how we handle fs_root.
And since the lifespan of data reloc root will be the same as the fs, I
don't think there is any need for it to be grabbed each time we need it.
I'd vote for some consistency in the refcounting, ie. even if it's for
the same life span as the filesystem, set the reference.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help