From 4e97182a22ed5ca6a5cbc39275d4752d5a4369da Mon Sep 17 00:00:00 2001 From: Qi Yong Date: Wed, 25 Jul 2007 08:45:51 +0200 Subject: [patch] QUEUE_FLAG_READFULL QUEUE_FLAG_WRITEFULL comment fix The two comments were transposed. Signed-off-by: Qi Yong Signed-off-by: Jens Axboe --- include/linux/blkdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ -#define QUEUE_FLAG_READFULL 3 /* write queue has been filled */ -#define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */ +#define QUEUE_FLAG_READFULL 3 /* read queue has been filled */ +#define QUEUE_FLAG_WRITEFULL 4 /* write queue has been filled */ #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ -- cgit v1.2.3-59-g8ed1b From 4d5d8e9d3e55100bc12cf17a5ebc8a3c70befd38 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 25 Jul 2007 10:02:30 +0200 Subject: bsg: Fix build for CONFIG_BLOCK=n BLK_DEV_BSG was added outside of the if BLOCK check, which allows it to be enabled when CONFIG_BLOCK=n. This leads to many screenlengths of errors, starting with a parse error on the request_queue_t definition. Obviously this wasn't intended for CONFIG_BLOCK=n usage, so just move the option back in to the block. Caught with a randconfig on sh. Signed-off-by: Paul Mundt -- block/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Signed-off-by: Jens Axboe --- block/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/Kconfig b/block/Kconfig index ca2ef4e08497..2484e0e9d89c 100644 --- a/block/Kconfig +++ b/block/Kconfig @@ -49,8 +49,6 @@ config LSF If unsure, say Y. -endif # BLOCK - config BLK_DEV_BSG bool "Block layer SG support v4 (EXPERIMENTAL)" depends on EXPERIMENTAL @@ -64,4 +62,6 @@ config BLK_DEV_BSG protocols (e.g. Task Management Functions and SMP in Serial Attached SCSI). +endif # BLOCK + source block/Kconfig.iosched -- cgit v1.2.3-59-g8ed1b From 7c2ff389bbb33074e7fde7a744f59da199a74af5 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 25 Jul 2007 13:07:10 +0200 Subject: blktrace: use cpu_clock() instead of sched_clock() use cpu_clock() instead of sched_clock(). (the latter is not a proper clock-source) Signed-off-by: Ingo Molnar Signed-off-by: Jens Axboe --- block/blktrace.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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, const int cpu = smp_processor_id(); t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; - t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu); + t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu); t->device = bt->dev; t->action = action; t->pid = pid; @@ -159,7 +159,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; t->sequence = ++(*sequence); - t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu); + t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu); t->sector = sector; t->bytes = bytes; t->action = what; @@ -488,17 +488,17 @@ void blk_trace_shutdown(struct request_queue *q) } /* - * Average offset over two calls to sched_clock() with a gettimeofday() + * Average offset over two calls to cpu_clock() with a gettimeofday() * in the middle */ -static void blk_check_time(unsigned long long *t) +static void blk_check_time(unsigned long long *t, int this_cpu) { unsigned long long a, b; struct timeval tv; - a = sched_clock(); + a = cpu_clock(this_cpu); do_gettimeofday(&tv); - b = sched_clock(); + b = cpu_clock(this_cpu); *t = tv.tv_sec * 1000000000 + tv.tv_usec * 1000; *t -= (a + b) / 2; @@ -510,16 +510,16 @@ static void blk_check_time(unsigned long long *t) static void blk_trace_check_cpu_time(void *data) { unsigned long long *t; - int cpu = get_cpu(); + int this_cpu = get_cpu(); - t = &per_cpu(blk_trace_cpu_offset, cpu); + t = &per_cpu(blk_trace_cpu_offset, this_cpu); /* * Just call it twice, hopefully the second call will be cache hot * and a little more precise */ - blk_check_time(t); - blk_check_time(t); + blk_check_time(t, this_cpu); + blk_check_time(t, this_cpu); put_cpu(); } -- cgit v1.2.3-59-g8ed1b From 79685b8deea4541d18882d8c07d0e99e788292ab Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 27 Jul 2007 08:08:51 +0200 Subject: docbook: add pipes, other fixes Fix some typos in pipe.c and splice.c. Add pipes API to kernel-api.tmpl. Signed-off-by: Randy Dunlap Signed-off-by: Jens Axboe --- Documentation/DocBook/kernel-api.tmpl | 13 +++++++++++-- fs/pipe.c | 2 +- fs/splice.c | 4 ++-- 3 files changed, 14 insertions(+), 5 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 splice API - ) + splice is a method for moving blocks of data around inside the - kernel, without continually transferring it between the kernel + kernel, without continually transferring them between the kernel and user space. !Iinclude/linux/splice.h !Ffs/splice.c + + pipes API + + Pipe interfaces are all for in-kernel (builtin image) use. + They are not exported for use by modules. + +!Iinclude/linux/pipe_fs_i.h +!Ffs/pipe.c + diff --git a/fs/pipe.c b/fs/pipe.c index d007830d9c87..6b3d91a691bf 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -255,7 +255,7 @@ void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) /** * generic_pipe_buf_confirm - verify contents of the pipe buffer - * @pipe: the pipe that the buffer belongs to + * @info: the pipe that the buffer belongs to * @buf: the buffer to confirm * * 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 = { * @spd: data to fill * * Description: - * @spd contains a map of pages and len/offset tupples, a long with + * @spd contains a map of pages and len/offset tuples, along with * the struct pipe_buf_operations associated with these pages. This * function will link that data to the pipe. * @@ -1000,7 +1000,7 @@ static long do_splice_to(struct file *in, loff_t *ppos, * Description: * This is a special case helper to splice directly between two * points, without requiring an explicit pipe. Internally an allocated - * pipe is cached in the process, and reused during the life time of + * pipe is cached in the process, and reused during the lifetime of * that process. * */ -- cgit v1.2.3-59-g8ed1b