Adding a more correct trim function prototype to the struct of block device
operations.
This commit is contained in:
parent
46ce45a571
commit
3426987066
2
buse.c
2
buse.c
|
@ -124,7 +124,7 @@ int buse_main(int argc, char *argv[], const struct buse_operations *aop, void *u
|
||||||
aop->flush();
|
aop->flush();
|
||||||
break;
|
break;
|
||||||
case NBD_CMD_TRIM:
|
case NBD_CMD_TRIM:
|
||||||
aop->trim();
|
aop->trim(from, len);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
2
buse.h
2
buse.h
|
@ -8,7 +8,7 @@ struct buse_operations {
|
||||||
int (*write)(const void *buf, u_int32_t len, u_int64_t offset);
|
int (*write)(const void *buf, u_int32_t len, u_int64_t offset);
|
||||||
int (*disc)();
|
int (*disc)();
|
||||||
int (*flush)();
|
int (*flush)();
|
||||||
int (*trim)();
|
int (*trim)(u_int64_t from, u_int32_t len);
|
||||||
|
|
||||||
u_int64_t size;
|
u_int64_t size;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue