-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add support 32 bit FS_IOC32_{GET|SET}FLAGS compat ioctls #4477
Conversation
We need 32 bit userspace FS_IOC32_GETFLAGS and FS_IOC32_SETFLAGS compat ioctls for systems such as powerpc64. We use the normal compat ioctl idiom as used by a variety of file systems to provide this support. Signed-off-by: Colin Ian King <[email protected]>
cmd = FS_IOC_SETFLAGS; | ||
break; | ||
default: | ||
return (-ENOTTY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the other Linux filesystems return -ENOIOCTLCMD
in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autofs4, btrfs, ceph, cifs, hfsplus, jffs2, jffs, xfs return -ENOTTY, ncpfs returns -EINVAL, and ubifs returns -ENOTTY and also -ENOIOCTLCMD. The rest return -ENOIOCTLCMD. So, I'm not sure what the correct error return is. According to ioctl(2) manual, -ENOTTY seems like the documented return for a command that is not recognised for the specific object being operated on. So shall we leave it as -ENOTTY for now and not change that functionality in this particular commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I was just basing my comment off what ext2/3/4 does. I'm glad you took a bigger sample. Yes, I'm OK leaving this as -ENOTTY. It can always be changed if needed in a latter commit if needed.
There's going to be an identical problem to this in |
How do you want to play this? I'm running out of time on this today, it's rather late now UK time. I'm happy if you drop this patch and fix it appropriately for the zvol_compat_ioctl case and the more standard error return. I can then give it a spin first thing Friday morning. Or I can sort it out tomorrow. I'm easy either way. |
Sure, if you like I can open a new PR which makes the corresponding |
And since your original patch then doesn't require any changes we could just leave the |
Lets go for that zvol_compat_ioctl() as another patch which I can test sooner than later 'cos I've got access to some kit for another few more days. I have a window of a few more days and then we go for final freeze on fixes for 16.04. |
@ColinIanKing sounds good. I'll open a new PR with the |
@ColinIanKing I took a closer look at
I've merged your proposed patch to master, and we'll cherry-pick it back on to the release branch. f7b939b Add support 32 bit FS_IOC32_{GET|SET}FLAGS compat ioctls |
We need 32 bit userspace FS_IOC32_GETFLAGS and FS_IOC32_SETFLAGS compat ioctls for systems such as powerpc64. We use the normal compat ioctl idiom as used by a variety of file systems to provide this support. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4477
We need 32 bit userspace FS_IOC32_GETFLAGS and FS_IOC32_SETFLAGS
compat ioctls for systems such as powerpc64. We use the normal
compat ioctl idiom as used by a variety of file systems to provide
this support.
Signed-off-by: Colin Ian King [email protected]