Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-16 Thread Nikolay Borisov
On 16.10.2017 17:17, David Sterba wrote: > You confused me first by the bitwise operators here, while the patch is > actually for the logical ones (and correct). actualy I used ~ as the "not" and ^ as "and" rather than XOR. Not A AND Not B == NOT(A or B) that's what I wanted to express ... -- T

Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-16 Thread David Sterba
On Thu, Oct 12, 2017 at 12:03:31PM +0300, Nikolay Borisov wrote: > > > On 12.10.2017 11:43, Anand Jain wrote: > > A cleanup patch, use need_full_stripe() to replace the open code. > > The code is equivalent by merit of De Morgan's law (I had to actually go > look up the equivalence classes befor

Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Nikolay Borisov
On 12.10.2017 11:43, Anand Jain wrote: > A cleanup patch, use need_full_stripe() to replace the open code. The code is equivalent by merit of De Morgan's law (I had to actually go look up the equivalence classes before I convinced myself it was correct) ~A ^ ~B == ~(A or B) Reviewed-by: Nikola

Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Qu Wenruo
On 2017年10月12日 16:43, Anand Jain wrote: A cleanup patch, use need_full_stripe() to replace the open code. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Thanks, Qu --- fs/btrfs/volumes.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/v

[PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Anand Jain
A cleanup patch, use need_full_stripe() to replace the open code. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 3b3ba1ecd88b..f5dee43f8f3f 100644 --- a/fs/btrfs/