Skip to content

Commit a7d16d9

Browse files
josefbacikkdave
authored andcommitted
btrfs: do not warn for free space inode in cow_file_range
This is a long time leftover from when I originally added the free space inode, the point was to catch cases where we weren't honoring the NOCOW flag. However there exists a race with relocation, if we allocate our free space inode in a block group that is about to be relocated, we could trigger the COW path before the relocation has the opportunity to find the extents and delete the free space cache. In production where we have auto-relocation enabled we're seeing this WARN_ON_ONCE() around 5k times in a 2 week period, so not super common but enough that it's at the top of our metrics. We're properly handling the error here, and with us phasing out v1 space cache anyway just drop the WARN_ON_ONCE. Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 75a36a7 commit a7d16d9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/btrfs/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,6 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
11281128
int ret = 0;
11291129

11301130
if (btrfs_is_free_space_inode(inode)) {
1131-
WARN_ON_ONCE(1);
11321131
ret = -EINVAL;
11331132
goto out_unlock;
11341133
}

0 commit comments

Comments
 (0)