Re: [PATCH v2 1/2] btrfs: Factor out read portion of btrfs_get_blocks_direct

2018-04-11 Thread Nikolay Borisov
On 12.04.2018 04:33, Liu Bo wrote: > On Wed, Apr 11, 2018 at 12:54 AM, Nikolay Borisov wrote: >> Currently this function handles both the READ and WRITE dio cases. This >> is facilitated by a bunch of 'if' statements, a goto short-circuit >> statement and a very perverse aliasing of "!created"(R

Re: [PATCH v2 1/2] btrfs: Factor out read portion of btrfs_get_blocks_direct

2018-04-11 Thread Liu Bo
On Wed, Apr 11, 2018 at 12:54 AM, Nikolay Borisov wrote: > Currently this function handles both the READ and WRITE dio cases. This > is facilitated by a bunch of 'if' statements, a goto short-circuit > statement and a very perverse aliasing of "!created"(READ) case > by setting lockstart = lockend

[PATCH v2 1/2] btrfs: Factor out read portion of btrfs_get_blocks_direct

2018-04-11 Thread Nikolay Borisov
Currently this function handles both the READ and WRITE dio cases. This is facilitated by a bunch of 'if' statements, a goto short-circuit statement and a very perverse aliasing of "!created"(READ) case by setting lockstart = lockend and checking for lockstart < lockend for detecting the write. Let