From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:31763 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbeELCGI (ORCPT ); Fri, 11 May 2018 22:06:08 -0400 Date: Sat, 12 May 2018 12:06:06 +1000 From: Dave Chinner Subject: Re: [PATCH 01/10] xfs: one-shot cached buffers Message-ID: <20180512020606.GA10363@dastard> References: <20180511225107.27171-1-david@fromorbit.com> <20180511225107.27171-2-david@fromorbit.com> <20180512002448.GM11261@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180512002448.GM11261@magnolia> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org On Fri, May 11, 2018 at 05:24:48PM -0700, Darrick J. Wong wrote: > On Sat, May 12, 2018 at 08:50:58AM +1000, Dave Chinner wrote: > > From: Dave Chinner > > > > For the new growfs work, we want to ensure that we serialise > > secondary superblock updates with other operations (e.g. scrub) > > correctly, but we don't want to cache the buffers for long term > > reuse. We need cached buffers for serialisation, however. > > > > To solve this, introduce a "oneshot" buffer which will be marshalled > > through the cache but then released once the last current reference > > goes away. If the buffer is already cached, then we ignore the > > "one-shot" behaviour and leave the buffer in the state it was prior > > to the one-shot command being run. This means we don't perturb > > either the working set or existing cached buffer state by a one-shot > > operation. > > > > Signed-Off-By: Dave Chinner > > Hmm, should the xfs_sb_read_secondary function in "xfs: superblock scrub > should use short-lived buffers" be calling this to set a zero lru_ref > instead of doing it directly? That's not yet merged, is it? I'm guessing that it all depends on what order everything gets merged - we can clean up all the loose ends once we get everything in? Cheers, Dave. -- Dave Chinner david@fromorbit.com