lkml.org 
[lkml]   [2020]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/5] blktrace: break out of blktrace setup on concurrent calls
From
Date
On 2020-05-08 20:10, Luis Chamberlain wrote:
> @@ -493,6 +496,12 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
> */
> strreplace(buts->name, '/', '_');
>
> + if (q->blk_trace) {
> + pr_warn("Concurrent blktraces are not allowed on %s\n",
> + buts->name);
> + return -EBUSY;
> + }
> +
> bt = kzalloc(sizeof(*bt), GFP_KERNEL);
> if (!bt)
> return -ENOMEM;

Is this really sufficient? Shouldn't concurrent do_blk_trace_setup()
calls that refer to the same request queue be serialized to really
prevent that debugfs attribute creation fails?

How about using the block device name instead of the partition name in
the error message since the concurrency context is the block device and
not the partition?

Thanks,

Bart.


\
 
 \ /
  Last update: 2020-05-10 03:10    [W:0.083 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site