• L
    blktrace: print human-readable act_mask · 09341997
    Li Zefan 提交于
    Impact: new feature, allow symbolic values in /debug/tracing/act_mask
    
    Print stringified act_mask instead of hex value:
    
     # cat act_mask
     read,write,barrier,sync,queue,requeue,issue,complete,fs,pc,ahead,meta,
     discard,drv_data
     # echo "meta,write" > act_mask
     # cat act_mask
     write,meta
    
    Also:
     - make act_mask accept "ahead", "meta", "discard" and "drv_data"
     - use strsep() instead of strchr() to parse user input
     - return -EINVAL if a token is not found in the mask map
     - fix a bug that 'value' is unsigned, so it can < 0
     - propagate error value of blk_trace_mask2str() to userspace, but not
       always return -ENXIO.
    Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
    Acked-by: NJens Axboe <jens.axboe@oracle.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    LKML-Reference: <49C8AB42.1000802@cn.fujitsu.com>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    09341997
blktrace.c 35.7 KB