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

px_fuse ioctl to abort ios #156

Open
wants to merge 2 commits into
base: v2.5.0
Choose a base branch
from

Conversation

vjs-px
Copy link
Contributor

@vjs-px vjs-px commented Sep 30, 2020

new ioctl to abort all iOS
Note: this should be used as a last resort to avoid node restart when px is stuck

@vjs-px vjs-px requested a review from prabirpaul September 30, 2020 01:35
pxd.h Outdated
@@ -28,6 +28,7 @@
#define PXD_IOC_DUMP_FC_INFO _IO(PXD_IOCTL_MAGIC, 1) /* 0x505801 */
#define PXD_IOC_GET_VERSION _IO(PXD_IOCTL_MAGIC, 2) /* 0x505802 */
#define PXD_IOC_INIT _IO(PXD_IOCTL_MAGIC, 3) /* 0x505803 */
#define PXD_IOC_ABORT_IOS _IO(PXD_IOCTL_MAGIC, 4) /* 0x505804 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u set this number based on master, so it's compatible with the newer list of ioctls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will change this

@@ -1079,6 +1079,15 @@ __acquires(fc->lock)
end_requests(fc, &fc->processing);
}

void fuse_abort_all_ios(struct fuse_conn *fc)
{
printk(KERN_INFO "PXD_IOCTL : Aborting all requests...");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the context and usage of this function, it should be in pxd.c alongside pxd_abort_context()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end_queued_requests function is static and defined in dev.c, so I had to create another function in the same file to export it.

in v2.5.0, we have pxd_timeout(), which calls fuse_abort_conn() in dev.c, that in turn calls end_queued_requests()

I will leave this as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants