linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/5] xfs: introduce an always_cow mode
Date: Fri, 21 Sep 2018 07:23:57 +1000	[thread overview]
Message-ID: <20180920212357.GN27618@dastard> (raw)
In-Reply-To: <20180920201702.GN20086@magnolia>

On Thu, Sep 20, 2018 at 01:17:02PM -0700, Darrick J. Wong wrote:
> On Thu, Sep 20, 2018 at 04:42:20PM +0200, Christoph Hellwig wrote:
> > When the (debug-only) always_cow module parameter is set, we will always
> > write out place, even if the file is not reflinked.  In addition to being
> > a useful debug aid this prepares for modes where we must always write
> > out of place.  An example for that is the upcoming support for atomic
> > overwrites.
....
> > diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> > index b25ea7a3a0e7..a893f6d65ff0 100644
> > --- a/fs/xfs/xfs_reflink.c
> > +++ b/fs/xfs/xfs_reflink.c
> > @@ -129,6 +129,11 @@
> >   * ioend, the better.
> >   */
> >  
> > +#ifdef DEBUG
> > +bool xfs_always_cow;
> > +module_param_named(always_cow, xfs_always_cow, bool, 0644);
> > +#endif
> 
> I would have expected this to end up in /proc/sys/fs/xfs/always_cow
> along with all the other behavior knobs, but I guess this is a debugging
> thing...?

sys/fs/xfs/debug/always_cow is the place for this if it is truly a
global debug option. However, that's probably not the best way to
enable this sort of debug for people with XFS root filesystems
trying to test XFS filesystems. I suspect it should be a per-mount
configuration (i.e. /sys/fs/xfs/<dev>/debug/always_cow)

However, this mode of operation seems like it is going to form the
basis of other per-filesystem features, so it would be good to know
how/if those features make use of this always_cow mode or are
controlled by some other set of knobs first.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2018-09-21  3:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 14:42 more reflink fixes & debug Christoph Hellwig
2018-09-20 14:42 ` [PATCH 1/5] xfs: cancel COW blocks before swapext Christoph Hellwig
2018-09-20 20:04   ` Darrick J. Wong
2018-09-27 15:07   ` Brian Foster
2018-09-30 22:50     ` Christoph Hellwig
2018-10-01 11:03       ` Brian Foster
2018-09-20 14:42 ` [PATCH 2/5] xfs: skip delalloc COW blocks in xfs_reflink_end_cow Christoph Hellwig
2018-09-20 20:22   ` Darrick J. Wong
2018-09-20 14:42 ` [PATCH 3/5] xfs: fix fork selection in xfs_find_trim_cow_extent Christoph Hellwig
2018-09-20 14:42 ` [PATCH 4/5] xfs: print dangling delalloc extents Christoph Hellwig
2018-09-20 20:06   ` Darrick J. Wong
2018-09-27 15:07   ` Brian Foster
2018-09-20 14:42 ` [PATCH 5/5] xfs: introduce an always_cow mode Christoph Hellwig
2018-09-20 20:17   ` Darrick J. Wong
2018-09-20 21:23     ` Dave Chinner [this message]
2018-09-21  5:23       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180920212357.GN27618@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).