History

partitions: add ->set_capacity block device method

* Add ->set_capacity block device method and use it in rescan_partitions() to attempt enabling native capacity of the device upon detecting the partition which exceeds device capacity. * Add GENHD_FL_NATIVE_CAPACITY flag to try limit attempts of enabling native capacity during partition scan. Together with the consecutive patch implementing ->set_capacity method in ide-gd device driver this allows automatic disabling of Host Protected Area (HPA) if any partitions overlapping HPA are detected.

Bartlomiej Zolnierkiewicz committed 17 years ago

Commit db429e91 parent 02c33b13 files · +35 −11Browse files

Showing the changes to include/linux/blkdev.h (1 of 3 files). Show all

Unified · Split

include/linux/blkdev.h+2−0
@@ -1106,6 +1106,8 @@ struct block_device_operations { · 1105 unmodified lines
11061106 int (*direct_access) (struct block_device *, sector_t,
11071107 void **, unsigned long *);
11081108 int (*media_changed) (struct gendisk *);
1109+ unsigned long long (*set_capacity) (struct gendisk *,
1110+ unsigned long long);
11091111 int (*revalidate_disk) (struct gendisk *);
11101112 int (*getgeo)(struct block_device *, struct hd_geometry *);
11111113 struct module *owner;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t