mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
remove artificial software max_loop limit
Remove artificial maximum 256 loop device that can be created due to a legacy device number limit. Searching through lkml archive, there are several instances where users complained about the artificial limit that the loop driver impose. There is no reason to have such limit. This patch rid the limit entirely and make loop device and associated block queue instantiation on demand. With on-demand instantiation, it also gives the benefit of not wasting memory if these devices are not in use (compare to current implementation that always create 8 loop devices), a net improvement in both areas. This version is both tested with creation of large number of loop devices and is compatible with existing losetup/mount user land tools. There are a number of people who worked on this and provided valuable suggestions, in no particular order, by: Jens Axboe Jan Engelhardt Christoph Hellwig Thomas M Signed-off-by: Ken Chen <kenchen@google.com> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4f911d64e0
commit
7328508274
2 changed files with 112 additions and 74 deletions
|
@ -64,6 +64,8 @@ struct loop_device {
|
|||
wait_queue_head_t lo_event;
|
||||
|
||||
request_queue_t *lo_queue;
|
||||
struct gendisk *lo_disk;
|
||||
struct list_head lo_list;
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue