Re: [PATCH 9/9] common/populate: make sure _scratch_xfs_populate puts its files on the data device

Darrick J. Wong
2020-10-29T02:43:06Z

On Wed, Oct 28, 2020 at 07:44:46AM +0000, Christoph Hellwig wrote:
> On Tue, Oct 27, 2020 at 12:02:27PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Make sure that _scratch_xfs_populate always installs its files on the
> > data device even if the test config selects rt by default.
>
> Can you explain why this is important (preferably also in a comment in
> the source)?

Ok. I'll change it to this:

# We cannot directly force the filesystem to create the metadata
# structures we want; we can only achieve this indirectly by carefully
# crafting files and a directory tree. Therefore, we must have exact
# control over the layout and device selection of all files created.
# Clear the rtinherit flag on the root directory so that files are
# always created on the data volume regardless of MKFS_OPTIONS.
# We can set the realtime flag when needed.
$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT

--D