History

Merge tag 'io_uring-20190323' of git://git.kernel.dk/linux-block

Pull io_uring fixes and improvements from Jens Axboe: "The first five in this series are heavily inspired by the work Al did on the aio side to fix the races there. The last two re-introduce a feature that was in io_uring before it got merged, but which I pulled since we didn't have a good way to have BVEC iters that already have a stable reference. These aren't necessarily related to block, it's just how io_uring pins fixed buffers" * tag 'io_uring-20190323' of git://git.kernel.dk/linux-block: block: add BIO_NO_PAGE_REF flag iov_iter: add ITER_BVEC_FLAG_NO_REF flag io_uring: mark me as the maintainer io_uring: retry bulk slab allocs as single allocs io_uring: fix poll races io_uring: fix fget/fput handling io_uring: add prepped flag io_uring: make io_read/write return an integer io_uring: use regular request ref counts

Linus Torvalds committed 7 years ago

Commit 1bdd3db2 parents 2335cbe 399254a7 files · +284 −257Browse files

Showing the changes to include/linux (2 of 7 files). Show all

Unified · Split

2 files
  1. include/linux/blk_types.h +1 −0
  2. include/linux/uio.h +19 −5
include/linux/blk_types.h+1−0
@@ -215,6 +215,7 @@ struct bio { · 214 unmodified lines
215/*215/*
216 * bio flags216 * bio flags
217 */217 */
218#define BIO_NO_PAGE_REF 0 /* don't put release vec pages */
218#define BIO_SEG_VALID 1 /* bi_phys_segments valid */219#define BIO_SEG_VALID 1 /* bi_phys_segments valid */
219#define BIO_CLONED 2 /* doesn't own data */220#define BIO_CLONED 2 /* doesn't own data */
220#define BIO_BOUNCED 3 /* bio is a bounce bio */221#define BIO_BOUNCED 3 /* bio is a bounce bio */
include/linux/uio.h+19−5
@@ -23,14 +23,23 @@ struct kvec { · 22 unmodified lines
23};23};
24 24
25enum iter_type {25enum iter_type {
26 ITER_IOVEC = 0,26 /* set if ITER_BVEC doesn't hold a bv_page ref */
27 ITER_KVEC = 2,27 ITER_BVEC_FLAG_NO_REF = 2,
28 ITER_BVEC = 4,28
29 ITER_PIPE = 8,29 /* iter types */
30 ITER_DISCARD = 16,30 ITER_IOVEC = 4,
31 ITER_KVEC = 8,
32 ITER_BVEC = 16,
33 ITER_PIPE = 32,
34 ITER_DISCARD = 64,
31};35};
32 36
33struct iov_iter {37struct iov_iter {
38 /*
39 * Bit 0 is the read/write bit, set if we're writing.
40 * Bit 1 is the BVEC_FLAG_NO_REF bit, set if type is a bvec and
41 * the caller isn't expecting to drop a page reference when done.
42 */
34 unsigned int type;43 unsigned int type;
35 size_t iov_offset;44 size_t iov_offset;
36 size_t count;45 size_t count;
@@ -84,6 +93,11 @@ static inline unsigned char iov_iter_rw(const struct iov_iter *i) · 47 unmodified lines
84 return i->type & (READ | WRITE);93 return i->type & (READ | WRITE);
85}94}
86 95
96static inline bool iov_iter_bvec_no_ref(const struct iov_iter *i)
97{
98 return (i->type & ITER_BVEC_FLAG_NO_REF) != 0;
99}
100
87/*101/*
88 * Total number of bytes covered by an iovec.102 * Total number of bytes covered by an iovec.
89 *103 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t