From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cn.fujitsu.com ([59.151.112.132]:10220 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755171AbdELDau (ORCPT ); Thu, 11 May 2017 23:30:50 -0400 From: Qu Wenruo To: , CC: Subject: [RFC PATCH v3.1 0/6] Qgroup fixes, Non-stack version Date: Fri, 12 May 2017 11:30:40 +0800 Message-ID: <20170512033046.31981-1-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-btrfs-owner@vger.kernel.org List-ID: The remaining qgroup fixes patches, based on the Chris' for-linus-4.12 branch with commit 9bcaaea7418d09691f1ffab5c49aacafe3eef9d0 as base. Can be fetched from github: https://github.com/adam900710/linux/tree/qgroup_fixes_non_stack Despite the 5th patch, patches are mostly unchanged. Only minor conflicts are addressed in this update. The 5th patch chooses a different method to reduce stack memory usage. Instead of allocating extent_changeset structure on stack, this time only a pointer of extent_changeset is allocated on stack. And real extent_changeset is allocated inside btrfs_qgroup_reserve_data(). The impact to stack memory usage of quota disabled case is reduced to minimal. While the error handler routine is not affected either. v2: Add reviewed-by tag for 2nd patch Update the first patch to follow the new trace point standard RFC v3: Use non-stack (dyanamic allocation) for extent_changeset structure, in 5th patch, to reduce impact for quota disabled cases. Rebase to latest for-linus-4.12 branch. RFC v3.1: Update comment to include the newly introduced parameter Use init/release function to replace open coded ulist_init/release(). Qu Wenruo (6): btrfs: qgroup: Add quick exit for non-fs extents btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function btrfs: qgroup: Return actually freed bytes for qgroup release or free data btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quota enable btrfs: qgroup: Introduce extent changeset for qgroup reserve functions btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges fs/btrfs/ctree.h | 12 ++- fs/btrfs/extent-tree.c | 37 +++++---- fs/btrfs/extent_io.h | 36 ++++++++- fs/btrfs/file.c | 41 ++++++---- fs/btrfs/inode-map.c | 4 +- fs/btrfs/inode.c | 58 ++++++++----- fs/btrfs/ioctl.c | 9 ++- fs/btrfs/qgroup.c | 215 ++++++++++++++++++++++++++++++++++++------------- fs/btrfs/qgroup.h | 8 +- fs/btrfs/relocation.c | 12 +-- fs/btrfs/transaction.c | 10 --- 11 files changed, 303 insertions(+), 139 deletions(-) -- 2.12.2