summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/getopt_long.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2003-02-22 00:59:34 +0000
committermckusick <mckusick@FreeBSD.org>2003-02-22 00:59:34 +0000
commit9ed5a11f37a83d8330dd79757d41fe9b50a0fb42 (patch)
tree7591ade57520ea788cd8fbbeecae1717902e1df9 /lib/libc/stdlib/getopt_long.c
parent5340f28b154d4fa0a65fbe142b2d7dec10966348 (diff)
downloadFreeBSD-src-9ed5a11f37a83d8330dd79757d41fe9b50a0fb42.zip
FreeBSD-src-9ed5a11f37a83d8330dd79757d41fe9b50a0fb42.tar.gz
This patch fixes a deadlock between the bufdaemon and a process taking
a snapshot. As part of taking a snapshot of a filesystem, the kernel builds up a list of the filesystem metadata (such as the cylinder group bitmaps) that are contained in the snapshot. When doing a copy-on-write check, the list is first consulted. If the block being written is found on the list, then the full snapshot lookup can be avoided. Besides providing an important performance speedup this check also avoids a potential deadlock between the code creating the snapshot and the bufdaemon trying to cleanup snapshot related buffers. This fix creates a temporary list containing the key metadata blocks that can cause the deadlock. This temporary list is used between the time that the snapshot is first enabled and the time that the fully complete list is built. Reported by: Attila Nagy <bra@fsn.hu> Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud