#ifndef _LINUX_BADBLOCKS_H
#define _LINUX_BADBLOCKS_H
#include <linux/seqlock.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/types.h>
#define BB_LEN_MASK …
#define BB_OFFSET_MASK …
#define BB_ACK_MASK …
#define BB_MAX_LEN …
#define BB_OFFSET(x) …
#define BB_LEN(x) …
#define BB_ACK(x) …
#define BB_END(x) …
#define BB_MAKE(a, l, ack) …
#define MAX_BADBLOCKS …
struct badblocks { … };
struct badblocks_context { … };
int badblocks_check(struct badblocks *bb, sector_t s, int sectors,
sector_t *first_bad, int *bad_sectors);
int badblocks_set(struct badblocks *bb, sector_t s, int sectors,
int acknowledged);
int badblocks_clear(struct badblocks *bb, sector_t s, int sectors);
void ack_all_badblocks(struct badblocks *bb);
ssize_t badblocks_show(struct badblocks *bb, char *page, int unack);
ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len,
int unack);
int badblocks_init(struct badblocks *bb, int enable);
void badblocks_exit(struct badblocks *bb);
struct device;
int devm_init_badblocks(struct device *dev, struct badblocks *bb);
static inline void devm_exit_badblocks(struct device *dev, struct badblocks *bb)
{ … }
static inline int badblocks_full(struct badblocks *bb)
{ … }
static inline int badblocks_empty(struct badblocks *bb)
{ … }
static inline void set_changed(struct badblocks *bb)
{ … }
static inline void clear_changed(struct badblocks *bb)
{ … }
#endif