Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-31 Thread Dennis Zhou
On Thu, Jan 31, 2019 at 05:00:10PM +0100, David Sterba wrote: > On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote: > > It is very easy to miss places that rely on a certain bitshifting for > > decyphering the type_level overloading. Make macros handle this instead. > > This encoding was

Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-31 Thread David Sterba
On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote: > It is very easy to miss places that rely on a certain bitshifting for > decyphering the type_level overloading. Make macros handle this instead. This encoding was a simple way to introduce the combined type and level for zlib and it co

Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-29 Thread Omar Sandoval
On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote: > It is very easy to miss places that rely on a certain bitshifting for > decyphering the type_level overloading. Make macros handle this instead. > > Signed-off-by: Dennis Zhou > --- > fs/btrfs/compression.c | 2 +- > fs/btrfs/compres

Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-29 Thread Josef Bacik
On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote: > It is very easy to miss places that rely on a certain bitshifting for > decyphering the type_level overloading. Make macros handle this instead. > > Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-28 Thread Nikolay Borisov
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote: > It is very easy to miss places that rely on a certain bitshifting for > decyphering the type_level overloading. Make macros handle this instead. > > Signed-off-by: Dennis Zhou Reviewed-by: Nikolay Borisov

[PATCH 01/11] btrfs: add macros for compression type and level

2019-01-28 Thread Dennis Zhou
It is very easy to miss places that rely on a certain bitshifting for decyphering the type_level overloading. Make macros handle this instead. Signed-off-by: Dennis Zhou --- fs/btrfs/compression.c | 2 +- fs/btrfs/compression.h | 3 +++ fs/btrfs/zlib.c| 2 +- 3 files changed, 5 insertion