Skip to contentSkip to conversation

btrfs: Fix wrong btrfs_delalloc_release_extents parameter

PATCH In review Qu Wenruo 2 participants 2 messages Apr 17, 2018 Btrfs file system

lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

PATCH 1/1 btrfs: Fix wrong btrfs_delalloc_release_extents parameter

Commit 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc") merged into mainline is not the latest version submitted to mail list in Dec 2017.

It has a fatal wrong @qgroup_free parameter, which results increasing qgroup metadata pertrans reserved space, and causing a lot of early EDQUOT.

Fix it by applying the correct diff on top of current branch.

Fixes 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc")
---
 fs/btrfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/file.c +1 -1
index dd1b79750d6a..9701aa7361f3 100644
@@ -1763,7 +1763,7 @@ static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb,
 			unlock_extent_cached(&BTRFS_I(inode)->io_tree,
 					     lockstart, lockend, &cached_state);
 		btrfs_delalloc_release_extents(BTRFS_I(inode), reserve_bytes,
-					       (ret != 0));
+					       true);
 		if (ret) {
 			btrfs_drop_pages(pages, num_pages);
 			break;
Signature · 1 line
2.17.0
#1 lore raw
Quoted 11 lines · Qu Wenruo

Commit 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc") merged into mainline is not the latest version submitted to mail list in Dec 2017.

It has a fatal wrong @qgroup_free parameter, which results increasing qgroup metadata pertrans reserved space, and causing a lot of early EDQUOT.

Fix it by applying the correct diff on top of current branch.

Fixes 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc")

Added to 4.17 queue, thanks.