Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

UAPI: Unexport linux/blk_types.h

It seems that was linux/blk_types.h incorrectly exported to fix up some missing
bits required by the exported parts of linux/fs.h (READ, WRITE, READA, etc.).

So unexport linux/blk_types.h and unexport the relevant bits of linux/fs.h.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jens Axboe <jaxboe@fusionio.com>
cc: Tejun Heo <tj@kernel.org>
cc: Al Viro <viro@ZenIV.linux.org.uk>

+59 -61
-1
include/linux/Kbuild
··· 69 69 header-y += baycom.h 70 70 header-y += bfs_fs.h 71 71 header-y += binfmts.h 72 - header-y += blk_types.h 73 72 header-y += blkpg.h 74 73 header-y += blktrace_api.h 75 74 header-y += bpqether.h
+59 -60
include/linux/fs.h
··· 8 8 9 9 #include <linux/limits.h> 10 10 #include <linux/ioctl.h> 11 - #include <linux/blk_types.h> 12 11 #include <linux/types.h> 13 12 14 13 /* ··· 115 116 116 117 /* File was opened by fanotify and shouldn't generate fanotify events */ 117 118 #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) 118 - 119 - /* 120 - * The below are the various read and write types that we support. Some of 121 - * them include behavioral modifiers that send information down to the 122 - * block layer and IO scheduler. Terminology: 123 - * 124 - * The block layer uses device plugging to defer IO a little bit, in 125 - * the hope that we will see more IO very shortly. This increases 126 - * coalescing of adjacent IO and thus reduces the number of IOs we 127 - * have to send to the device. It also allows for better queuing, 128 - * if the IO isn't mergeable. If the caller is going to be waiting 129 - * for the IO, then he must ensure that the device is unplugged so 130 - * that the IO is dispatched to the driver. 131 - * 132 - * All IO is handled async in Linux. This is fine for background 133 - * writes, but for reads or writes that someone waits for completion 134 - * on, we want to notify the block layer and IO scheduler so that they 135 - * know about it. That allows them to make better scheduling 136 - * decisions. So when the below references 'sync' and 'async', it 137 - * is referencing this priority hint. 138 - * 139 - * With that in mind, the available types are: 140 - * 141 - * READ A normal read operation. Device will be plugged. 142 - * READ_SYNC A synchronous read. Device is not plugged, caller can 143 - * immediately wait on this read without caring about 144 - * unplugging. 145 - * READA Used for read-ahead operations. Lower priority, and the 146 - * block layer could (in theory) choose to ignore this 147 - * request if it runs into resource problems. 148 - * WRITE A normal async write. Device will be plugged. 149 - * WRITE_SYNC Synchronous write. Identical to WRITE, but passes down 150 - * the hint that someone will be waiting on this IO 151 - * shortly. The write equivalent of READ_SYNC. 152 - * WRITE_ODIRECT Special case write for O_DIRECT only. 153 - * WRITE_FLUSH Like WRITE_SYNC but with preceding cache flush. 154 - * WRITE_FUA Like WRITE_SYNC but data is guaranteed to be on 155 - * non-volatile media on completion. 156 - * WRITE_FLUSH_FUA Combination of WRITE_FLUSH and FUA. The IO is preceded 157 - * by a cache flush and data is guaranteed to be on 158 - * non-volatile media on completion. 159 - * 160 - */ 161 - #define RW_MASK REQ_WRITE 162 - #define RWA_MASK REQ_RAHEAD 163 - 164 - #define READ 0 165 - #define WRITE RW_MASK 166 - #define READA RWA_MASK 167 - #define KERNEL_READ (READ|REQ_KERNEL) 168 - #define KERNEL_WRITE (WRITE|REQ_KERNEL) 169 - 170 - #define READ_SYNC (READ | REQ_SYNC) 171 - #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) 172 - #define WRITE_ODIRECT (WRITE | REQ_SYNC) 173 - #define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH) 174 - #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) 175 - #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) 176 - 177 119 178 120 /* 179 121 * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector ··· 357 417 #include <linux/uidgid.h> 358 418 #include <linux/lockdep.h> 359 419 #include <linux/percpu-rwsem.h> 420 + #include <linux/blk_types.h> 360 421 361 422 #include <asm/byteorder.h> 362 423 ··· 393 452 typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, 394 453 ssize_t bytes, void *private, int ret, 395 454 bool is_async); 455 + 456 + /* 457 + * The below are the various read and write types that we support. Some of 458 + * them include behavioral modifiers that send information down to the 459 + * block layer and IO scheduler. Terminology: 460 + * 461 + * The block layer uses device plugging to defer IO a little bit, in 462 + * the hope that we will see more IO very shortly. This increases 463 + * coalescing of adjacent IO and thus reduces the number of IOs we 464 + * have to send to the device. It also allows for better queuing, 465 + * if the IO isn't mergeable. If the caller is going to be waiting 466 + * for the IO, then he must ensure that the device is unplugged so 467 + * that the IO is dispatched to the driver. 468 + * 469 + * All IO is handled async in Linux. This is fine for background 470 + * writes, but for reads or writes that someone waits for completion 471 + * on, we want to notify the block layer and IO scheduler so that they 472 + * know about it. That allows them to make better scheduling 473 + * decisions. So when the below references 'sync' and 'async', it 474 + * is referencing this priority hint. 475 + * 476 + * With that in mind, the available types are: 477 + * 478 + * READ A normal read operation. Device will be plugged. 479 + * READ_SYNC A synchronous read. Device is not plugged, caller can 480 + * immediately wait on this read without caring about 481 + * unplugging. 482 + * READA Used for read-ahead operations. Lower priority, and the 483 + * block layer could (in theory) choose to ignore this 484 + * request if it runs into resource problems. 485 + * WRITE A normal async write. Device will be plugged. 486 + * WRITE_SYNC Synchronous write. Identical to WRITE, but passes down 487 + * the hint that someone will be waiting on this IO 488 + * shortly. The write equivalent of READ_SYNC. 489 + * WRITE_ODIRECT Special case write for O_DIRECT only. 490 + * WRITE_FLUSH Like WRITE_SYNC but with preceding cache flush. 491 + * WRITE_FUA Like WRITE_SYNC but data is guaranteed to be on 492 + * non-volatile media on completion. 493 + * WRITE_FLUSH_FUA Combination of WRITE_FLUSH and FUA. The IO is preceded 494 + * by a cache flush and data is guaranteed to be on 495 + * non-volatile media on completion. 496 + * 497 + */ 498 + #define RW_MASK REQ_WRITE 499 + #define RWA_MASK REQ_RAHEAD 500 + 501 + #define READ 0 502 + #define WRITE RW_MASK 503 + #define READA RWA_MASK 504 + #define KERNEL_READ (READ|REQ_KERNEL) 505 + #define KERNEL_WRITE (WRITE|REQ_KERNEL) 506 + 507 + #define READ_SYNC (READ | REQ_SYNC) 508 + #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) 509 + #define WRITE_ODIRECT (WRITE | REQ_SYNC) 510 + #define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH) 511 + #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) 512 + #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) 396 513 397 514 /* 398 515 * Attribute flags. These should be or-ed together to figure out what