update stop ioctl

Change-Id: Ib1757baa0bcc48082cb36848b5f06da2cc401437
This commit is contained in:
Kent Overstreet 2015-01-23 00:50:27 +00:00
parent 3301c8dd52
commit 112aacfeff

View File

@ -1158,13 +1158,13 @@ char *unregister_bcache(char *const *devs)
int ret, bcachefd; int ret, bcachefd;
char *err = NULL; char *err = NULL;
bcachefd = open("/dev/bcache", O_RDWR); bcachefd = open("/dev/bcache_extent0", O_RDWR);
if (bcachefd < 0) { if (bcachefd < 0) {
err = "Can't open bcache device"; err = "Can't open bcache device";
goto err; goto err;
} }
ret = ioctl(bcachefd, BCH_IOCTL_UNREGISTER, devs); ret = ioctl(bcachefd, BCH_IOCTL_STOP);
if (ret < 0) { if (ret < 0) {
char tmp[64]; char tmp[64];
snprintf(tmp, 64, "ioctl unregister error: %s\n", snprintf(tmp, 64, "ioctl unregister error: %s\n",