Skip to content

Commit 0bdfbca

Browse files
digetxaxboe
authored andcommitted
block: Add alternative_gpt_sector() operation
Add alternative_gpt_sector() block device operation which specifies alternative location of a GPT entry. This allows us to support Android devices that have GPT entry at a non-standard location and can't be repartitioned easily. Reviewed-by: Christoph Hellwig <[email protected]> Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent d9cf3bd commit 0bdfbca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/blkdev.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,13 @@ struct block_device_operations {
18721872
char *(*devnode)(struct gendisk *disk, umode_t *mode);
18731873
struct module *owner;
18741874
const struct pr_ops *pr_ops;
1875+
1876+
/*
1877+
* Special callback for probing GPT entry at a given sector.
1878+
* Needed by Android devices, used by GPT scanner and MMC blk
1879+
* driver.
1880+
*/
1881+
int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);
18751882
};
18761883

18771884
#ifdef CONFIG_COMPAT

0 commit comments

Comments
 (0)