Re: [PATCH v2 02/12] btrfs: implement a nowait option for tree searches

Josef Bacik
2022-09-08T13:19:30Z

On Wed, Sep 07, 2022 at 05:26:06PM -0700, Stefan Roesch wrote:
> From: Josef Bacik <josef@toxicpanda.com>
>
> For NOWAIT IOCB's we'll need a way to tell search to not wait on locks
> or anything. Accomplish this by adding a path->nowait flag that will
> use trylocks and skip reading of metadata, returning -EWOULDBLOCK in
> either of these cases. For now we only need this for reads, so only the
> read side is handled. Add an ASSERT() to catch anybody trying to use
> this for writes so they know they'll have to implement the write side.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Stefan Roesch <shr@fb.com>

Should update my changelog to say use -EAGAIN instead of -EWOULDBLOCK. Thanks,

Josef