Re: [PATCH v2] block: Add should_fail_bio() for bpf error injection

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

 



On 2/6/18 2:11 PM, Howard McLauchlan wrote:
> The classic error injection mechanism, should_fail_request() does not
> support use cases where more information is required (from the entire
> struct bio, for example).
> 
> To that end, this patch introduces should_fail_bio(), which calls
> should_fail_request() under the hood but provides a convenient
> place for kprobes to hook into if they require the entire struct bio.
> This patch also replaces some existing calls to should_fail_request()
> with should_fail_bio() with no degradation in performance.

It fails:

block/blk-core.c:2091:1: warning: data definition has no type or storage class
 BPF_ALLOW_ERROR_INJECTION(should_fail_bio);
 ^~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-core.c:2091:1: error: type defaults to ‘int’ in declaration of ‘BPF_ALLOW_ERROR_INJECTION’ [-Werror=implicit-int]
block/blk-core.c:2091:1: warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors

-- 
Jens Axboe




[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