diff mbox series

[3/4] xfs_restore: fix unsupported ioctl detection

Message ID 156633250490.1207741.2481254459114902054.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series xfsdump: update to use fallocate | expand

Commit Message

Darrick J. Wong Aug. 20, 2019, 8:21 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Linux ioctls can return ENOTTY or EOPNOTSUPP, so filter both of them
when logging reservation failure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 restore/dirattr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/restore/dirattr.c b/restore/dirattr.c
index ed7e0b4..267bef0 100644
--- a/restore/dirattr.c
+++ b/restore/dirattr.c
@@ -76,7 +76,7 @@  create_filled_file(
 		return fd;
 
 	ret = ioctl(fd, XFS_IOC_RESVSP64, &fl);
-	if (ret && errno != ENOTTY)
+	if (ret && (errno != EOPNOTSUPP && errno != ENOTTY))
 		mlog(MLOG_VERBOSE | MLOG_NOTE,
 _("attempt to reserve %lld bytes for %s using %s failed: %s (%d)\n"),
 				size, pathname, "XFS_IOC_RESVSP64",