linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 1/3] populate: create block devices when pre-populating filesystems
Date: Mon, 22 Mar 2021 21:19:48 -0700	[thread overview]
Message-ID: <161647318806.3429609.966502470186246038.stgit@magnolia> (raw)
In-Reply-To: <161647318241.3429609.1862044070327396092.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

I just noticed that the fs population helper creates a chardev file
"S_IFBLK" on the scratch filesystem.  This seems bogus (particularly
since we actually also create a chardev named S_IFCHR) so fix up the
mknod calls.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/populate |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/common/populate b/common/populate
index 4135d89d..8f42a528 100644
--- a/common/populate
+++ b/common/populate
@@ -230,7 +230,7 @@ _scratch_xfs_populate() {
 	# Char & block
 	echo "+ special"
 	mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1
-	mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1
+	mknod "${SCRATCH_MNT}/S_IFBLK" b 1 1
 
 	# special file with an xattr
 	setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR
@@ -402,7 +402,7 @@ _scratch_ext4_populate() {
 	# Char & block
 	echo "+ special"
 	mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1
-	mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1
+	mknod "${SCRATCH_MNT}/S_IFBLK" b 1 1
 
 	# special file with an xattr
 	setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR


  reply	other threads:[~2021-03-23  4:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  4:19 [PATCHSET 0/3] populate: fix a few bugs with fs pre-population Darrick J. Wong
2021-03-23  4:19 ` Darrick J. Wong [this message]
2021-03-24 18:03   ` [PATCH 1/3] populate: create block devices when pre-populating filesystems Christoph Hellwig
2021-03-23  4:19 ` [PATCH 2/3] common/populate: create fifos " Darrick J. Wong
2021-03-24 18:05   ` Christoph Hellwig
2021-03-23  4:19 ` [PATCH 3/3] common/populate: change how we describe cached populated images Darrick J. Wong
2021-03-24 18:11   ` Christoph Hellwig
2021-03-24 18:15     ` Darrick J. Wong
2021-03-24 18:17   ` [PATCH v1.1 " Darrick J. Wong
2021-03-24 18:22     ` 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=161647318806.3429609.966502470186246038.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --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).