#include <linux/fs.h>
#include <linux/major.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/vmalloc.h>
#include <linux/raid/detect.h>
#include "check.h"
static int (*const check_part[])(struct parsed_partitions *) = …;
static struct parsed_partitions *allocate_partitions(struct gendisk *hd)
{ … }
static void free_partitions(struct parsed_partitions *state)
{ … }
static struct parsed_partitions *check_partition(struct gendisk *hd)
{ … }
static ssize_t part_partition_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t part_start_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t part_ro_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t part_alignment_offset_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t part_discard_alignment_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR(partition, 0444, part_partition_show, NULL);
static DEVICE_ATTR(start, 0444, part_start_show, NULL);
static DEVICE_ATTR(size, 0444, part_size_show, NULL);
static DEVICE_ATTR(ro, 0444, part_ro_show, NULL);
static DEVICE_ATTR(alignment_offset, 0444, part_alignment_offset_show, NULL);
static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL);
static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
#ifdef CONFIG_FAIL_MAKE_REQUEST
static struct device_attribute dev_attr_fail = …;
#endif
static struct attribute *part_attrs[] = …;
static const struct attribute_group part_attr_group = …;
static const struct attribute_group *part_attr_groups[] = …;
static void part_release(struct device *dev)
{ … }
static int part_uevent(const struct device *dev, struct kobj_uevent_env *env)
{ … }
const struct device_type part_type = …;
void drop_partition(struct block_device *part)
{ … }
static ssize_t whole_disk_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static const DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
static struct block_device *add_partition(struct gendisk *disk, int partno,
sector_t start, sector_t len, int flags,
struct partition_meta_info *info)
{ … }
static bool partition_overlaps(struct gendisk *disk, sector_t start,
sector_t length, int skip_partno)
{ … }
int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
sector_t length)
{ … }
int bdev_del_partition(struct gendisk *disk, int partno)
{ … }
int bdev_resize_partition(struct gendisk *disk, int partno, sector_t start,
sector_t length)
{ … }
static bool disk_unlock_native_capacity(struct gendisk *disk)
{ … }
static bool blk_add_partition(struct gendisk *disk,
struct parsed_partitions *state, int p)
{ … }
static int blk_add_partitions(struct gendisk *disk)
{ … }
int bdev_disk_changed(struct gendisk *disk, bool invalidate)
{ … }
EXPORT_SYMBOL_GPL(…);
void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p)
{ … }