Page MenuHomeFreeBSD

zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget
ClosedPublic

Authored by avg on Apr 28 2015, 6:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:38 AM
Unknown Object (File)
Fri, Apr 26, 6:32 AM
Unknown Object (File)
Mar 24 2024, 9:08 AM
Unknown Object (File)
Mar 20 2024, 1:06 AM
Unknown Object (File)
Jan 25 2024, 8:02 AM
Unknown Object (File)
Dec 19 2023, 11:31 PM
Unknown Object (File)
Nov 1 2023, 12:59 PM
Unknown Object (File)
Oct 31 2023, 11:19 PM
Subscribers

Details

Summary

This allows to ensure that we do not write a file that was opened
for reading only or vice versa.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg retitled this revision from to zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added reviewers: delphij, smh, pjd.
delphij edited edge metadata.

Looks good to me.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
5438 ↗(On Diff #5046)

I think you would want to upstream a change that modifies this to fp = getf(fd); so we don't diverge here.

This revision is now accepted and ready to land.Apr 28 2015, 8:15 AM
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
5438 ↗(On Diff #5046)

That makes sense and I would love to do it, but given how hard (for me) is to submit an upstream change it might take me a while.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
5423 ↗(On Diff #5046)

Please also note that the current code has a bug here: we need CAP_WRITE not CAP_READ.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
5438 ↗(On Diff #5046)

As matt is on the team here and illumos advocate now is this something he can assist with. I myself has also found that process very time consuming.

This revision was automatically updated to reflect the committed changes.
This comment was removed by avg.