All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Gud <amitgud@gmail.com>
To: linux-btrfs@vger.kernel.org, chris.mason@oracle.com,
	"gud@ksu.edu" <gud@ksu.edu>
Subject: [PATCH 3/3] Add ioctl to set per file 'nodatasum' flag
Date: Fri, 12 Jun 2009 18:53:20 -0700	[thread overview]
Message-ID: <4A330690.8010902@gmail.com> (raw)


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

                 reply	other threads:[~2009-06-13  1:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A330690.8010902@gmail.com \
    --to=amitgud@gmail.com \
    --cc=chris.mason@oracle.com \
    --cc=gud@ksu.edu \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.