Change release ioctl to be denominated in bytes not blocks

This more closely matches stage ioctl and other conventions.

Also change release code to use offset/length nomenclature for consistency.

Signed-off-by: Andy Grover <agrover@versity.com>
This commit is contained in:
Andy Grover
2021-01-12 16:29:42 -08:00
parent 64a698aa93
commit 2c5871c253
4 changed files with 43 additions and 39 deletions
+3 -3
View File
@@ -76,7 +76,7 @@ static int do_stage(struct stage_args *args)
ioctl_args.data_version = args->data_version;
ioctl_args.buf_ptr = (unsigned long)buf;
ioctl_args.offset = args->offset;
ioctl_args.count = bytes;
ioctl_args.length = bytes;
args->length -= bytes;
args->offset += bytes;
@@ -211,8 +211,8 @@ static int do_release(struct release_args *args)
assert(args->offset % SCOUTFS_BLOCK_SM_SIZE == 0);
assert(args->length % SCOUTFS_BLOCK_SM_SIZE == 0);
ioctl_args.block = args->offset / SCOUTFS_BLOCK_SM_SIZE;
ioctl_args.count = args->length / SCOUTFS_BLOCK_SM_SIZE;
ioctl_args.offset = args->offset;
ioctl_args.length = args->length;
ioctl_args.data_version = args->data_version;
ret = ioctl(fd, SCOUTFS_IOC_RELEASE, &ioctl_args);