You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
resources: add interfaces that return conflict information
request_resource() and insert_resource() only return success or failure, which no information about what existing resource conflicted with the proposed new reservation. This patch adds request_resource_conflict() and insert_resource_conflict(), which return the conflicting resource. Callers may use this for better error messages or to adjust the new resource and retry the request. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
committed by
Jesse Barnes
parent
7c9e2b1c47
commit
66f1207bce
@@ -112,12 +112,14 @@ struct resource_list {
|
||||
extern struct resource ioport_resource;
|
||||
extern struct resource iomem_resource;
|
||||
|
||||
extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
|
||||
extern int request_resource(struct resource *root, struct resource *new);
|
||||
extern int release_resource(struct resource *new);
|
||||
void release_child_resources(struct resource *new);
|
||||
extern void reserve_region_with_split(struct resource *root,
|
||||
resource_size_t start, resource_size_t end,
|
||||
const char *name);
|
||||
extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
|
||||
extern int insert_resource(struct resource *parent, struct resource *new);
|
||||
extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
|
||||
extern int allocate_resource(struct resource *root, struct resource *new,
|
||||
|
||||
Reference in New Issue
Block a user