Commit 1af60fbd759d31f565552fea315c2033947cfbe6
Committed by
Jens Axboe
1 parent
1a1238a7dd
Exists in
master
and in
39 other branches
block: get rid of the WRITE_ODIRECT flag
Hi, The WRITE_ODIRECT flag is only used in one place, and that code path happens to also call blk_run_address_space. The introduction of this flag, then, could result in the device being unplugged twice for every I/O. Further, with the batching changes in the next patch, we don't want an O_DIRECT write to imply a queue unplug. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Showing 2 changed files with 1 additions and 3 deletions Side-by-side Diff
fs/direct-io.c
include/linux/fs.h
... | ... | @@ -129,7 +129,6 @@ |
129 | 129 | * WRITE_SYNC Like WRITE_SYNC_PLUG, but also unplugs the device |
130 | 130 | * immediately after submission. The write equivalent |
131 | 131 | * of READ_SYNC. |
132 | - * WRITE_ODIRECT Special case write for O_DIRECT only. | |
133 | 132 | * SWRITE_SYNC |
134 | 133 | * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. |
135 | 134 | * See SWRITE. |
... | ... | @@ -151,7 +150,6 @@ |
151 | 150 | #define READ_META (READ | (1 << BIO_RW_META)) |
152 | 151 | #define WRITE_SYNC_PLUG (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) |
153 | 152 | #define WRITE_SYNC (WRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) |
154 | -#define WRITE_ODIRECT (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) | |
155 | 153 | #define SWRITE_SYNC_PLUG \ |
156 | 154 | (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) |
157 | 155 | #define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) |