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
F110347800: D2382.diff
Mon, Feb 17, 3:58 AM
Unknown Object (File)
Fri, Jan 31, 11:27 AM
Unknown Object (File)
Fri, Jan 31, 10:26 AM
Unknown Object (File)
Wed, Jan 29, 5:34 PM
Unknown Object (File)
Jan 9 2025, 2:45 PM
Unknown Object (File)
Jan 3 2025, 1:20 AM
Unknown Object (File)
Nov 12 2024, 4:15 AM
Unknown Object (File)
Oct 28 2024, 12:06 AM
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
No Lint Coverage
Unit
No Test Coverage

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

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

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

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

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.