Adding a more correct trim function prototype to the struct of block device

operations.
This commit is contained in:
Adam Cozzette 2011-10-13 15:17:06 -07:00
parent 46ce45a571
commit 3426987066
2 changed files with 2 additions and 2 deletions

2
buse.c
View File

@ -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
View File

@ -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;
}; };