diff mbox series

[1/3] populate: create block devices when pre-populating filesystems

Message ID 161647318806.3429609.966502470186246038.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series populate: fix a few bugs with fs pre-population | expand

Commit Message

Darrick J. Wong March 23, 2021, 4:19 a.m. UTC
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(-)

Comments

Christoph Hellwig March 24, 2021, 6:03 p.m. UTC | #1
On Mon, Mar 22, 2021 at 09:19:48PM -0700, Darrick J. Wong wrote:
> 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>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

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