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)
Tue, Nov 12, 4:15 AM
Unknown Object (File)
Mon, Oct 28, 12:06 AM
Unknown Object (File)
Oct 24 2024, 6:10 PM
Unknown Object (File)
Oct 21 2024, 1:26 PM
Unknown Object (File)
Sep 30 2024, 1:54 PM
Unknown Object (File)
Sep 24 2024, 6:15 AM
Unknown Object (File)
Sep 19 2024, 4:31 PM
Unknown Object (File)
Sep 11 2024, 1:36 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
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.