Skip to contentSkip to conversation

xfs_repair: remove obsolete code for handling mountpoint inodes

PATCH In review Anthony Iliopoulos 2 participants 2 messages Oct 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_repair: remove obsolete code for handling mountpoint inodes

The S_IFMNT file type was never supported in Linux, remove the related code that was supposed to deal with it, along with the translation file entries.

---
 po/de.po        |  5 -----
 po/pl.po        |  5 -----
 repair/dinode.c | 12 ------------
 repair/incore.h |  1 -
 4 files changed, 23 deletions(-)
po/de.po +0 -5
index fab26677e258..aa9af769ab89 100644
@@ -11774,11 +11774,6 @@ msgstr ""
 msgid "component of symlink in inode %llu too long\n"
 msgstr "Bestandteil des symbolischen Verweises in Inode %llu zu lang\n"
 
-#: .././repair/dinode.c:1611
-#, c-format
-msgid "inode %llu has bad inode type (IFMNT)\n"
-msgstr "Inode %llu hat falschen Inode-Typ (IFMNT)\n"
-
 #: .././repair/dinode.c:1621
 #, c-format
 msgid "size of character device inode %llu != 0 (%lld bytes)\n"
po/pl.po +0 -5
index 87109f6b41d2..0076e7a75b05 100644
@@ -11712,11 +11712,6 @@ msgstr ""
 "znaleziono niedozwolony znak null w i-węźle dowiązania symbolicznego "
 "%<PRIu64>\n"
 
-#: .././repair/dinode.c:1452
-#, c-format
-msgid "inode %<PRIu64> has bad inode type (IFMNT)\n"
-msgstr "i-węzeł %<PRIu64> ma błędny typ i-węzła (IFMNT)\n"
-
 #: .././repair/dinode.c:1463
 #, c-format
 msgid "size of character device inode %<PRIu64> != 0 (%<PRId64> bytes)\n"
repair/dinode.c +0 -12
index d552db2d5f1a..4abf83ec4173 100644
@@ -1334,17 +1334,6 @@ process_misc_ino_types(xfs_mount_t	*mp,
 			xfs_ino_t	lino,
 			int		type)
 {
-	/*
-	 * disallow mountpoint inodes until such time as the
-	 * kernel actually allows them to be created (will
-	 * probably require a superblock version rev, sigh).
-	 */
-	if (type == XR_INO_MOUNTPOINT)  {
-		do_warn(
-_("inode %" PRIu64 " has bad inode type (IFMNT)\n"), lino);
-		return(1);
-	}
-
 	/*
 	 * must also have a zero size
 	 */
@@ -1630,7 +1619,6 @@ _("directory inode %" PRIu64 " has bad size %" PRId64 "\n"),
 	case XR_INO_CHRDEV:	/* fall through to FIFO case ... */
 	case XR_INO_BLKDEV:	/* fall through to FIFO case ... */
 	case XR_INO_SOCK:	/* fall through to FIFO case ... */
-	case XR_INO_MOUNTPOINT:	/* fall through to FIFO case ... */
 	case XR_INO_FIFO:
 		if (process_misc_ino_types(mp, dino, lino, type))
 			return 1;
repair/incore.h +0 -1
index 5b29d5d1efd8..074ca98a3989 100644
@@ -214,7 +214,6 @@ int		count_bcnt_extents(xfs_agnumber_t);
 #define XR_INO_BLKDEV	8		/* block device */
 #define XR_INO_SOCK	9		/* socket */
 #define XR_INO_FIFO	10		/* fifo */
-#define XR_INO_MOUNTPOINT 11		/* mountpoint */
 #define XR_INO_UQUOTA	12		/* user quota inode */
 #define XR_INO_GQUOTA	13		/* group quota inode */
 #define XR_INO_PQUOTA	14		/* project quota inode */
Signature · 1 line
2.28.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Anthony Iliopoulos

The S_IFMNT file type was never supported in Linux, remove the related code that was supposed to deal with it, along with the translation file entries.

Seems fine.

Fun fact, this was /almost/ all removed way back in 2003 ;)

-#define IFMNT 0160000 /* mount point */

...

- case IFMNT:
- type = XR_INO_MOUNTPOINT;
- break;

I don't think there's any point to a Fixes: tag here though ;)

Thanks,