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

Retire .write/.read file operations #5588

Closed
wants to merge 1 commit into from

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Jan 13, 2017

The .write/.read file operations callbacks can be retired since
support for .read_iter/.write_iter and .aio_read/.aio_write has
been added. The vfs_write()/vfs_read() entry functions will
select the correct interface for the kernel. This is desirable
because all VFS write/read operations now rely on common code.

This change also add the generic write checks to make sure that
ulimits are enforced correctly on write. A similar check was
added to zpl_fallocate() so the truncate case is also handled
properly.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)

@mention-bot
Copy link

@behlendorf, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ryao, @tuxoko and @dweeezil to be potential reviewers.

@tuxoko
Copy link
Contributor

tuxoko commented Jan 13, 2017

Unfortunately the prototype of generic_write_check is changed when aio_write is retired in kernel. However, currently we use iter_write when it exists, which is introduced before that. So this won't compile between the time iter_write introduced and aio_write retired

@behlendorf
Copy link
Contributor Author

Not surprisingly it looks like we're going to need a wrapper function and configure check for generic_write_checks().

The .write/.read file operations callbacks can be retired since
support for .read_iter/.write_iter and .aio_read/.aio_write has
been added.  The vfs_write()/vfs_read() entry functions will
select the correct interface for the kernel.  This is desirable
because all VFS write/read operations now rely on common code.

This change also add the generic write checks to make sure that
ulimits are enforced correctly on write.  A similar check was
added to zpl_fallocate() so the truncate case is also handled
properly.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5587
@behlendorf
Copy link
Contributor Author

@tuxoko I'll see about adding some compatibility code for the prototype early next week assuming you're OK with the overall approach taken in this patch.

@tuxoko
Copy link
Contributor

tuxoko commented Jan 13, 2017

@behlendorf
Yeah, but you should also add generic_segment_checks to aio_read

@behlendorf
Copy link
Contributor Author

I'll add it when I next refresh this.

@behlendorf
Copy link
Contributor Author

Superseded by #5673.

@behlendorf behlendorf closed this Jan 27, 2017
@behlendorf behlendorf deleted the issue-5587 branch April 19, 2021 19:33
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.

4 participants