forked from Mirrors/btrfs-progs
btrfs-progs: open RW to register device using btrfs-control
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> Signed-off-by: David Sterba <dsterba@suse.cz>master
parent
38cfeef103
commit
bdac35cea2
2
utils.c
2
utils.c
|
@ -1246,7 +1246,7 @@ void btrfs_register_one_device(char *fname)
|
||||||
int ret;
|
int ret;
|
||||||
int e;
|
int e;
|
||||||
|
|
||||||
fd = open("/dev/btrfs-control", O_RDONLY);
|
fd = open("/dev/btrfs-control", O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "failed to open /dev/btrfs-control "
|
fprintf(stderr, "failed to open /dev/btrfs-control "
|
||||||
"skipping device registration: %s\n",
|
"skipping device registration: %s\n",
|
||||||
|
|
Loading…
Reference in New Issue