Re: [PATCH 1/2] blktrace: break out of blktrace setup on concurrent calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/5/20 7:58 AM, Jan Kara wrote:
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>   #include <linux/kernel.h>
>   #include <linux/blkdev.h>
>   #include <linux/blktrace_api.h>
> @@ -494,6 +497,16 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
>   	 */
>   	strreplace(buts->name, '/', '_');
>   
> +	/*
> +	 * bdev can be NULL, as with scsi-generic, this is a helpful as
> +	 * we can be.
> +	 */
> +	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;
> -- 2.16.4

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux