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

compilation fix for 4.9 kernel #88

Merged
merged 2 commits into from
Feb 11, 2020
Merged
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: 5 additions & 3 deletions pxd_fastpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,9 @@ static int __do_bio_filebacked(struct pxd_device *pxd_dev, struct pxd_io_tracker
ret = _pxd_flush(pxd_dev, iot->file);
goto out;
case REQ_OP_DISCARD:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
case REQ_OP_WRITE_ZEROES:
#endif
ret = _pxd_bio_discard(pxd_dev, iot->file, bio, pos);
goto out;
default:
Expand Down Expand Up @@ -1226,7 +1228,7 @@ void pxd_make_request_fastpath(struct request_queue *q, struct bio *bio)
#endif
{
struct pxd_device *pxd_dev = q->queuedata;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
unsigned int rw = bio_op(bio);
#else
unsigned int rw = bio_rw(bio);
Expand All @@ -1237,7 +1239,7 @@ void pxd_make_request_fastpath(struct request_queue *q, struct bio *bio)
struct pxd_io_tracker *head;
struct thread_context *tc;

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
if (!pxd_dev) {
#else
if (rw == READA) rw = READ;
Expand Down Expand Up @@ -1297,7 +1299,7 @@ void pxd_make_request_fastpath(struct request_queue *q, struct bio *bio)
if (!head) {
BIO_ENDIO(bio, -ENOMEM);

// non-trivial high memory pressure failing IO
// trivial high memory pressure failing IO
return BLK_QC_RETVAL;
}

Expand Down