public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] xfsprogs: Adding XFS_IOC_FIEMAPFS ioctl for use in xfs_spaceman
@ 2015-01-29 13:31 Dhruvesh Rathore
  2015-02-10 22:19 ` Dave Chinner
  0 siblings, 1 reply; 3+ messages in thread
From: Dhruvesh Rathore @ 2015-01-29 13:31 UTC (permalink / raw)
  To: xfs


This patch is concerned with the changes to be done in userspace code for
turning FS_IOC_FIEMAPFS present in the earlier version of xfs_spaceman 
into an XFS specific ioctl called XFS_IOC_FIEMAPFS, which uses all existing
fiemap insfrastructure.
By introducing XFS_IOC_FIMEAPFS ioctl, it can be seperated from file based
fiemap commands and allows us to review it and push it as we need, making the
process much simpler.

----------------------------------------------------------------------------------------

Signed-off-by: Dhruvesh Rathore <dhruvesh_r@outlook.com>
Signed-off-by: Amey Ruikar <ameyruikar@yahoo.com>
Signed-off-by: Somdeep Dey <somdeepdey10@gmail.com>
---
include/xfs_fs.h	| 1 +
spaceman/freesp.c	| 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-) 

--- a/include/xfs_fs.h	2015-01-29 15:26:50.954401773 +0530
+++ b/include/xfs_fs.h	2015-01-29 11:29:59.531652554 +0530

@@ -505,6 +505,7 @@
 #define XFS_IOC_DIOINFO	_IOR ('X', 30, struct dioattr)
 #define XFS_IOC_FSGETXATTR	_IOR ('X', 31, struct fsxattr)
 #define XFS_IOC_FSSETXATTR	_IOW ('X', 32, struct fsxattr)
+#define XFS_IOC_FIEMAPFS	_IOWR('X', 33, struct fiemap)
 #define XFS_IOC_ALLOCSP64	_IOW ('X', 36, struct xfs_flock64)
 #define XFS_IOC_FREESP64	_IOW ('X', 37, struct xfs_flock64)
 #define XFS_IOC_GETBMAP	_IOWR('X', 38, struct getbmap)

----------------------------------------------------------------------------------------

--- a/spaceman/freesp.c	2015-01-29 15:27:03.737227849 +0530
+++ b/spaceman/freesp.c	2015-01-29 15:23:48.865235168 +0530

@@ -31,7 +31,7 @@
 #define FIEMAPFS_FLAG_FREESP_SIZE_HINT	0x20000000
 #define	FIEMAPFS_FLAG_FREESP_CONTINUE   0x10000000
 
-#define FS_IOC_FIEMAPFS			_IOWR('f', 12, struct fiemap)
+#define XFS_IOC_FIEMAPFS			_IOWR('X', 33, struct fiemap)
 #endif
 
 typedef struct histent
@@ -201,9 +201,9 @@
 		fiemap->fm_length = length;
 		fiemap->fm_extent_count = NR_EXTENTS;
 
-		ret = ioctl(file->fd, FS_IOC_FIEMAPFS, (unsigned long)fiemap);
+		ret = xfsctl(file->name,file->fd, XFS_IOC_FIEMAPFS, (unsigned long)fiemap);
		if (ret < 0) {
-			fprintf(stderr, "%s: ioctl(FS_IOC_FIEMAPFS) [\"%s\"]: "
+			fprintf(stderr, "%s: xfsctl(XFS_IOC_FIEMAPFS) [\"%s\"]: "
 				"%s\n", progname, file->name, strerror(errno));
 			free(fiemap);
 			exitcode = 1;

----------------------------------------------------------------------------------------

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

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

* Re: [PATCH 4/4] xfsprogs: Adding XFS_IOC_FIEMAPFS ioctl for use in xfs_spaceman
  2015-01-29 13:31 [PATCH 4/4] xfsprogs: Adding XFS_IOC_FIEMAPFS ioctl for use in xfs_spaceman Dhruvesh Rathore
@ 2015-02-10 22:19 ` Dave Chinner
  2015-02-11 16:22   ` Dhruvesh Rathore
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2015-02-10 22:19 UTC (permalink / raw)
  To: Dhruvesh Rathore; +Cc: xfs

On Thu, Jan 29, 2015 at 07:01:02PM +0530, Dhruvesh Rathore wrote:
> 
> This patch is concerned with the changes to be done in userspace code for
> turning FS_IOC_FIEMAPFS present in the earlier version of xfs_spaceman 
> into an XFS specific ioctl called XFS_IOC_FIEMAPFS, which uses all existing
> fiemap insfrastructure.
> By introducing XFS_IOC_FIMEAPFS ioctl, it can be seperated from file based
> fiemap commands and allows us to review it and push it as we need, making the
> process much simpler.
.....
>  typedef struct histent
> @@ -201,9 +201,9 @@
>  		fiemap->fm_length = length;
>  		fiemap->fm_extent_count = NR_EXTENTS;
>  
> -		ret = ioctl(file->fd, FS_IOC_FIEMAPFS, (unsigned long)fiemap);
> +		ret = xfsctl(file->name,file->fd, XFS_IOC_FIEMAPFS, (unsigned long)fiemap);
> 		if (ret < 0) {
  ^
Patch hunk is corrupt: it is missing the leading whitespace to
indicate "no change on this line".

I've fixed it up to apply the patch.

-Dave.
-- 
Dave Chinner
david@fromorbit.com

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

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

* Re: [PATCH 4/4] xfsprogs: Adding XFS_IOC_FIEMAPFS ioctl for use in xfs_spaceman
  2015-02-10 22:19 ` Dave Chinner
