lkml.org 
[lkml]   [2009]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] blktrace: swap arg name "from" and "to" of blk_add_trace_remap
From
> I believe this may be more messed up than you believe: Consider the last
> function: blk_log_remap. Notice how you are printing the /device/ and
> /sector_from/ as one pair. Isn't that confusing too: wouldn't one expect
> /device_from/ and /sector_from/ to be paired up?
>
> I ran into this problem a long time ago - hence the current code in
> blkparse contains:
>
>        if (act[0] == 'A') {    /* Remap */
>                get_pdu_remap(t, &r);
>                t->device = r.device_from;
>        }
>
> Which puts the device_from out at the beginning of the line, and then
> the 'device' + 'sector' (== 'sector_from') out at the end of the line.
> (Which, of course, is all confusing.)

Good viewpoint!
Currently, 99% blktrace user use blktrace and blkparse command, not
ftrace framework.
So, ABI changing is proper way?

I'd like to hear Jens and Li opinion.



> To really fix this, I think one needs to:
>
> (a) adjust the kernel to make "r.device_from" and "r.sector_from" refer
> to the same part of the trace, and the "r.device" and "t->sector" refer
> to the other part of the trace.
>
> (b) fix blkparse (& btt & ...) to do the same thing - not make
> adjustments for the stupid naming...
>
> If we leave the kernel->user space ABI alone:
>
> first u32: device mapped /from/
> second u32: device mapped /to/
> u64: sector mapped from
>
> We can then change the names. I've followed this e-mail up with a pair
> of kernel-side patches and will submit user side fixes for blkptrace later.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-05-01 04:15    [W:0.082 / U:161.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site