]> 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>
Thu, 26 Aug 2021 07:59:28 +0000 (10:59 +0300)
commitcb08b3020f7ae3e647c27cff9e7dd5be24d60ffe
treecce53d4c6be0b649f8ed07b00b2ef77838342748
parent18f89d2df4570af90c0316d47b4c2fb1d2aae96a
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
Differential Revision: https://reviews.freebsd.org/D31364

(cherry picked from commit 97cbd5e722389a575e820c4e03f38053308f08ea)
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