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.8 compat #4892

Closed
wants to merge 3 commits into from
Closed

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Jul 27, 2016

Compatibility patches for Linux 4.8.

The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux/commit/4e49ea4a for complete details.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  See
torvalds/linux/commit/f2150821 for complete details.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion
with REQ_OP_FLUSH.  See torvalds/linux/commit/28a8f0d3 for complete
details.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Requires-spl: refs/pull/564/head
@behlendorf
Copy link
Contributor Author

@tuxoko @dweeezil along with openzfs/spl#564 compatibility patches for Linux 4.8 for review. Thus far the required changes have been very minor.

@behlendorf behlendorf added this to the 0.7.0 milestone Jul 27, 2016
@dweeezil
Copy link
Contributor

@behlendorf Running a kernel at torvalds/linux@8448cefe, SPL at openzfs/spl@0484fbb and ZFS at 0a4e3b6, writes to disk vdevs aren't actually writing anything. I'm investigating the BIO changes further.

@dweeezil
Copy link
Contributor

Something has broken the way we're using the BIO layer in the newest kernels but nothing obvious has jumped out. So, I've been looking at all the kernel commits tagged with "block:" and am doing a little pseudo-bisection to see if I can narrow it down a bit. Backing off the kernel to torvalds/linux@43b62ce makes writes work again which leaves about 40 relevant commits to examine.

@behlendorf
Copy link
Contributor Author

@dweeezil thanks digging in to this. I haven't had a chance to boot a kernel with these changes yet but I certainly will look in to it. Definitely let me know if you identify the issue.

@dweeezil
Copy link
Contributor

@behlendorf I've gotten a few more bisection steps done so I should be getting close.

@tuxoko
Copy link
Contributor

tuxoko commented Jul 28, 2016

I think we cannot use bio->bi_rw = XXX, we need to use bio_set_op_attrs.

@tuxoko
Copy link
Contributor

tuxoko commented Jul 28, 2016

torvalds/linux@f215082
This one introduced bio_set_op_attrs helper but didn't change the encoding of bi_rw
torvalds/linux@4e1b2d5
This one changed the encoding of bi_rw

@dweeezil
Copy link
Contributor

@tuxoko For some reason, I was under the impression that they kept the encoding of bi_rw compatible with legacy code which used assignments but apparently that's not the case.

@dweeezil
Copy link
Contributor

@behlendorf There's one other change I think we ought to make and that's to streamline the handling of bi_rw. See dweeezil/zfs@eef4b2e for a patch which I layered on to your PR. Of course, in light of the need to use the new accessor helpers, it'll have to change even a bit more.

@tuxoko
Copy link
Contributor

tuxoko commented Jul 28, 2016

My kernel build is so unstable, I couldn't even boot it now...
I'll probably wait a bit before working on or testing this issue.

@behlendorf
Copy link
Contributor Author

Yes, that's almost certainly the issue. The initial commit I was looking at didn't change that encoding, that happened latter in torvalds/linux@4e1b2d5 as @tuxoko points out. Sorry about that.

@dweeezil streamlining the bi_rw handling makes sense. Rather than me trying to incorporate your fixes perhaps you could open a new PR when you're ready with your proposed updated version.

@tuxoko
Copy link
Contributor

tuxoko commented Jul 28, 2016

#4899

behlendorf added a commit to behlendorf/zfs that referenced this pull request Jul 29, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
behlendorf added a commit to behlendorf/zfs that referenced this pull request Jul 29, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 3, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 3, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 3, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 5, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
tuxoko pushed a commit to tuxoko/zfs that referenced this pull request Sep 8, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
tuxoko pushed a commit to tuxoko/zfs that referenced this pull request Sep 8, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
tuxoko pushed a commit to tuxoko/zfs that referenced this pull request Sep 8, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
nedbass pushed a commit to nedbass/zfs that referenced this pull request Sep 9, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 19, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 19, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 19, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 29, 2016
The rw argument has been removed from submit_bio/submit_bio_wait.
Callers are now expected to set bio->bi_rw instead of passing it
in.  See torvalds/linux@4e49ea4a for
complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 29, 2016
New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

torvalds/linux@f215082
torvalds/linux@4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4892
Closes openzfs#4899
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 29, 2016
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH.  See torvalds/linux@28a8f0d3
for complete details.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4892
Issue openzfs#4899
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.

3 participants