diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:55:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:55:15 -0400 |
commit | 355bbd8cb82e60a592f6cd86ce6dbe5677615cf4 (patch) | |
tree | 23678e50ad4687f1656edc972388ee8014e7b89d /fs | |
parent | 39695224bd84dc4be29abad93a0ec232a16fc519 (diff) | |
parent | 746cd1e7e4a555ddaee53b19a46e05c9c61eaf09 (diff) |
Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block: (29 commits)
block: use blkdev_issue_discard in blk_ioctl_discard
Make DISCARD_BARRIER and DISCARD_NOBARRIER writes instead of reads
block: don't assume device has a request list backing in nr_requests store
block: Optimal I/O limit wrapper
cfq: choose a new next_req when a request is dispatched
Seperate read and write statistics of in_flight requests
aoe: end barrier bios with EOPNOTSUPP
block: trace bio queueing trial only when it occurs
block: enable rq CPU completion affinity by default
cfq: fix the log message after dispatched a request
block: use printk_once
cciss: memory leak in cciss_init_one()
splice: update mtime and atime on files
block: make blk_iopoll_prep_sched() follow normal 0/1 return convention
cfq-iosched: get rid of must_alloc flag
block: use interrupts disabled version of raise_softirq_irqoff()
block: fix comment in blk-iopoll.c
block: adjust default budget for blk-iopoll
block: fix long lines in block/blk-iopoll.c
block: add blk-iopoll, a NAPI like approach for block devices
...
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 4 | ||||
-rw-r--r-- | fs/gfs2/rgrp.c | 6 | ||||
-rw-r--r-- | fs/partitions/check.c | 12 | ||||
-rw-r--r-- | fs/splice.c | 8 |
5 files changed, 25 insertions, 8 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 72a2b9c28e9f..535f85ba104f 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1511,7 +1511,8 @@ static int remove_extent_backref(struct btrfs_trans_handle *trans, | |||
1511 | static void btrfs_issue_discard(struct block_device *bdev, | 1511 | static void btrfs_issue_discard(struct block_device *bdev, |
1512 | u64 start, u64 len) | 1512 | u64 start, u64 len) |
1513 | { | 1513 | { |
1514 | blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL); | 1514 | blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL, |
1515 | DISCARD_FL_BARRIER); | ||
1515 | } | 1516 | } |
1516 | #endif | 1517 | #endif |
1517 | 1518 | ||
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 5dbefd11b4af..5cf405b0828d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -260,7 +260,7 @@ loop_lock: | |||
260 | num_run++; | 260 | num_run++; |
261 | batch_run++; | 261 | batch_run++; |
262 | 262 | ||
263 | if (bio_sync(cur)) | 263 | if (bio_rw_flagged(cur, BIO_RW_SYNCIO)) |
264 | num_sync_run++; | 264 | num_sync_run++; |
265 | 265 | ||
266 | if (need_resched()) { | 266 | if (need_resched()) { |
@@ -2903,7 +2903,7 @@ static noinline int schedule_bio(struct btrfs_root *root, | |||
2903 | bio->bi_rw |= rw; | 2903 | bio->bi_rw |= rw; |
2904 | 2904 | ||
2905 | spin_lock(&device->io_lock); | 2905 | spin_lock(&device->io_lock); |
2906 | if (bio_sync(bio)) | 2906 | if (bio_rw_flagged(bio, BIO_RW_SYNCIO)) |
2907 | pending_bios = &device->pending_sync_bios; | 2907 | pending_bios = &device->pending_sync_bios; |
2908 | else | 2908 | else |
2909 | pending_bios = &device->pending_bios; | 2909 | pending_bios = &device->pending_bios; |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 18d3a28554ac..28c590b7c9da 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -857,7 +857,8 @@ static void gfs2_rgrp_send_discards(struct gfs2_sbd *sdp, u64 offset, | |||
857 | goto start_new_extent; | 857 | goto start_new_extent; |
858 | if ((start + nr_sects) != blk) { | 858 | if ((start + nr_sects) != blk) { |
859 | rv = blkdev_issue_discard(bdev, start, | 859 | rv = blkdev_issue_discard(bdev, start, |
860 | nr_sects, GFP_NOFS); | 860 | nr_sects, GFP_NOFS, |
861 | DISCARD_FL_BARRIER); | ||
861 | if (rv) | 862 | if (rv) |
862 | goto fail; | 863 | goto fail; |
863 | nr_sects = 0; | 864 | nr_sects = 0; |
@@ -871,7 +872,8 @@ start_new_extent: | |||
871 | } | 872 | } |
872 | } | 873 | } |
873 | if (nr_sects) { | 874 | if (nr_sects) { |
874 | rv = blkdev_issue_discard(bdev, start, nr_sects, GFP_NOFS); | 875 | rv = blkdev_issue_discard(bdev, start, nr_sects, GFP_NOFS, |
876 | DISCARD_FL_BARRIER); | ||
875 | if (rv) | 877 | if (rv) |
876 | goto fail; | 878 | goto fail; |
877 | } | 879 | } |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ea4e6cb29e13..619ba99dfe39 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -248,11 +248,19 @@ ssize_t part_stat_show(struct device *dev, | |||
248 | part_stat_read(p, merges[WRITE]), | 248 | part_stat_read(p, merges[WRITE]), |
249 | (unsigned long long)part_stat_read(p, sectors[WRITE]), | 249 | (unsigned long long)part_stat_read(p, sectors[WRITE]), |
250 | jiffies_to_msecs(part_stat_read(p, ticks[WRITE])), | 250 | jiffies_to_msecs(part_stat_read(p, ticks[WRITE])), |
251 | p->in_flight, | 251 | part_in_flight(p), |
252 | jiffies_to_msecs(part_stat_read(p, io_ticks)), | 252 | jiffies_to_msecs(part_stat_read(p, io_ticks)), |
253 | jiffies_to_msecs(part_stat_read(p, time_in_queue))); | 253 | jiffies_to_msecs(part_stat_read(p, time_in_queue))); |
254 | } | 254 | } |
255 | 255 | ||
256 | ssize_t part_inflight_show(struct device *dev, | ||
257 | struct device_attribute *attr, char *buf) | ||
258 | { | ||
259 | struct hd_struct *p = dev_to_part(dev); | ||
260 | |||
261 | return sprintf(buf, "%8u %8u\n", p->in_flight[0], p->in_flight[1]); | ||
262 | } | ||
263 | |||
256 | #ifdef CONFIG_FAIL_MAKE_REQUEST | 264 | #ifdef CONFIG_FAIL_MAKE_REQUEST |
257 | ssize_t part_fail_show(struct device *dev, | 265 | ssize_t part_fail_show(struct device *dev, |
258 | struct device_attribute *attr, char *buf) | 266 | struct device_attribute *attr, char *buf) |
@@ -281,6 +289,7 @@ static DEVICE_ATTR(start, S_IRUGO, part_start_show, NULL); | |||
281 | static DEVICE_ATTR(size, S_IRUGO, part_size_show, NULL); | 289 | static DEVICE_ATTR(size, S_IRUGO, part_size_show, NULL); |
282 | static DEVICE_ATTR(alignment_offset, S_IRUGO, part_alignment_offset_show, NULL); | 290 | static DEVICE_ATTR(alignment_offset, S_IRUGO, part_alignment_offset_show, NULL); |
283 | static DEVICE_ATTR(stat, S_IRUGO, part_stat_show, NULL); | 291 | static DEVICE_ATTR(stat, S_IRUGO, part_stat_show, NULL); |
292 | static DEVICE_ATTR(inflight, S_IRUGO, part_inflight_show, NULL); | ||
284 | #ifdef CONFIG_FAIL_MAKE_REQUEST | 293 | #ifdef CONFIG_FAIL_MAKE_REQUEST |
285 | static struct device_attribute dev_attr_fail = | 294 | static struct device_attribute dev_attr_fail = |
286 | __ATTR(make-it-fail, S_IRUGO|S_IWUSR, part_fail_show, part_fail_store); | 295 | __ATTR(make-it-fail, S_IRUGO|S_IWUSR, part_fail_show, part_fail_store); |
@@ -292,6 +301,7 @@ static struct attribute *part_attrs[] = { | |||
292 | &dev_attr_size.attr, | 301 | &dev_attr_size.attr, |
293 | &dev_attr_alignment_offset.attr, | 302 | &dev_attr_alignment_offset.attr, |
294 | &dev_attr_stat.attr, | 303 | &dev_attr_stat.attr, |
304 | &dev_attr_inflight.attr, | ||
295 | #ifdef CONFIG_FAIL_MAKE_REQUEST | 305 | #ifdef CONFIG_FAIL_MAKE_REQUEST |
296 | &dev_attr_fail.attr, | 306 | &dev_attr_fail.attr, |
297 | #endif | 307 | #endif |
diff --git a/fs/splice.c b/fs/splice.c index 819023733f8e..7394e9e17534 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -502,8 +502,10 @@ ssize_t generic_file_splice_read(struct file *in, loff_t *ppos, | |||
502 | len = left; | 502 | len = left; |
503 | 503 | ||
504 | ret = __generic_file_splice_read(in, ppos, pipe, len, flags); | 504 | ret = __generic_file_splice_read(in, ppos, pipe, len, flags); |
505 | if (ret > 0) | 505 | if (ret > 0) { |
506 | *ppos += ret; | 506 | *ppos += ret; |
507 | file_accessed(in); | ||
508 | } | ||
507 | 509 | ||
508 | return ret; | 510 | return ret; |
509 | } | 511 | } |
@@ -963,8 +965,10 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, | |||
963 | 965 | ||
964 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_CHILD); | 966 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_CHILD); |
965 | ret = file_remove_suid(out); | 967 | ret = file_remove_suid(out); |
966 | if (!ret) | 968 | if (!ret) { |
969 | file_update_time(out); | ||
967 | ret = splice_from_pipe_feed(pipe, &sd, pipe_to_file); | 970 | ret = splice_from_pipe_feed(pipe, &sd, pipe_to_file); |
971 | } | ||
968 | mutex_unlock(&inode->i_mutex); | 972 | mutex_unlock(&inode->i_mutex); |
969 | } while (ret > 0); | 973 | } while (ret > 0); |
970 | splice_from_pipe_end(pipe, &sd); | 974 | splice_from_pipe_end(pipe, &sd); |