From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 22 Mar 2018 18:02:52 +0100 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , linux-nvdimm , Jan Kara , Dave Chinner , "Darrick J. Wong" , Ross Zwisler , linux-fsdevel , linux-xfs , Linux Kernel Mailing List Subject: Re: [PATCH v7 14/14] xfs, dax: introduce xfs_break_dax_layouts() Message-ID: <20180322170252.GA5542@lst.de> References: <152167302988.5268.4370226749268662682.stgit@dwillia2-desk3.amr.corp.intel.com> <152167311132.5268.8502709708606276650.stgit@dwillia2-desk3.amr.corp.intel.com> <20180322074303.GC28713@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 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.