btrfs: embed extent_changeset::range_changed to the structure
authorDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2017 12:42:29 +0000 (13:42 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 17 Feb 2017 11:03:49 +0000 (12:03 +0100)
commit53d3235995b3f87754a42de24d707f158c1b3b40
treea98d862301bdf55fe271c4ebea2fb4825d36b915
parent9d037933861805799db4edfd075412a39e2549f4
btrfs: embed extent_changeset::range_changed to the structure

We can embed range_changed to the extent changeset to address following
problems:

- no need to allocate ulist dynamically, we also get rid of the GFP_NOFS
  for free
- fix lack of allocation failure checking in btrfs_qgroup_reserve_data

The stack consuption where extent_changeset is used slightly increases:

before: 16
after: 16 - 8 (for pointer) + 32 (sizeof ulist) = 40

Which is bearable.

Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/qgroup.c