common/populate: create fifos when pre-populating filesystems
authorDarrick J. Wong <djwong@kernel.org>
Tue, 23 Mar 2021 04:19:53 +0000 (21:19 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 28 Mar 2021 15:16:08 +0000 (23:16 +0800)
Create fifos when populating the scratch filesystem for completeness.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/populate

index 8f42a52..c01b7e0 100644 (file)
@@ -231,6 +231,7 @@ _scratch_xfs_populate() {
        echo "+ special"
        mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1
        mknod "${SCRATCH_MNT}/S_IFBLK" b 1 1
+       mknod "${SCRATCH_MNT}/S_IFIFO" p
 
        # special file with an xattr
        setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR
@@ -403,6 +404,7 @@ _scratch_ext4_populate() {
        echo "+ special"
        mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1
        mknod "${SCRATCH_MNT}/S_IFBLK" b 1 1
+       mknod "${SCRATCH_MNT}/S_IFIFO" p
 
        # special file with an xattr
        setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR
@@ -580,6 +582,7 @@ _scratch_xfs_populate_check() {
        extents_slink="$(__populate_find_inode "${SCRATCH_MNT}/S_IFLNK.FMT_EXTENTS")"
        bdev="$(__populate_find_inode "${SCRATCH_MNT}/S_IFBLK")"
        cdev="$(__populate_find_inode "${SCRATCH_MNT}/S_IFCHR")"
+       fifo="$(__populate_find_inode "${SCRATCH_MNT}/S_IFIFO")"
        local_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_LOCAL")"
        leaf_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_LEAF")"
        node_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_NODE")"
@@ -605,6 +608,7 @@ _scratch_xfs_populate_check() {
        __populate_check_xfs_dformat "${btree_dir}" "btree"
        __populate_check_xfs_dformat "${bdev}" "dev"
        __populate_check_xfs_dformat "${cdev}" "dev"
+       __populate_check_xfs_dformat "${fifo}" "dev"
        __populate_check_xfs_attr "${local_attr}" "local"
        __populate_check_xfs_attr "${leaf_attr}" "leaf"
        __populate_check_xfs_attr "${node_attr}" "node"