mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
1d1f6cc581
Information was redundant between struct pstore_zone_info and struct pstore_device_info. Use struct pstore_zone_info, with member name "zone". Additionally untangle the logic for the "best effort" block device instance. Signed-off-by: Kees Cook <keescook@chromium.org> Fixed-by: Pu Lehui <pulehui@huawei.com> Link: https://lore.kernel.org/lkml/20210617005424.182305-1-pulehui@huawei.com
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __PSTORE_BLK_H_
|
|
#define __PSTORE_BLK_H_
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/pstore.h>
|
|
#include <linux/pstore_zone.h>
|
|
|
|
/**
|
|
* struct pstore_device_info - back-end pstore/blk driver structure.
|
|
*
|
|
* @flags: Refer to macro starting with PSTORE_FLAGS defined in
|
|
* linux/pstore.h. It means what front-ends this device support.
|
|
* Zero means all backends for compatible.
|
|
* @zone: The struct pstore_zone_info details.
|
|
*
|
|
*/
|
|
struct pstore_device_info {
|
|
unsigned int flags;
|
|
struct pstore_zone_info zone;
|
|
};
|
|
|
|
int register_pstore_device(struct pstore_device_info *dev);
|
|
void unregister_pstore_device(struct pstore_device_info *dev);
|
|
|
|
/**
|
|
* struct pstore_blk_config - the pstore_blk backend configuration
|
|
*
|
|
* @device: Name of the desired block device
|
|
* @max_reason: Maximum kmsg dump reason to store to block device
|
|
* @kmsg_size: Total size of for kmsg dumps
|
|
* @pmsg_size: Total size of the pmsg storage area
|
|
* @console_size: Total size of the console storage area
|
|
* @ftrace_size: Total size for ftrace logging data (for all CPUs)
|
|
*/
|
|
struct pstore_blk_config {
|
|
char device[80];
|
|
enum kmsg_dump_reason max_reason;
|
|
unsigned long kmsg_size;
|
|
unsigned long pmsg_size;
|
|
unsigned long console_size;
|
|
unsigned long ftrace_size;
|
|
};
|
|
|
|
/**
|
|
* pstore_blk_get_config - get a copy of the pstore_blk backend configuration
|
|
*
|
|
* @info: The sturct pstore_blk_config to be filled in
|
|
*
|
|
* Failure returns negative error code, and success returns 0.
|
|
*/
|
|
int pstore_blk_get_config(struct pstore_blk_config *info);
|
|
|
|
#endif
|