Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Linux 4.8 compat: rw_semaphore atomic_long_t count #564

Closed
wants to merge 1 commit into from

Conversation

behlendorf
Copy link
Contributor

For non-rwsem-spinlocks the "count" member was changed from a
"long" to "atomic_long_t" type. A configure check has been
added to detect this change along with new versions of the
_rwsem_tryupgrade() function and RWSEM_COUNT() macro. See
torvalds/linux/commit/8ee62b18 for complete details.

Signed-off-by: Brian Behlendorf [email protected]
Issue #563

@behlendorf
Copy link
Contributor Author

@tuxoko @dweeezil thus far this appears to be the only compatibility issue with the latest kernel. If you guys could review this we can resolve the new kernel.org buildbot failures. You'll probably want to wait for the buildbot test results in openzfs/zfs#4887 even though I did test this locally.

@behlendorf
Copy link
Contributor Author

behlendorf commented Jul 27, 2016

Looks like I spoke too soon, there's at least one other build issue to resolve.

#ifdef HAVE_RWSEM_ACTIVITY
#define RWSEM_COUNT(sem) sem->activity
#else
#ifdef HAVE_RWSEM_ATOMIC_LONG_COUNT
Copy link
Contributor

Choose a reason for hiding this comment

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

#elif defined()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I went back and forth about doing this as an #elif defined(). I'll refresh the patch with that change since after looking at the whole patch I think I like that better too.

@tuxoko
Copy link
Contributor

tuxoko commented Jul 27, 2016

submit_bio change
torvalds/linux@4e49ea4

@behlendorf
Copy link
Contributor Author

submit_bio change

While I'll all set up for this I'll work up a patch. It looks straight forward, just update vdev_submit_bio to OR in the bits to bio->bi_rw.

For non-rwsem-spinlocks the "count" member was changed from a
"long" to "atomic_long_t" type.  A configure check has been
added to detect this change along with new versions of the
_rwsem_tryupgrade() function and RWSEM_COUNT() macro.  See
torvalds/linux/commit/8ee62b18 for complete details.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#563
@dweeezil
Copy link
Contributor

dweeezil commented Jul 28, 2016

@behlendorf [EDIT... oops, thought I was commenting on the ZFS PR] These all (including the SPL change) Both this and the related ZFS changes LGTM at first glance. I'll be testing them out on a current master kernel shortly.

@behlendorf
Copy link
Contributor Author

Merged as:

b7c7008 Linux 4.8 compat: rw_semaphore atomic_long_t count

@behlendorf behlendorf closed this Jul 29, 2016
@behlendorf behlendorf deleted the issue-563 branch July 28, 2017 22:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants