Skip to contentSkip to conversation

fix FREEZE/THAW compat_ioctl regression

PATCH In review Christoph Hellwig 1 participant 2 messages Feb 16, 2009 – Feb 20, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix FREEZE/THAW compat_ioctl regression

Commit 8e961870bb9804110d5c8211d5d9d500451c4518 removed the FREEZE/THAW handling in xfs_compat_ioctl but never added any compat handler back, so now any freeze/thaw request from a 32-bit binary ond 64-bit userspace will fail.

As these ioctls are 32/64-bit compatible two simple COMPATIBLE_IOCTL entries in fs/compat_ioctl.c will do the job.

fs/compat_ioctl.c +3 -0
Index: xfs/fs/compat_ioctl.c
===================================================================
@@ -1913,6 +1913,9 @@
 /* 0x00 */
 COMPATIBLE_IOCTL(FIBMAP)
 COMPATIBLE_IOCTL(FIGETBSZ)
+/* 'X' - originally XFS but some now in the VFS */
+COMPATIBLE_IOCTL(FIFREEZE)
+COMPATIBLE_IOCTL(FITHAW)
 /* RAID */
 COMPATIBLE_IOCTL(RAID_VERSION)
 COMPATIBLE_IOCTL(GET_ARRAY_INFO)
#1 lore raw

So who's going to send this to Linus? Having freeze/thaw regressed in 2.6.29 would be very sad for all the xfs users.

Quoted 16 lines · Christoph Hellwig

Commit 8e961870bb9804110d5c8211d5d9d500451c4518 removed the FREEZE/THAW handling in xfs_compat_ioctl but never added any compat handler back, so now any freeze/thaw request from a 32-bit binary ond 64-bit userspace will fail.

As these ioctls are 32/64-bit compatible two simple COMPATIBLE_IOCTL entries in fs/compat_ioctl.c will do the job.

Index: xfs/fs/compat_ioctl.c
===================================================================

fs/compat_ioctl.c line 1921

Quoted 9 lines
fs/compat_ioctl.c +3 -0
@@ -1913,6 +1913,9 @@
 /* 0x00 */
 COMPATIBLE_IOCTL(FIBMAP)
 COMPATIBLE_IOCTL(FIGETBSZ)
+/* 'X' - originally XFS but some now in the VFS */
+COMPATIBLE_IOCTL(FIFREEZE)
+COMPATIBLE_IOCTL(FITHAW)
 /* RAID */
 COMPATIBLE_IOCTL(RAID_VERSION)
 COMPATIBLE_IOCTL(GET_ARRAY_INFO)

---end quoted text---