Re: [PATCH 3/4] btrfs: handle ENOMEM from btrfs_insert_dir_item() without aborting

From: Jeff Layton

Date: Tue Jul 21 2026 - 09:00:02 EST


On Fri, 2026-07-17 at 17:13 -0700, Boris Burkov wrote:
>
> >
> > One thought: It looks like the main allocation in that codepath is
> > btrfs_alloc_path()? We could consider preallocating that too -- maybe
> > stash it in a new pointer in btrfs_trans_handle?
> >
> > Thanks! This is good food for thought.
>
> Take a peek at https://lore.kernel.org/linux-btrfs/cover.1782249000.git.boris@xxxxxx/
>
> which I need to RESEND :)

I think basing this series on top of yours would make the most sense.
That should take care of your main concern with the later failure mode
since your series should fix most of those cases. I'll plan to rebase
this on top of that series once you resend it.

Thanks!
--
Jeff Layton <jlayton@xxxxxxxxxx>