aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2009-09-12 01:35:37 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-14 02:24:53 -0400
commit3d2257f157c2324acbc0fa0fa54e8626a987edd2 (patch)
treea3c05936cc4fbf49474dae072871dbab909c9ae4 /include
parentb8a9ae779f2c7049071034661e09cb7e1e82250c (diff)
Make DISCARD_BARRIER and DISCARD_NOBARRIER writes instead of reads
The commands are conceptually writes, and in the case of IDE and SCSI commands actually are writes. They were only reads because we thought that would interact better with the elevators. Now the elevators know about discard requests, that advantage no longer exists. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c1f993515f51..7f5a8ad25008 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -161,8 +161,8 @@ struct inodes_stat_t {
161 * These aren't really reads or writes, they pass down information about 161 * These aren't really reads or writes, they pass down information about
162 * parts of device that are now unused by the file system. 162 * parts of device that are now unused by the file system.
163 */ 163 */
164#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) 164#define DISCARD_NOBARRIER (WRITE | (1 << BIO_RW_DISCARD))
165#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) 165#define DISCARD_BARRIER (DISCARD_NOBARRIER | (1 << BIO_RW_BARRIER))
166 166
167#define SEL_IN 1 167#define SEL_IN 1
168#define SEL_OUT 2 168#define SEL_OUT 2