Re: [PATCH 1/2] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions
On Friday, December 02, 2016 10:03:06 AM Qu Wenruo wrote: > Introduce a new parameter, struct extent_changeset for > btrfs_qgroup_reserved_data() and its callers. > > Such extent_changeset was used in btrfs_qgroup_reserve_data() to record > which range it reserved in current reserve, so it can free it at error > path. > > The reason we need to export it to callers is, at buffered write error > path, without knowing what exactly which range we reserved in current > allocation, we can free space which is not reserved by us. > > This will lead to qgroup reserved space underflow. The changes look good to me. Reviewed-by: Chandan Rajendra-- chandan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions
At 12/08/2016 10:29 PM, Chandan Rajendra wrote: On Friday, December 02, 2016 10:03:06 AM Qu Wenruo wrote: Introduce a new parameter, struct extent_changeset for btrfs_qgroup_reserved_data() and its callers. Such extent_changeset was used in btrfs_qgroup_reserve_data() to record which range it reserved in current reserve, so it can free it at error path. The reason we need to export it to callers is, at buffered write error path, without knowing what exactly which range we reserved in current allocation, we can free space which is not reserved by us. This will lead to qgroup reserved space underflow. Hi Qu, On which git tree are these patches based off? This patch fails to apply cleanly on kdave/for-next branch that is available as of today. It's based on David's for-next-20161125 branch, but with several other qgroup fixes as prerequisite. btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quota enable btrfs: qgroup: Return actually freed bytes for qgroup release or free data btrfs: Add trace point for qgroup reserved space btrfs: Add WARN_ON for qgroup reserved underflow Or you can get the branch from my github repo: https://github.com/adam900710/linux.git qgroup_fixes Thanks, Qu -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions
On Friday, December 02, 2016 10:03:06 AM Qu Wenruo wrote: > Introduce a new parameter, struct extent_changeset for > btrfs_qgroup_reserved_data() and its callers. > > Such extent_changeset was used in btrfs_qgroup_reserve_data() to record > which range it reserved in current reserve, so it can free it at error > path. > > The reason we need to export it to callers is, at buffered write error > path, without knowing what exactly which range we reserved in current > allocation, we can free space which is not reserved by us. > > This will lead to qgroup reserved space underflow. > Hi Qu, On which git tree are these patches based off? This patch fails to apply cleanly on kdave/for-next branch that is available as of today. -- chandan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html