mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
Make aio code use struct io_iocb_common to support 32 bit architectures
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
This commit is contained in:
parent
08802949e2
commit
9942fc82d4
@ -76,9 +76,9 @@ void generic_make_request(struct bio *bio)
|
|||||||
switch (bio_op(bio)) {
|
switch (bio_op(bio)) {
|
||||||
case REQ_OP_READ:
|
case REQ_OP_READ:
|
||||||
iocb.aio_lio_opcode = IO_CMD_PREADV;
|
iocb.aio_lio_opcode = IO_CMD_PREADV;
|
||||||
iocb.u.v.vec = iov;
|
iocb.u.c.buf = iov;
|
||||||
iocb.u.v.nr = i;
|
iocb.u.c.nbytes = i;
|
||||||
iocb.u.v.offset = bio->bi_iter.bi_sector << 9;
|
iocb.u.c.offset = bio->bi_iter.bi_sector << 9;
|
||||||
|
|
||||||
atomic_inc(&running_requests);
|
atomic_inc(&running_requests);
|
||||||
ret = io_submit(aio_ctx, 1, &iocbp);
|
ret = io_submit(aio_ctx, 1, &iocbp);
|
||||||
@ -87,9 +87,9 @@ void generic_make_request(struct bio *bio)
|
|||||||
break;
|
break;
|
||||||
case REQ_OP_WRITE:
|
case REQ_OP_WRITE:
|
||||||
iocb.aio_lio_opcode = IO_CMD_PWRITEV;
|
iocb.aio_lio_opcode = IO_CMD_PWRITEV;
|
||||||
iocb.u.v.vec = iov;
|
iocb.u.c.buf = iov;
|
||||||
iocb.u.v.nr = i;
|
iocb.u.c.nbytes = i;
|
||||||
iocb.u.v.offset = bio->bi_iter.bi_sector << 9;
|
iocb.u.c.offset = bio->bi_iter.bi_sector << 9;
|
||||||
|
|
||||||
atomic_inc(&running_requests);
|
atomic_inc(&running_requests);
|
||||||
ret = io_submit(aio_ctx, 1, &iocbp);
|
ret = io_submit(aio_ctx, 1, &iocbp);
|
||||||
|
Loading…
Reference in New Issue
Block a user