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

PWX-21175: handle kernel crash in fastpath #229

Merged
merged 10 commits into from
Sep 14, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
initialize bio size for discards
Signed-off-by: Lakshmi Narasimhan Sundararajan <lns@portworx.com>
  • Loading branch information
Lakshmi Narasimhan Sundararajan committed Sep 6, 2021
commit cfbc34754282ae8fb0cb3ef8832ec3a304a5f630
14 changes: 9 additions & 5 deletions pxd_bio_blkmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,16 @@ static int prep_root_bio(struct fp_root_context *fproot) {
BIO_SET_OP_ATTRS(bio, BIO_OP(rq->bio), op_flags);
bio->bi_private = fproot;

if (!specialops && (blk_rq_bytes(rq) != 0)) {
rq_for_each_segment(bv, rq, rq_iter) {
unsigned len =
bio_add_page(bio, BVEC(bv).bv_page, BVEC(bv).bv_len,
if (specialops) {
BIO_SIZE(bio) = blk_rq_bytes(rq);
} else {
if (blk_rq_bytes(rq) != 0) {
rq_for_each_segment(bv, rq, rq_iter) {
unsigned len =
bio_add_page(bio, BVEC(bv).bv_page, BVEC(bv).bv_len,
BVEC(bv).bv_offset);
BUG_ON(len != BVEC(bv).bv_len);
BUG_ON(len != BVEC(bv).bv_len);
}
}
}

Expand Down