-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Linux: s_op: use .free_inode #16788
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
Open
snajpa
wants to merge
1
commit into
openzfs:master
Choose a base branch
from
vpsfreecz:fix-lowmem-free-inode
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Linux: s_op: use .free_inode #16788
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_FREE], [ | ||
ZFS_LINUX_TEST_SRC([inode_free], [ | ||
#include <linux/fs.h> | ||
|
||
static void inode_free(struct inode *ip) | ||
{ return; } | ||
|
||
static const struct super_operations | ||
iops __attribute__ ((unused)) = { | ||
.free_inode = inode_free, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_INODE_FREE], [ | ||
AC_MSG_CHECKING([whether inode_free() is available]) | ||
ZFS_LINUX_TEST_RESULT([inode_free], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_INODE_FREE, 1, | ||
[.inode_free() i_op exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I believe we still want to register
.destroy_inode
even when.free_inode
is available. It's just that the RCU-delayed parts have been moved in to.free_inode
.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.
Well I tried to adhere to the note in
porting.rst
to the fullest extent possible, as it doesn't even say that .free_inode is now required if one doesn't want to run into unexplainable behavior (perhaps only with some kernel releases along the way to full folio conversion); I was wondering what more in terms of problems can we expect if I try to go against that note, in a sense of leaving.destroy_inode
as it was.Do you see any consequences of merging
destroy_inode
intoevict_inode
from the ZFS point of view? I couldn't think of anything so that's why I decided to do away withdestroy_inode
by merging it, just an abundance of caution, aka "what else aren't they telling me in the note, when they didn't even say it's mandatory but just recommended"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.
I mean, if the inode gets as far as
evict_inode
being called on it, it's already done andzfs_zget
is going to keep looping until it disappears completely, isn't it so?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.
@behlendorf ping, what do you think, do we keep it as I propose? I'd like to push this forward but this seems like it needs further input from you :) Thanks!