diff mbox series

[v5,1/5] block: Add alternative_gpt_sector() operation

Message ID 20210818005547.14497-2-digetx@gmail.com (mailing list archive)
State New, archived
Headers show
Series Support EFI partition on NVIDIA Tegra devices | expand

Commit Message

Dmitry Osipenko Aug. 18, 2021, 12:55 a.m. UTC
Add alternative_gpt_sector() block device operation which specifies
alternative location of a GPT entry. This allows us to support Android
devices which have GPT entry at a non-standard location and can't be
repartitioned easily.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/linux/blkdev.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Aug. 18, 2021, 5:20 a.m. UTC | #1
On Wed, Aug 18, 2021 at 03:55:43AM +0300, Dmitry Osipenko wrote:
> Add alternative_gpt_sector() block device operation which specifies
> alternative location of a GPT entry. This allows us to support Android
> devices which have GPT entry at a non-standard location and can't be
> repartitioned easily.

Probably worth adding a little comment explaining this rather odd
operation.
Dmitry Osipenko Aug. 18, 2021, 5:41 a.m. UTC | #2
18.08.2021 08:20, Christoph Hellwig пишет:
> On Wed, Aug 18, 2021 at 03:55:43AM +0300, Dmitry Osipenko wrote:
>> Add alternative_gpt_sector() block device operation which specifies
>> alternative location of a GPT entry. This allows us to support Android
>> devices which have GPT entry at a non-standard location and can't be
>> repartitioned easily.
> 
> Probably worth adding a little comment explaining this rather odd
> operation.
> 

I'll add the comment in v6.
diff mbox series

Patch

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 111a3911c4d2..a662a8f5065f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1848,6 +1848,7 @@  struct block_device_operations {
 	int (*report_zones)(struct gendisk *, sector_t sector,
 			unsigned int nr_zones, report_zones_cb cb, void *data);
 	char *(*devnode)(struct gendisk *disk, umode_t *mode);
+	int (*alternative_gpt_sector)(struct block_device *, sector_t *);
 	struct module *owner;
 	const struct pr_ops *pr_ops;
 };