diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/Kconfig | 6 | ||||
-rw-r--r-- | block/blktrace.c | 35 |
2 files changed, 18 insertions, 23 deletions
diff --git a/block/Kconfig b/block/Kconfig index 83766a6bdee2..a50f48111647 100644 --- a/block/Kconfig +++ b/block/Kconfig @@ -19,11 +19,9 @@ config BLOCK if BLOCK -#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64 -#for instance. config LBD bool "Support for Large Block Devices" - depends on X86 || (MIPS && 32BIT) || PPC32 || (S390 && !64BIT) || SUPERH || UML + depends on !64BIT help Say Y here if you want to attach large (bigger than 2TB) discs to your machine, or if you want to have a raid or loopback device @@ -44,7 +42,7 @@ config BLK_DEV_IO_TRACE config LSF bool "Support for Large Single Files" - depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML + depends on !64BIT help Say Y here if you want to be able to handle very large files (bigger than 2TB), otherwise say N. diff --git a/block/blktrace.c b/block/blktrace.c index 562ca7cbf858..74e02c04b2da 100644 --- a/block/blktrace.c +++ b/block/blktrace.c @@ -31,26 +31,24 @@ static unsigned int blktrace_seq __read_mostly = 1; /* * Send out a notify message. */ -static inline unsigned int trace_note(struct blk_trace *bt, - pid_t pid, int action, - const void *data, size_t len) +static void trace_note(struct blk_trace *bt, pid_t pid, int action, + const void *data, size_t len) { struct blk_io_trace *t; - int cpu = smp_processor_id(); t = relay_reserve(bt->rchan, sizeof(*t) + len); - if (t == NULL) - return 0; - - t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; - t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu); - t->device = bt->dev; - t->action = action; - t->pid = pid; - t->cpu = cpu; - t->pdu_len = len; - memcpy((void *) t + sizeof(*t), data, len); - return blktrace_seq; + if (t) { + 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->device = bt->dev; + t->action = action; + t->pid = pid; + t->cpu = cpu; + t->pdu_len = len; + memcpy((void *) t + sizeof(*t), data, len); + } } /* @@ -59,9 +57,8 @@ static inline unsigned int trace_note(struct blk_trace *bt, */ static void trace_note_tsk(struct blk_trace *bt, struct task_struct *tsk) { - tsk->btrace_seq = trace_note(bt, tsk->pid, - BLK_TN_PROCESS, - tsk->comm, sizeof(tsk->comm)); + tsk->btrace_seq = blktrace_seq; + trace_note(bt, tsk->pid, BLK_TN_PROCESS, tsk->comm, sizeof(tsk->comm)); } static void trace_note_time(struct blk_trace *bt) |