public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE
@ 2011-04-21 13:21 Christoph Hellwig
  2011-04-21 20:08 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2011-04-21 13:21 UTC (permalink / raw)
  To: xfs

XFS_IOC_ZERO_RANGE uses struct xfs_flock64, and thus requires argument
translation for 32-bit binaries on x86.  Add the required
XFS_IOC_ZERO_RANGE_32 defined and add it to the list of commands that
require xfs_flock64 translation.  

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/xfs/linux-2.6/xfs_ioctl32.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_ioctl32.c	2011-04-21 15:04:11.871434170 +0200
+++ xfs/fs/xfs/linux-2.6/xfs_ioctl32.c	2011-04-21 15:06:46.680595497 +0200
@@ -586,7 +586,8 @@ xfs_file_compat_ioctl(
 	case XFS_IOC_RESVSP_32:
 	case XFS_IOC_UNRESVSP_32:
 	case XFS_IOC_RESVSP64_32:
-	case XFS_IOC_UNRESVSP64_32: {
+	case XFS_IOC_UNRESVSP64_32:
+	case XFS_IOC_ZERO_RANGE_32: {
 		struct xfs_flock64	bf;
 
 		if (xfs_compat_flock64_copyin(&bf, arg))
Index: xfs/fs/xfs/linux-2.6/xfs_ioctl32.h
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_ioctl32.h	2011-04-21 15:06:41.437290568 +0200
+++ xfs/fs/xfs/linux-2.6/xfs_ioctl32.h	2011-04-21 15:07:26.550379502 +0200
@@ -184,6 +184,7 @@ typedef struct compat_xfs_flock64 {
 #define XFS_IOC_UNRESVSP_32	_IOW('X', 41, struct compat_xfs_flock64)
 #define XFS_IOC_RESVSP64_32	_IOW('X', 42, struct compat_xfs_flock64)
 #define XFS_IOC_UNRESVSP64_32	_IOW('X', 43, struct compat_xfs_flock64)
+#define XFS_IOC_ZERO_RANGE_32	_IOW('X', 57, struct compat_xfs_flock64)
 
 typedef struct compat_xfs_fsop_geom_v1 {
 	__u32		blocksize;	/* filesystem (data) block size */

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE
  2011-04-21 13:21 [PATCH] xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE Christoph Hellwig
@ 2011-04-21 20:08 ` Alex Elder
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2011-04-21 20:08 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Thu, 2011-04-21 at 09:21 -0400, Christoph Hellwig wrote:
> XFS_IOC_ZERO_RANGE uses struct xfs_flock64, and thus requires argument
> translation for 32-bit binaries on x86.  Add the required
> XFS_IOC_ZERO_RANGE_32 defined and add it to the list of commands that
> require xfs_flock64 translation.  
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks good.  That case was simply missed in commit 44722352
(xfs: Introduce XFS_IOC_ZERO_RANGE).

Reviewed-by: Alex Elder <aelder@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-21 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 13:21 [PATCH] xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE Christoph Hellwig
2011-04-21 20:08 ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox