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] progs: Add BTRFS_IOC_NODATASUM ioctl to progs
Date: Fri, 12 Jun 2009 19:01:08 -0700 [thread overview]
Message-ID: <4A330864.1040609@gmail.com> (raw)
Add the new ioctl to progs.
Signed-off-by: Amit Gud <gud@ksu.edu>
Index: btrfs-progs-unstable/btrfsctl.c
===================================================================
--- btrfs-progs-unstable.orig/btrfsctl.c
+++ btrfs-progs-unstable/btrfsctl.c
@@ -57,6 +57,7 @@ static void print_usage(void)
printf("\t-c: forces a single FS sync\n");
printf("\t--compress filename: sets compress flag on the file\n");
printf("\t--nodatacow filename: sets nodatacow flag on the file\n");
+ printf("\t--nodatasum filename: sets nodatasum flag on the file\n");
printf("%s\n", BTRFS_BUILD_VERSION);
exit(1);
}
@@ -192,6 +193,12 @@ int main(int ac, char **av)
print_usage();
}
command = BTRFS_IOC_NODATACOW;
+ } else if (strcmp(av[i], "--nodatasum") == 0) {
+ if (i >= ac - 1) {
+ fprintf(stderr, "-r requires an arg\n");
+ print_usage();
+ }
+ command = BTRFS_IOC_NODATASUM;
}
}
if (command == 0) {
Index: btrfs-progs-unstable/ioctl.h
===================================================================
--- btrfs-progs-unstable.orig/ioctl.h
+++ btrfs-progs-unstable/ioctl.h
@@ -60,4 +60,6 @@ struct btrfs_ioctl_vol_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 2:01 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=4A330864.1040609@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.