Unix and Linux Discussions Tagged with bios |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
2,915 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
2,618 |
Programming |
|
|
|
11 |
11,858 |
Debian |
|
|
|
2 |
5,930 |
Solaris |
|
|
|
4 |
6,408 |
Red Hat |
|
|
|
1 |
2,350 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
19,863 |
Solaris |
|
|
|
6 |
4,090 |
Linux |
|
|
|
4 |
23,563 |
Solaris |
|
|
|
0 |
1,335 |
Software Releases - RSS News |
|
|
|
1 |
3,903 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,397 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
7,950 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,679 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,789 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,181 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,489 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
3,801 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
2,413 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,270 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,947 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
10,824 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,008 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
4,466 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,408 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
35,781 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,006 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,192 |
IP Networking |
|
|
|
1 |
4,079 |
UNIX for Dummies Questions & Answers |
BIO_ALLOC_BIOSET(9) The Linux VFS BIO_ALLOC_BIOSET(9)
NAME
bio_alloc_bioset - allocate a bio for I/O
SYNOPSIS
struct bio * bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set * bs);
ARGUMENTS
gfp_mask
the GFP_ mask given to the slab allocator
nr_iovecs
number of iovecs to pre-allocate
bs
the bio_set to allocate from.
DESCRIPTION
If bs is NULL, uses kmalloc to allocate the bio; else the allocation is backed by the bs's mempool.
When bs is not NULL, if __GFP_WAIT is set then bio_alloc will always be able to allocate a bio. This is due to the mempool guarantees. To
make this work, callers must never allocate more than 1 bio at a time from this pool. Callers that need to allocate more than 1 bio must
always submit the previously allocated bio for IO before attempting to allocate a new one. Failure to do so can cause deadlocks under
memory pressure.
Note that when running under generic_make_request (i.e. any block driver), bios are not submitted until after you return - see the code in
generic_make_request that converts recursion into iteration, to prevent stack overflows.
This would normally mean allocating multiple bios under generic_make_request would be susceptible to deadlocks, but we have deadlock
avoidance code that resubmits any blocked bios from a rescuer thread.
However, we do not guarantee forward progress for allocations from other mempools. Doing multiple allocations from the same mempool under
generic_make_request should be avoided - instead, use bio_set's front_pad for per bio allocations.
RETURNS
Pointer to new bio on success, NULL on failure.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 BIO_ALLOC_BIOSET(9)