]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: open file list should be dynamic
authorToomas Soome <tsoome@FreeBSD.org>
Sat, 31 Jul 2021 08:09:48 +0000 (11:09 +0300)
committerToomas Soome <tsoome@FreeBSD.org>
Tue, 10 Aug 2021 18:54:32 +0000 (21:54 +0300)
commit97cbd5e722389a575e820c4e03f38053308f08ea
tree0ca028ef124becb893ed91182581c3390e5647b3
parent13a58148de1730f851d37513913fae547e53a512
loader: open file list should be dynamic

Summary:
Open file list is currently created as statically allocated array (64 items).
Once this array is filled up, loader will not be able to operate with files.
In most cases, this mechanism is good enough, but the problem appears, when
we have many disks with zfs pool(s). In current loader implementation, all
discovered zfs pool configurations are kept in memory and disk devices open -
consuming the open file array. Rewrite the open file mechanism to use
dynamically allocated list.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31364
13 files changed:
stand/libsa/close.c
stand/libsa/closeall.c
stand/libsa/fstat.c
stand/libsa/ioctl.c
stand/libsa/iodesc.h
stand/libsa/lseek.c
stand/libsa/net.h
stand/libsa/netif.c
stand/libsa/open.c
stand/libsa/read.c
stand/libsa/readdir.c
stand/libsa/stand.h
stand/libsa/write.c