From: Dave Chinner <david@fromorbit.com>
To: Anthony Iliopoulos <ailiop@suse.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 0/6] xfsprogs: blockdev dax detection and warnings
Date: Tue, 25 Aug 2020 08:55:33 +1000 [thread overview]
Message-ID: <20200824225533.GA12131@dread.disaster.area> (raw)
In-Reply-To: <20200824203724.13477-1-ailiop@suse.com>
On Mon, Aug 24, 2020 at 10:37:18PM +0200, Anthony Iliopoulos wrote:
> Hi all,
>
> This short series adds blockdev dax capability detection via libblkid,
> and subsequently uses this bit to warn on a couple of incompatible
> configurations during mkfs.
>
> The first patch adds the detection capability to libtopology, and the
> following two patches add mkfs warnings that are issued when the fs
> block size is not matching the page size, and when reflink is being
> enabled in conjunction with dax.
This makes the assumption that anyone running mkfs on a dax capable
device is going to use DAX, and prevents mkfs from running if the
config is not DAX compatible.
The issue here is that making a filesystem that is not DAX
compatible on a DAX capable device is not a fatal error. The
filesystem will work just fine using buffered and direct IO, and
there are definitely workloads where we want to use buffered IO on
pmem and not DAX. Why? Because existing pmem is terribly slow for
write intensive applications compared to page cache based mmap().
And even buffered writes are faster than DAX direct writes because
the slow writeback is done in the background via async writeback.
Also, what happens if you have a 64kB page size? mkfs defaults to
4kB block size, so with these changes mkfs will refuse to run on a
dax capable device unless the user specifically directs it to do
something different. That's not a good behaviour for the default
config to have....
Hence I don't think that preventing mkfs from running unless the config
is exactly waht DAX requires or the "force" option is set is the
right policy here.
I agree that mkfs needs to be aware of DAX capability of the block
device, but that capability existing should not cause mkfs to fail.
If we want users to be able to direct mkfs to to create a DAX
capable filesystem then adding a -d dax option would be a better
idea. This would direct mkfs to align/size all the data options to
use a DAX compatible topology if blkid supports reporting the DAX
topology. It would also do things like turn off reflink (until that
is supported w/ DAX), etc.
i.e. if the user knows they are going to use DAX (and they will)
then they can tell mkfs to make a DAX compatible filesystem.
> The next patch adds a new cli option that can be used to override
> warnings, and converts all warnings that can be forced to this option
> instead the overloaded -f option. This avoids cases where forcing a
> warning may also be implicitly forcing overwriting an existing
> partition.
I don't want both an "ignore warnings" and a "force" CLI option.
They both do the same thing - allow the user to override things that
are potentially destructive or result in an unusable config - so why
should we add the complexity of having a different "force" options
for every different possible thing that can be overridden?
Then we'll grow a "--force-all" option to override everything.
i.e. we end up with this insanity:
$ dpkg --help |grep force
--force-help Show help on forcing.
--[no-]triggers Skip or force consequential trigger processing.
--force-<thing>[,...] Override problems (see --force-help).
--no-force-<thing>[,...] Stop when problems encountered.
and "--force-help" gives you a list of about 30 different things you
can force the behaviour of, including "--force-all". This is simply
not a good UI model...
> The last two patches are small cleanups that remove redundant code.
They should be first.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-08-24 22:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 20:37 [PATCH 0/6] xfsprogs: blockdev dax detection and warnings Anthony Iliopoulos
2020-08-24 20:37 ` [PATCH 1/6] libfrog: add dax capability detection in topology probing Anthony Iliopoulos
2020-08-24 20:37 ` [PATCH 2/6] mkfs: warn if blocksize doesn't match pagesize on dax devices Anthony Iliopoulos
2020-08-24 20:37 ` [PATCH 3/6] mkfs: warn if reflink option is enabled on dax-capable devices Anthony Iliopoulos
2020-08-24 20:37 ` [PATCH 4/6] mkfs: introduce -y option to force incompat config combinations Anthony Iliopoulos
2020-08-24 20:37 ` [PATCH 5/6] mkfs: remove redundant assignment of cli sb options on failure Anthony Iliopoulos
2020-09-28 21:49 ` Eric Sandeen
2020-09-28 21:56 ` Eric Sandeen
2020-08-24 20:37 ` [PATCH 6/6] mkfs: remove a couple of unused function parameters Anthony Iliopoulos
2020-09-28 21:50 ` Eric Sandeen
2020-08-24 22:55 ` Dave Chinner [this message]
2020-08-25 8:48 ` [PATCH 0/6] xfsprogs: blockdev dax detection and warnings Anthony Iliopoulos
2020-08-25 13:59 ` Eric Sandeen
2020-08-25 14:40 ` Darrick J. Wong
2020-08-25 22:31 ` Dave Chinner
2020-08-25 15:09 ` Anthony Iliopoulos
2020-08-25 17:32 ` Eric Sandeen
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=20200824225533.GA12131@dread.disaster.area \
--to=david@fromorbit.com \
--cc=ailiop@suse.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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