forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pstore/blk: Export a method to implemente panic_write()
The panic_write() is necessary to write the pstore frontend message to blk devices when panic. Here is a way to register panic_write when we use "best_effort" way to register the pstore blk-backend. Usage: xx_register_pstore_panic_write(pstore_blk_notifier_type type, struct pstore_device_info *pdi) { switch (type) { case PSTORE_BLK_BACKEND_REGISTER: case PSTORE_BLK_BACKEND_PANIC_DRV_REGISTER: ... pid->zone.panic_write = xxx; ... break; case PSTORE_BLK_BACKEND_UNREGISTER: case PSTORE_BLK_BACKEND_PANIC_DRV_UNREGISTER: ... pdi->zone.panic_write = NULL; ... break; default: break; } } static struct pstore_blk_notifier pbn = { .notitifer_call = xx_register_pstore_panic_write; } use {un,}register_pstore_blk_panic_notifier() to register/unregister pstore_blk_notifier Signed-off-by: Victor Hassan <victor@allwinnertech.com>
- Loading branch information
1 parent
88603b6
commit 368e42b
Showing
2 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters