Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize ioctl #126

Merged
merged 7 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup
  • Loading branch information
prabirpaul committed Jun 15, 2020
commit 8e2720f40133b69efd356b6d328d8f3ab16b2692
2 changes: 1 addition & 1 deletion dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ static int fuse_notify_remove(struct fuse_conn *conn, unsigned int size,
static int fuse_notify_update_size(struct fuse_conn *conn, unsigned int size,
struct iov_iter *iter)
{
struct pxd_update_size_out update_size;
struct pxd_update_size update_size;
size_t len = sizeof(update_size);

if (copy_from_iter(&update_size, len, iter) != len) {
Expand Down
4 changes: 2 additions & 2 deletions fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ int fuse_restart_requests(struct fuse_conn *fc);

ssize_t pxd_add(struct fuse_conn *fc, struct pxd_add_ext_out *add);
ssize_t pxd_remove(struct fuse_conn *fc, struct pxd_remove_out *remove);
ssize_t pxd_update_size(struct fuse_conn *fc, struct pxd_update_size_out *update_size);
ssize_t pxd_ioc_update_size(struct fuse_conn *fc, struct pxd_update_size_out *update_size);
ssize_t pxd_update_size(struct fuse_conn *fc, struct pxd_update_size *update_size);
ssize_t pxd_ioc_update_size(struct fuse_conn *fc, struct pxd_update_size *update_size);
ssize_t pxd_read_init(struct fuse_conn *fc, struct iov_iter *iter);

// fastpath extension
Expand Down
6 changes: 3 additions & 3 deletions pxd.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static long pxd_ioctl_init(struct file *file, void __user *argp)
static long pxd_ioctl_resize(struct file *file, void __user *argp)
{
struct pxd_context *ctx = NULL;
struct pxd_update_size_out update_args;
struct pxd_update_size update_args;
long ret = 0;

if (copy_from_user(&update_args, argp, sizeof(update_args))) {
Expand Down Expand Up @@ -1050,12 +1050,12 @@ ssize_t pxd_remove(struct fuse_conn *fc, struct pxd_remove_out *remove)
return err;
}

ssize_t pxd_update_size(struct fuse_conn *fc, struct pxd_update_size_out *update_size)
ssize_t pxd_update_size(struct fuse_conn *fc, struct pxd_update_size *update_size)
{
return -EOPNOTSUPP;
}

ssize_t pxd_ioc_update_size(struct fuse_conn *fc, struct pxd_update_size_out *update_size)
ssize_t pxd_ioc_update_size(struct fuse_conn *fc, struct pxd_update_size *update_size)
{
bool found = false;
struct pxd_context *ctx = container_of(fc, struct pxd_context, fc);
Expand Down
2 changes: 1 addition & 1 deletion pxd.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct pxd_read_data_out {
/**
* PXD_UPDATE_SIZE ioctl from user space
*/
struct pxd_update_size_out {
struct pxd_update_size {
uint64_t dev_id;
size_t size;
int context_id;
Expand Down