Re: [PATCH v7 14/14] xfs, dax: introduce xfs_break_dax_layouts()

From: Christoph Hellwig
Date: Thu Mar 22 2018 - 13:03:02 EST


On Thu, Mar 22, 2018 at 09:28:11AM -0700, Dan Williams wrote:
> I can switch to the for() loop model, but it isn't 'done' flag, it's a
> 'retry' flag. I.e. if xfs_break_leased_layouts() dropped
> XFS_MMAPLOCK_EXCL we need to retry xfs_break_dax_layouts(), and if

Oh, indeed.

> xfs_break_dax_layouts() slept we need to immediately retry it.
> So, how
> about this?

Ah, with that that the loop doesn't work too well, especially the
continue inside a switch statement is probably not to good. I guess
we should just stick to your original, modulo better variable naming.