Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BLK_ERROR_INJECTION_H
#define _BLK_ERROR_INJECTION_H 1
#include <linux/jump_label.h>
DECLARE_STATIC_KEY_FALSE(blk_error_injection_enabled);
void blk_error_injection_init(struct gendisk *disk);
void blk_error_injection_exit(struct gendisk *disk);
bool __blk_error_inject(struct bio *bio);
static inline bool blk_error_inject(struct bio *bio)
{
if (IS_ENABLED(CONFIG_BLK_ERROR_INJECTION) &&
static_branch_unlikely(&blk_error_injection_enabled) &&
test_bit(GD_ERROR_INJECT, &bio->bi_bdev->bd_disk->state))
return __blk_error_inject(bio);
return false;
}
#endif /* _BLK_ERROR_INJECTION_H */