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

Linux 4.12 compat: super_setup_bdi_name() #6089

Merged
merged 1 commit into from
May 2, 2017

Conversation

behlendorf
Copy link
Contributor

All filesystems were converted to dynamically allocated BDIs. The
destruction of backing_dev_info structures is handled as part of
super block destruction.

@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label May 1, 2017
@mention-bot
Copy link

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

@behlendorf behlendorf requested a review from tuxoko May 1, 2017 21:51
dnl # 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
dnl # 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
dnl # 4.0 - 4.10, bdi_setup_and_register() takes 2 arguments.
dnl # 4.11 - x.y, super_setup_bdi_name() new interface.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.12?

@@ -1606,9 +1607,8 @@ zfs_domount(struct super_block *sb, zfs_mnt_t *zm, int silent)
sb->s_blocksize = recordsize;
sb->s_blocksize_bits = ilog2(recordsize);
zfsvfs->z_bdi.ra_pages = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to modify sb->s_bdi->ra_pages for 4.12+?

Also, we may want to get rid of z_bdi to save space.

@behlendorf behlendorf force-pushed the updated-bdi-compat branch from d053c16 to cb8d5e3 Compare May 2, 2017 00:05
@behlendorf
Copy link
Contributor Author

@tuxoko good points, how about this. The updated patch refactors the code such that all backing_dev_info struct management is handled in the wrapper functions. After a successful call to zpl_bdi_setup() the sb->s_sb will contain a pointer to the backing_dev_info, it should be destroyed by zpl_bdi_destroy(). This allowed us to remove the z_bsi from the zfsvfs_t and rely on the pointer in the super block.

@tuxoko
Copy link
Contributor

tuxoko commented May 2, 2017

One nit, the commit title should be 4.12

@behlendorf
Copy link
Contributor Author

Indeed, I'll fix it in the merge unless I need to refresh this for other reasons. Thanks.

All filesystems were converted to dynamically allocated BDIs.  The
destruction of backing_dev_info structures is handled as part of
super block destruction.  Refactor the code to abstract away the
details of seting up and destroying an sbi.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf force-pushed the updated-bdi-compat branch from cb8d5e3 to 195d47b Compare May 2, 2017 00:54
@behlendorf behlendorf changed the title Linux 4.11 compat: super_setup_bdi_name() Linux 4.12 compat: super_setup_bdi_name() May 2, 2017
@behlendorf behlendorf merged commit 7dae2c8 into openzfs:master May 2, 2017
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jun 5, 2017
All filesystems were converted to dynamically allocated BDIs.  The
destruction of backing_dev_info structures is handled as part of
super block destruction.  Refactor the code to abstract away the
details of creating and destroying a BDI.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6089
tonyhutter pushed a commit that referenced this pull request Jun 9, 2017
All filesystems were converted to dynamically allocated BDIs.  The
destruction of backing_dev_info structures is handled as part of
super block destruction.  Refactor the code to abstract away the
details of creating and destroying a BDI.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6089
tonyhutter added a commit to tonyhutter/zfs that referenced this pull request Jul 10, 2017
This includes code that was mistakenly left out of the 7dae2c8 merge into
0.6.5.10.  Its inclusion fixes a kernel warning on Kubuntu 17.04:

	WARN_ON(sb->s_bdi != &noop_backing_dev_info);

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6089
Closes openzfs#6324
(backported from zfs upstream commit 7dae2c8)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
tonyhutter added a commit to tonyhutter/zfs that referenced this pull request Jul 10, 2017
This includes code that was mistakenly left out of the 7dae2c8 merge into
0.6.5.10.  Its inclusion fixes a kernel warning on Kubuntu 17.04:

	WARN_ON(sb->s_bdi != &noop_backing_dev_info);

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6089
Closes openzfs#6324
(backported from zfs upstream commit 7dae2c8)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
tonyhutter added a commit that referenced this pull request Jul 20, 2017
This includes code that was mistakenly left out of the 7dae2c8 merge into
0.6.5.10.  Its inclusion fixes a kernel warning on Kubuntu 17.04:

	WARN_ON(sb->s_bdi != &noop_backing_dev_info);

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6089
Closes #6324
(backported from zfs upstream commit 7dae2c8)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
@behlendorf behlendorf deleted the updated-bdi-compat 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
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants