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

[WIP] Linux block device API updates. #11388

Closed
wants to merge 1 commit into from

Conversation

rkitover
Copy link
Contributor

@rkitover rkitover commented Dec 22, 2020

WORK IN PROGRESS PLEASE DO NOT MERGE

In 4e7b5671c6a883d94b5428e1a9c141bbd56cb2a6 Linux makes major changes to
the block device API.

To accommodate this, change the vdev_lookup_bdev() API signature to:

boolean_t vdev_lookup_bdev(const char *path, dev_t *dev);

and handle calling bdput(struct block_device *) for the older variants,
as this is no longer required.

Motivation and Context

Compatibility with linux git master.

#11387

Block dev API changes are in:

torvalds/linux@4e7b567

get_disk_and_module() removed in:

torvalds/linux@4e7b567

Description

There are more problems to fix here, ./configure now works, but the build still fails on errors like:

In file included from /usr/src/zfs/include/os/linux/spl/sys/uio.h:31,
                 from /usr/src/zfs/include/os/linux/spl/sys/sunddi.h:28,
                 from /usr/src/zfs/include/sys/zfs_context.h:69,
                 from /usr/src/zfs/module/zfs/dnode_sync.c:29:
/usr/src/zfs/include/os/linux/kernel/linux/blkdev_compat.h: В функции «get_disk_and_module»:
/usr/src/zfs/include/os/linux/kernel/linux/blkdev_compat.h:106:10: ошибка: неявная декларация функции «get_disk»; имелось в виду «put_disk»? [-Werror=implicit-function-declaration]
  106 |  return (get_disk(disk));
      |          ^~~~~~~~
      |          put_disk

How Has This Been Tested?

Types of changes

  • 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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@rkitover rkitover marked this pull request as draft December 22, 2020 23:04
WORK IN PROGRESS PLEASE DO NOT MERGE

In 4e7b5671c6a883d94b5428e1a9c141bbd56cb2a6 Linux makes major changes to
the block device API.

To accommodate this, change the vdev_lookup_bdev() API signature to:

boolean_t vdev_lookup_bdev(const char *path, dev_t *dev);

and handle calling bdput(struct block_device *) for the older variants,
as this is no longer required.

In 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae get_disk_and_module() was
removed, and get_disk() is also not available.
@rkitover rkitover force-pushed the linux-block-device-api branch from 0d2ff21 to 97792b6 Compare December 23, 2020 00:01
@behlendorf
Copy link
Contributor

behlendorf commented Dec 23, 2020

@rkitover thanks for taking a look at this. As it turns out I gave sorting this mess out a try myself and opened #11390. I'd have probably held off if I knew you were already working on it. Since you've already started taking a look at this code would you mind reviewing my proposed changes.

@rkitover
Copy link
Contributor Author

Absolutely, looking now.

@behlendorf
Copy link
Contributor

Thanks. I just refreshed it to resolve two build failures on some earlier kernels (4.4) with the IO accounting changes.

@rkitover
Copy link
Contributor Author

Closing, superseded by #11390.

@rkitover rkitover closed this Dec 24, 2020
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.

2 participants