aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Osipenko <[email protected]>2021-08-20 03:45:33 +0300
committerJens Axboe <[email protected]>2021-08-24 10:09:06 -0600
commit0bdfbca8a623e262e0f343b143151000a300cbaf (patch)
tree92ac78321d877a4ede589b75a391618b442fa913
parentd9cf3bd531844ffbfe94b16e417037a16efc988d (diff)
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]>
-rw-r--r--include/linux/blkdev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 22b5b8502d2a..c9cb12483e12 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1872,6 +1872,13 @@ struct block_device_operations {
char *(*devnode)(struct gendisk *disk, umode_t *mode);
struct module *owner;
const struct pr_ops *pr_ops;
+
+ /*
+ * Special callback for probing GPT entry at a given sector.
+ * Needed by Android devices, used by GPT scanner and MMC blk
+ * driver.
+ */
+ int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);
};
#ifdef CONFIG_COMPAT