Re: [PATCH] btrfs: Get rid of the confusing btrfs_file_extent_inline_len()

2018-06-21 Thread David Sterba
On Wed, Jun 06, 2018 at 03:41:49PM +0800, Qu Wenruo wrote: > We used to call btrfs_file_extent_inline_len() to get the uncompressed > data size of an inlined extent. > > However this function is hiding evil, for compressed extent, it has no > choice but to directly read out ram_bytes from btrfs_fi

[PATCH] btrfs: Get rid of the confusing btrfs_file_extent_inline_len()

2018-06-06 Thread Qu Wenruo
We used to call btrfs_file_extent_inline_len() to get the uncompressed data size of an inlined extent. However this function is hiding evil, for compressed extent, it has no choice but to directly read out ram_bytes from btrfs_file_extent_item. While for uncompressed extent, it uses item size to c