mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block: Stop using byte offsets
All callers of the stacking functions use 512-byte sector units rather than byte offsets. Simplify the code so the stacking functions take sectors when specifying data offsets. Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
ce289321b7
commit
e03a72e136
3 changed files with 18 additions and 32 deletions
|
|
@ -412,9 +412,10 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
|
|||
pdev = part_to_dev(p);
|
||||
|
||||
p->start_sect = start;
|
||||
p->alignment_offset = queue_sector_alignment_offset(disk->queue, start);
|
||||
p->discard_alignment = queue_sector_discard_alignment(disk->queue,
|
||||
start);
|
||||
p->alignment_offset =
|
||||
queue_limit_alignment_offset(&disk->queue->limits, start);
|
||||
p->discard_alignment =
|
||||
queue_limit_discard_alignment(&disk->queue->limits, start);
|
||||
p->nr_sects = len;
|
||||
p->partno = partno;
|
||||
p->policy = get_disk_ro(disk);
|
||||
|
|
|
|||
Loading…
Reference in a new issue