aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
commit2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch)
treef8b3ee40674ce4acd5508a0a0bf52a30904caf6c /include/linux/fs.h
parent7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff)
parentde75d60d5ea235e6e09f4962ab22541ce0fe176a (diff)
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits) block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n xen-blkfront: fix missing out label blkdev: fix blkdev_issue_zeroout return value block: update request stacking methods to support discards block: fix missing export of blk_types.h writeback: fix bad _bh spinlock nesting drbd: revert "delay probes", feature is being re-implemented differently drbd: Initialize all members of sync_conf to their defaults [Bugz 315] drbd: Disable delay probes for the upcomming release writeback: cleanup bdi_register writeback: add new tracepoints writeback: remove unnecessary init_timer call writeback: optimize periodic bdi thread wakeups writeback: prevent unnecessary bdi threads wakeups writeback: move bdi threads exiting logic to the forker thread writeback: restructure bdi forker loop a little writeback: move last_active to bdi writeback: do not remove bdi from bdi_list writeback: simplify bdi code a little writeback: do not lose wake-ups in bdi threads ... Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a8ccf85b8691..1542e0e52b2e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -8,6 +8,7 @@
8 8
9#include <linux/limits.h> 9#include <linux/limits.h>
10#include <linux/ioctl.h> 10#include <linux/ioctl.h>
11#include <linux/blk_types.h>
11 12
12/* 13/*
13 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change 14 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
@@ -121,7 +122,7 @@ struct inodes_stat_t {
121 * immediately wait on this read without caring about 122 * immediately wait on this read without caring about
122 * unplugging. 123 * unplugging.
123 * READA Used for read-ahead operations. Lower priority, and the 124 * READA Used for read-ahead operations. Lower priority, and the
124 * block layer could (in theory) choose to ignore this 125 * block layer could (in theory) choose to ignore this
125 * request if it runs into resource problems. 126 * request if it runs into resource problems.
126 * WRITE A normal async write. Device will be plugged. 127 * WRITE A normal async write. Device will be plugged.
127 * SWRITE Like WRITE, but a special case for ll_rw_block() that 128 * SWRITE Like WRITE, but a special case for ll_rw_block() that
@@ -140,7 +141,7 @@ struct inodes_stat_t {
140 * SWRITE_SYNC 141 * SWRITE_SYNC
141 * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. 142 * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer.
142 * See SWRITE. 143 * See SWRITE.
143 * WRITE_BARRIER Like WRITE, but tells the block layer that all 144 * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all
144 * previously submitted writes must be safely on storage 145 * previously submitted writes must be safely on storage
145 * before this one is started. Also guarantees that when 146 * before this one is started. Also guarantees that when
146 * this write is complete, it itself is also safely on 147 * this write is complete, it itself is also safely on
@@ -148,29 +149,31 @@ struct inodes_stat_t {
148 * of this IO. 149 * of this IO.
149 * 150 *
150 */ 151 */
151#define RW_MASK 1 152#define RW_MASK REQ_WRITE
152#define RWA_MASK 2 153#define RWA_MASK REQ_RAHEAD
153#define READ 0 154
154#define WRITE 1 155#define READ 0
155#define READA 2 /* read-ahead - don't block if no resources */ 156#define WRITE RW_MASK
156#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ 157#define READA RWA_MASK
157#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) 158#define SWRITE (WRITE | READA)
158#define READ_META (READ | (1 << BIO_RW_META)) 159
159#define WRITE_SYNC_PLUG (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 160#define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG)
160#define WRITE_SYNC (WRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 161#define READ_META (READ | REQ_META)
161#define WRITE_ODIRECT_PLUG (WRITE | (1 << BIO_RW_SYNCIO)) 162#define WRITE_SYNC_PLUG (WRITE | REQ_SYNC | REQ_NOIDLE)
162#define WRITE_META (WRITE | (1 << BIO_RW_META)) 163#define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
163#define SWRITE_SYNC_PLUG \ 164#define WRITE_ODIRECT_PLUG (WRITE | REQ_SYNC)
164 (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 165#define WRITE_META (WRITE | REQ_META)
165#define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 166#define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \
166#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) 167 REQ_HARDBARRIER)
168#define SWRITE_SYNC_PLUG (SWRITE | REQ_SYNC | REQ_NOIDLE)
169#define SWRITE_SYNC (SWRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
167 170
168/* 171/*
169 * These aren't really reads or writes, they pass down information about 172 * These aren't really reads or writes, they pass down information about
170 * parts of device that are now unused by the file system. 173 * parts of device that are now unused by the file system.
171 */ 174 */
172#define DISCARD_NOBARRIER (WRITE | (1 << BIO_RW_DISCARD)) 175#define DISCARD_NOBARRIER (WRITE | REQ_DISCARD)
173#define DISCARD_BARRIER (DISCARD_NOBARRIER | (1 << BIO_RW_BARRIER)) 176#define DISCARD_BARRIER (WRITE | REQ_DISCARD | REQ_HARDBARRIER)
174 177
175#define SEL_IN 1 178#define SEL_IN 1
176#define SEL_OUT 2 179#define SEL_OUT 2
@@ -2196,7 +2199,6 @@ static inline void insert_inode_hash(struct inode *inode) {
2196extern void file_move(struct file *f, struct list_head *list); 2199extern void file_move(struct file *f, struct list_head *list);
2197extern void file_kill(struct file *f); 2200extern void file_kill(struct file *f);
2198#ifdef CONFIG_BLOCK 2201#ifdef CONFIG_BLOCK
2199struct bio;
2200extern void submit_bio(int, struct bio *); 2202extern void submit_bio(int, struct bio *);
2201extern int bdev_read_only(struct block_device *); 2203extern int bdev_read_only(struct block_device *);
2202#endif 2204#endif
@@ -2263,7 +2265,6 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
2263#endif 2265#endif
2264 2266
2265#ifdef CONFIG_BLOCK 2267#ifdef CONFIG_BLOCK
2266struct bio;
2267typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, 2268typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
2268 loff_t file_offset); 2269 loff_t file_offset);
2269 2270