On Thu, Dec 13, 2018 at 03:11:11PM +0100, David Sterba wrote:
> On Mon, Dec 03, 2018 at 10:24:51AM -0500, Josef Bacik wrote:
> > v1->v2:
> > - addressed comments from reviewers.
> > - fixed a bug in patch 6 that was introduced because of changes to upstream.
> >
> > -- Original message --
> >
> > The delayed refs rsv patches exposed a bunch of issues in our enospc
> > infrastructure that needed to be addressed. These aren't really one coherent
> > group, but they are all around flushing and reservations.
> > may_commit_transaction() needed to be updated a little bit, and we needed to add
> > a new state to force chunk allocation if things got dicey. Also because we can
> > end up needed to reserve a whole bunch of extra space for outstanding delayed
> > refs we needed to add the ability to only ENOSPC tickets that were too big to
> > satisfy, instead of failing all of the tickets. There's also a fix in here for
> > one of the corner cases where we didn't quite have enough space reserved for the
> > delayed refs we were generating during evict(). Thanks,
>
> One testbox reports an assertion failure on current for-next,
> generic/224. I'm reporting it under this patchset as it's my best guess.
> Same host running misc-next (with the delayed rsv patchset) was fine and
> the run with for-next (including this patchset) fails. The assertion is
>
> 5225 static int __reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
> 5226 struct btrfs_space_info *space_info,
> 5227 u64 orig_bytes,
> 5228 enum btrfs_reserve_flush_enum flush,
> 5229 bool system_chunk)
> 5230 {
> 5231 struct reserve_ticket ticket;
> 5232 u64 used;
> 5233 u64 reclaim_bytes = 0;
> 5234 int ret = 0;
> 5235
> 5236 ASSERT(orig_bytes);
> ^^^^
>
Looking at your for-next branch on your github (I assume this is what you are
testing)
https://github.com/kdave/btrfs-devel/blob/for-next-20181212/fs/btrfs/extent-tree.c
at line 5860 there's supposed to be a
if (num_bytes == 0)
return 0
that's what I changed in v2 of this patchset, as I hit this bug as well. It
looks like you still have v1 of this patchset applied. Thanks,
Josef