From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n0V0OSZQ061636 for ; Fri, 30 Jan 2009 18:24:29 -0600 Date: Fri, 30 Jan 2009 16:22:52 -0800 From: Andrew Morton Subject: Re: [PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls Message-Id: <20090130162252.7bf9c1f4.akpm@linux-foundation.org> In-Reply-To: <4980C71F.1010804@ankitjain.org> References: <4980C71F.1010804@ankitjain.org> Mime-Version: 1.0 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Ankit Jain Cc: mfasheh@suse.com, joel.becker@oracle.com, linux-kernel@vger.kernel.org, hch@infradead.org, xfs-masters@oss.sgi.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com, ocfs2-devel@oss.oracle.com On Thu, 29 Jan 2009 02:29:11 +0530 Ankit Jain wrote: > --- xfs.orig/include/linux/falloc.h 2009-01-21 21:03:28.076324621 +0100 > +++ xfs/include/linux/falloc.h 2009-01-27 20:36:59.190423995 +0100 > @@ -3,4 +3,48 @@ > > #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ > > +#ifdef __KERNEL__ > + > +/* > + * Space reservation ioctls and argument structure > + * are designed to be compatible with the legacy XFS ioctls. > + */ > +struct space_resv { > + __s16 l_type; > + __s16 l_whence; > + __s64 l_start; > + __s64 l_len; /* len == 0 means until end of file */ > + __s32 l_sysid; > + __u32 l_pid; > + __s32 l_pad[4]; /* reserve area */ > +}; > + > +#define F_IOC_RESVSP _IOW('X', 40, struct space_resv) > +#define F_IOC_RESVSP64 _IOW('X', 42, struct space_resv) Should this stuff be inside #ifdef __KERNEL__? It is shared with userspace. Are we sure that the aligment of l_start will be reliably the same across all compilers and versions thereof for all time? _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Sat, 31 Jan 2009 00:23:47 -0000 Subject: [Ocfs2-devel] [PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls In-Reply-To: <4980C71F.1010804@ankitjain.org> References: <4980C71F.1010804@ankitjain.org> Message-ID: <20090130162252.7bf9c1f4.akpm@linux-foundation.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ankit Jain Cc: viro@zeniv.linux.org.uk, hch@infradead.org, linux-fsdevel@vger.kernel.org, mfasheh@suse.com, joel.becker@oracle.com, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, xfs-masters@oss.sgi.com, xfs@oss.sgi.com On Thu, 29 Jan 2009 02:29:11 +0530 Ankit Jain wrote: > --- xfs.orig/include/linux/falloc.h 2009-01-21 21:03:28.076324621 +0100 > +++ xfs/include/linux/falloc.h 2009-01-27 20:36:59.190423995 +0100 > @@ -3,4 +3,48 @@ > > #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ > > +#ifdef __KERNEL__ > + > +/* > + * Space reservation ioctls and argument structure > + * are designed to be compatible with the legacy XFS ioctls. > + */ > +struct space_resv { > + __s16 l_type; > + __s16 l_whence; > + __s64 l_start; > + __s64 l_len; /* len == 0 means until end of file */ > + __s32 l_sysid; > + __u32 l_pid; > + __s32 l_pad[4]; /* reserve area */ > +}; > + > +#define F_IOC_RESVSP _IOW('X', 40, struct space_resv) > +#define F_IOC_RESVSP64 _IOW('X', 42, struct space_resv) Should this stuff be inside #ifdef __KERNEL__? It is shared with userspace. Are we sure that the aligment of l_start will be reliably the same across all compilers and versions thereof for all time? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757167AbZAaAYK (ORCPT ); Fri, 30 Jan 2009 19:24:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752584AbZAaAXx (ORCPT ); Fri, 30 Jan 2009 19:23:53 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54033 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514AbZAaAXw (ORCPT ); Fri, 30 Jan 2009 19:23:52 -0500 Date: Fri, 30 Jan 2009 16:22:52 -0800 From: Andrew Morton To: Ankit Jain Cc: viro@zeniv.linux.org.uk, hch@infradead.org, linux-fsdevel@vger.kernel.org, mfasheh@suse.com, joel.becker@oracle.com, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, xfs-masters@oss.sgi.com, xfs@oss.sgi.com Subject: Re: [PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls Message-Id: <20090130162252.7bf9c1f4.akpm@linux-foundation.org> In-Reply-To: <4980C71F.1010804@ankitjain.org> References: <4980C71F.1010804@ankitjain.org> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Jan 2009 02:29:11 +0530 Ankit Jain wrote: > --- xfs.orig/include/linux/falloc.h 2009-01-21 21:03:28.076324621 +0100 > +++ xfs/include/linux/falloc.h 2009-01-27 20:36:59.190423995 +0100 > @@ -3,4 +3,48 @@ > > #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ > > +#ifdef __KERNEL__ > + > +/* > + * Space reservation ioctls and argument structure > + * are designed to be compatible with the legacy XFS ioctls. > + */ > +struct space_resv { > + __s16 l_type; > + __s16 l_whence; > + __s64 l_start; > + __s64 l_len; /* len == 0 means until end of file */ > + __s32 l_sysid; > + __u32 l_pid; > + __s32 l_pad[4]; /* reserve area */ > +}; > + > +#define F_IOC_RESVSP _IOW('X', 40, struct space_resv) > +#define F_IOC_RESVSP64 _IOW('X', 42, struct space_resv) Should this stuff be inside #ifdef __KERNEL__? It is shared with userspace. Are we sure that the aligment of l_start will be reliably the same across all compilers and versions thereof for all time?