aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-08-23 08:50:29 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-08-23 08:50:29 -0400
commit65299a3b788bd274bed92f9fa3232082c9f3ea70 (patch)
tree191c0afe31c15ac4c1bab96e0a07fddb097d0de8 /fs/ext4
parent5dc06c5a70b79a323152bec7e55783e705767e63 (diff)
block: separate priority boosting from REQ_META
Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule, and lave REQ_META purely for marking requests as metadata in blktrace. All existing callers of REQ_META except for XFS are updated to also set REQ_PRIO for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c4
-rw-r--r--fs/ext4/namei.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1dfa18feeb3e..c7cbb3d85d9e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -650,7 +650,7 @@ struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
650 return bh; 650 return bh;
651 if (buffer_uptodate(bh)) 651 if (buffer_uptodate(bh))
652 return bh; 652 return bh;
653 ll_rw_block(READ | REQ_META, 1, &bh); 653 ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
654 wait_on_buffer(bh); 654 wait_on_buffer(bh);
655 if (buffer_uptodate(bh)) 655 if (buffer_uptodate(bh))
656 return bh; 656 return bh;
@@ -3301,7 +3301,7 @@ make_io:
3301 trace_ext4_load_inode(inode); 3301 trace_ext4_load_inode(inode);
3302 get_bh(bh); 3302 get_bh(bh);
3303 bh->b_end_io = end_buffer_read_sync; 3303 bh->b_end_io = end_buffer_read_sync;
3304 submit_bh(READ | REQ_META, bh); 3304 submit_bh(READ | REQ_META | REQ_PRIO, bh);
3305 wait_on_buffer(bh); 3305 wait_on_buffer(bh);
3306 if (!buffer_uptodate(bh)) { 3306 if (!buffer_uptodate(bh)) {
3307 EXT4_ERROR_INODE_BLOCK(inode, block, 3307 EXT4_ERROR_INODE_BLOCK(inode, block,
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d36315ae629e..1c924faeb6c8 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -922,7 +922,8 @@ restart:
922 bh = ext4_getblk(NULL, dir, b++, 0, &err); 922 bh = ext4_getblk(NULL, dir, b++, 0, &err);
923 bh_use[ra_max] = bh; 923 bh_use[ra_max] = bh;
924 if (bh) 924 if (bh)
925 ll_rw_block(READ | REQ_META, 1, &bh); 925 ll_rw_block(READ | REQ_META | REQ_PRIO,
926 1, &bh);
926 } 927 }
927 } 928 }
928 if ((bh = bh_use[ra_ptr++]) == NULL) 929 if ((bh = bh_use[ra_ptr++]) == NULL)