linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] btrfs-progs: open RW to register device using btrfs-control
@ 2014-10-15  0:46 Anand Jain
  0 siblings, 0 replies; only message in thread
From: Anand Jain @ 2014-10-15  0:46 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba, clm

We are passing device path to be registered with in kernel,
so we need to open with RW

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index dd4ee52..78cb93f 100644
--- a/utils.c
+++ b/utils.c
@@ -1243,7 +1243,7 @@ void btrfs_register_one_device(char *fname)
 	int ret;
 	int e;
 
-	fd = open("/dev/btrfs-control", O_RDONLY);
+	fd = open("/dev/btrfs-control", O_RDWR);
 	if (fd < 0) {
 		fprintf(stderr, "failed to open /dev/btrfs-control "
 			"skipping device registration: %s\n",
-- 
2.0.0.153.g79dcccc


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

only message in thread, other threads:[~2014-10-15  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15  0:46 [PATCH 1/1] btrfs-progs: open RW to register device using btrfs-control Anand Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).