diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-28 22:31:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-28 22:31:13 -0400 |
commit | 8e8ef2971b0fd6dcf1a66014fb74b41938eecb4e (patch) | |
tree | 3c451f9c21123046806724680a3a8aebd48e6247 | |
parent | 933a6208d84c92d92f9264a2e28d0fc317d41fd1 (diff) | |
parent | 79685b8deea4541d18882d8c07d0e99e788292ab (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
docbook: add pipes, other fixes
blktrace: use cpu_clock() instead of sched_clock()
bsg: Fix build for CONFIG_BLOCK=n
[patch] QUEUE_FLAG_READFULL QUEUE_FLAG_WRITEFULL comment fix
-rw-r--r-- | Documentation/DocBook/kernel-api.tmpl | 13 | ||||
-rw-r--r-- | block/Kconfig | 4 | ||||
-rw-r--r-- | block/blktrace.c | 20 | ||||
-rw-r--r-- | fs/pipe.c | 2 | ||||
-rw-r--r-- | fs/splice.c | 4 | ||||
-rw-r--r-- | include/linux/blkdev.h | 4 |
6 files changed, 28 insertions, 19 deletions
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index eb42bf9847cb..ec7c498b69fc 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -704,14 +704,23 @@ X!Idrivers/video/console/fonts.c | |||
704 | 704 | ||
705 | <chapter id="splice"> | 705 | <chapter id="splice"> |
706 | <title>splice API</title> | 706 | <title>splice API</title> |
707 | <para>) | 707 | <para> |
708 | splice is a method for moving blocks of data around inside the | 708 | splice is a method for moving blocks of data around inside the |
709 | kernel, without continually transferring it between the kernel | 709 | kernel, without continually transferring them between the kernel |
710 | and user space. | 710 | and user space. |
711 | </para> | 711 | </para> |
712 | !Iinclude/linux/splice.h | 712 | !Iinclude/linux/splice.h |
713 | !Ffs/splice.c | 713 | !Ffs/splice.c |
714 | </chapter> | 714 | </chapter> |
715 | 715 | ||
716 | <chapter id="pipes"> | ||
717 | <title>pipes API</title> | ||
718 | <para> | ||
719 | Pipe interfaces are all for in-kernel (builtin image) use. | ||
720 | They are not exported for use by modules. | ||
721 | </para> | ||
722 | !Iinclude/linux/pipe_fs_i.h | ||
723 | !Ffs/pipe.c | ||
724 | </chapter> | ||
716 | 725 | ||
717 | </book> | 726 | </book> |
diff --git a/block/Kconfig b/block/Kconfig index ca2ef4e08497..2484e0e9d89c 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
@@ -49,8 +49,6 @@ config LSF | |||
49 | 49 | ||
50 | If unsure, say Y. | 50 | If unsure, say Y. |
51 | 51 | ||
52 | endif # BLOCK | ||
53 | |||
54 | config BLK_DEV_BSG | 52 | config BLK_DEV_BSG |
55 | bool "Block layer SG support v4 (EXPERIMENTAL)" | 53 | bool "Block layer SG support v4 (EXPERIMENTAL)" |
56 | depends on EXPERIMENTAL | 54 | depends on EXPERIMENTAL |
@@ -64,4 +62,6 @@ config BLK_DEV_BSG | |||
64 | protocols (e.g. Task Management Functions and SMP in Serial | 62 | protocols (e.g. Task Management Functions and SMP in Serial |
65 | Attached SCSI). | 63 | Attached SCSI). |
66 | 64 | ||
65 | endif # BLOCK | ||
66 | |||
67 | source block/Kconfig.iosched | 67 | source block/Kconfig.iosched |
diff --git a/block/blktrace.c b/block/blktrace.c index 20c3e22587b5..20fa034ea4a2 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -41,7 +41,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action, | |||
41 | const int cpu = smp_processor_id(); | 41 | const int cpu = smp_processor_id(); |
42 | 42 | ||
43 | t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; | 43 | t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; |
44 | t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu); | 44 | t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu); |
45 | t->device = bt->dev; | 45 | t->device = bt->dev; |
46 | t->action = action; | 46 | t->action = action; |
47 | t->pid = pid; | 47 | t->pid = pid; |
@@ -159,7 +159,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, | |||
159 | 159 | ||
160 | t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; | 160 | t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; |
161 | t->sequence = ++(*sequence); | 161 | t->sequence = ++(*sequence); |
162 | t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu); | 162 | t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu); |
163 | t->sector = sector; | 163 | t->sector = sector; |
164 | t->bytes = bytes; | 164 | t->bytes = bytes; |
165 | t->action = what; | 165 | t->action = what; |
@@ -488,17 +488,17 @@ void blk_trace_shutdown(struct request_queue *q) | |||
488 | } | 488 | } |
489 | 489 | ||
490 | /* | 490 | /* |
491 | * Average offset over two calls to sched_clock() with a gettimeofday() | 491 | * Average offset over two calls to cpu_clock() with a gettimeofday() |
492 | * in the middle | 492 | * in the middle |
493 | */ | 493 | */ |
494 | static void blk_check_time(unsigned long long *t) | 494 | static void blk_check_time(unsigned long long *t, int this_cpu) |
495 | { | 495 | { |
496 | unsigned long long a, b; | 496 | unsigned long long a, b; |
497 | struct timeval tv; | 497 | struct timeval tv; |
498 | 498 | ||
499 | a = sched_clock(); | 499 | a = cpu_clock(this_cpu); |
500 | do_gettimeofday(&tv); | 500 | do_gettimeofday(&tv); |
501 | b = sched_clock(); | 501 | b = cpu_clock(this_cpu); |
502 | 502 | ||
503 | *t = tv.tv_sec * 1000000000 + tv.tv_usec * 1000; | 503 | *t = tv.tv_sec * 1000000000 + tv.tv_usec * 1000; |
504 | *t -= (a + b) / 2; | 504 | *t -= (a + b) / 2; |
@@ -510,16 +510,16 @@ static void blk_check_time(unsigned long long *t) | |||
510 | static void blk_trace_check_cpu_time(void *data) | 510 | static void blk_trace_check_cpu_time(void *data) |
511 | { | 511 | { |
512 | unsigned long long *t; | 512 | unsigned long long *t; |
513 | int cpu = get_cpu(); | 513 | int this_cpu = get_cpu(); |
514 | 514 | ||
515 | t = &per_cpu(blk_trace_cpu_offset, cpu); | 515 | t = &per_cpu(blk_trace_cpu_offset, this_cpu); |
516 | 516 | ||
517 | /* | 517 | /* |
518 | * Just call it twice, hopefully the second call will be cache hot | 518 | * Just call it twice, hopefully the second call will be cache hot |
519 | * and a little more precise | 519 | * and a little more precise |
520 | */ | 520 | */ |
521 | blk_check_time(t); | 521 | blk_check_time(t, this_cpu); |
522 | blk_check_time(t); | 522 | blk_check_time(t, this_cpu); |
523 | 523 | ||
524 | put_cpu(); | 524 | put_cpu(); |
525 | } | 525 | } |
@@ -255,7 +255,7 @@ void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) | |||
255 | 255 | ||
256 | /** | 256 | /** |
257 | * generic_pipe_buf_confirm - verify contents of the pipe buffer | 257 | * generic_pipe_buf_confirm - verify contents of the pipe buffer |
258 | * @pipe: the pipe that the buffer belongs to | 258 | * @info: the pipe that the buffer belongs to |
259 | * @buf: the buffer to confirm | 259 | * @buf: the buffer to confirm |
260 | * | 260 | * |
261 | * Description: | 261 | * Description: |
diff --git a/fs/splice.c b/fs/splice.c index 0a0973218084..c010a72ca2d2 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -164,7 +164,7 @@ static const struct pipe_buf_operations user_page_pipe_buf_ops = { | |||
164 | * @spd: data to fill | 164 | * @spd: data to fill |
165 | * | 165 | * |
166 | * Description: | 166 | * Description: |
167 | * @spd contains a map of pages and len/offset tupples, a long with | 167 | * @spd contains a map of pages and len/offset tuples, along with |
168 | * the struct pipe_buf_operations associated with these pages. This | 168 | * the struct pipe_buf_operations associated with these pages. This |
169 | * function will link that data to the pipe. | 169 | * function will link that data to the pipe. |
170 | * | 170 | * |
@@ -1000,7 +1000,7 @@ static long do_splice_to(struct file *in, loff_t *ppos, | |||
1000 | * Description: | 1000 | * Description: |
1001 | * This is a special case helper to splice directly between two | 1001 | * This is a special case helper to splice directly between two |
1002 | * points, without requiring an explicit pipe. Internally an allocated | 1002 | * points, without requiring an explicit pipe. Internally an allocated |
1003 | * pipe is cached in the process, and reused during the life time of | 1003 | * pipe is cached in the process, and reused during the lifetime of |
1004 | * that process. | 1004 | * that process. |
1005 | * | 1005 | * |
1006 | */ | 1006 | */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a1c96d9ee720..b126c6f68e27 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -483,8 +483,8 @@ struct request_queue | |||
483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
484 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ | 484 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ |
485 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ | 485 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ |
486 | #define QUEUE_FLAG_READFULL 3 /* write queue has been filled */ | 486 | #define QUEUE_FLAG_READFULL 3 /* read queue has been filled */ |
487 | #define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */ | 487 | #define QUEUE_FLAG_WRITEFULL 4 /* write queue has been filled */ |
488 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ | 488 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ |
489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ |
490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ |