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

Allow sys/vdev_disk.h to have OS fields #10452

Merged
merged 1 commit into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions include/sys/vdev_disk.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,5 @@

#ifdef _KERNEL
#include <sys/vdev.h>

typedef struct vdev_disk {
ddi_devid_t vd_devid;
char *vd_minor;
struct block_device *vd_bdev;
Copy link

Choose a reason for hiding this comment

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

I'm a little surprised this ever worked on FreeBSD 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think FreeBSD even includes the header which is why it was OK.

krwlock_t vd_lock;
} vdev_disk_t;

#endif /* _KERNEL */
#endif /* _SYS_VDEV_DISK_H */
5 changes: 5 additions & 0 deletions module/os/linux/zfs/vdev_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
#include <linux/msdos_fs.h>
#include <linux/vfs_compat.h>

typedef struct vdev_disk {
struct block_device *vd_bdev;
krwlock_t vd_lock;
} vdev_disk_t;

/*
* Unique identifier for the exclusive vdev holder.
*/
Expand Down