All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] Add ioctl to set per file 'nodatasum' flag
@ 2009-06-13  1:53 Amit Gud
  0 siblings, 0 replies; only message in thread
From: Amit Gud @ 2009-06-13  1:53 UTC (permalink / raw)
  To: linux-btrfs, chris.mason, gud@ksu.edu


Add an ioctl to set 'nodatasum' flag on per file basis.


Signed-off-by: Amit Gud <gud@ksu.edu>


Index: newformat2/fs/btrfs/ioctl.c
===================================================================
--- newformat2.orig/fs/btrfs/ioctl.c
+++ newformat2/fs/btrfs/ioctl.c
@@ -1330,6 +1330,8 @@ long btrfs_ioctl(struct file *file, unsi
 		return btrfs_ioctl_inode_flag(file, BTRFS_INODE_NOCOMPRESS, 0);
 	case BTRFS_IOC_NODATACOW:
 		return btrfs_ioctl_inode_flag(file, BTRFS_INODE_NODATACOW, 1);
+	case BTRFS_IOC_NODATASUM:
+		return btrfs_ioctl_inode_flag(file, BTRFS_INODE_NODATASUM, 1);
 	}

 	return -ENOTTY;
Index: newformat2/fs/btrfs/ioctl.h
===================================================================
--- newformat2.orig/fs/btrfs/ioctl.h
+++ newformat2/fs/btrfs/ioctl.h
@@ -69,5 +69,6 @@ struct btrfs_ioctl_clone_range_args {
 			   struct btrfs_ioctl_vol_args)
 #define BTRFS_IOC_NODATACOW _IOW(BTRFS_IOCTL_MAGIC, 16, \
 			   struct btrfs_ioctl_vol_args)
-
+#define BTRFS_IOC_NODATASUM _IOW(BTRFS_IOCTL_MAGIC, 17, \
+			   struct btrfs_ioctl_vol_args)
 #endif


-- 
May the source be with you.
http://www.cis.ksu.edu/~gud

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-13  1:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-13  1:53 [PATCH 3/3] Add ioctl to set per file 'nodatasum' flag Amit Gud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.