Move assignment of i_blkbits field #4906
Closed
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.
So this continues my quest in eliminating zfs_inode_update implementation. This change is trivial enough, however when researching it I observed something peculiar. In the linux kernel most filessystem don't set this field directly as its already being set from the generic layer in
inode_init_always
tosb->s_blocksize_bits
. In zfs this field is being set to whatever the current value of the recordsize property is set to. I cannot help it but wonder shouldn't the inode shift bits be set at allocation time to whatever the currents_blocksize_bits
is set to, since this is the size of the record that the inode is going to hold?@behlendorf @dweeezil can you please explain why the inode's shift bits are always seto the minimum allowed shift and not to ilog2(sb->s_blocksize_bits) ?