@ 2015-02-11 16:22   ` Dhruvesh Rathore
  0 siblings, 0 replies; 3+ messages in thread
From: Dhruvesh Rathore @ 2015-02-11 16:22 UTC (permalink / raw)
  To: xfs

On Wed, Feb 11, 2015 at 3:49 AM, Dave Chinner <david@fromorbit.com> wrote:
> On Thu, Jan 29, 2015 at 07:01:02PM +0530, Dhruvesh Rathore wrote:
>>
>> This patch is concerned with the changes to be done in userspace code for
>> turning FS_IOC_FIEMAPFS present in the earlier version of xfs_spaceman
>> into an XFS specific ioctl called XFS_IOC_FIEMAPFS, which uses all existing
>> fiemap insfrastructure.
>> By introducing XFS_IOC_FIMEAPFS ioctl, it can be seperated from file based
>> fiemap commands and allows us to review it and push it as we need, making the
>> process much simpler.
> .....
>>  typedef struct histent
>> @@ -201,9 +201,9 @@
>>               fiemap->fm_length = length;
>>               fiemap->fm_extent_count = NR_EXTENTS;
>>
>> -             ret = ioctl(file->fd, FS_IOC_FIEMAPFS, (unsigned long)fiemap);
>> +             ret = xfsctl(file->name,file->fd, XFS_IOC_FIEMAPFS, (unsigned long)fiemap);
>>               if (ret < 0) {
>   ^
> Patch hunk is corrupt: it is missing the leading whitespace to
> indicate "no change on this line".
>
> I've fixed it up to apply the patch.
>
> -Dave.

We again apologize for the constant white space errors. We will surely make
use of the various git commands that you have mentioned to ensure that we
send clean patches.
Thank you for reworking and applying the patches :)

Regards,
A-DRS

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

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

end of thread, other threads:[~2015-02-11 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 13:31 [PATCH 4/4] xfsprogs: Adding XFS_IOC_FIEMAPFS ioctl for use in xfs_spaceman Dhruvesh Rathore
2015-02-10 22:19 ` Dave Chinner
2015-02-11 16:22   ` Dhruvesh Rathore

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