diff options
author | delphij <delphij@FreeBSD.org> | 2015-01-23 18:39:26 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-01-23 18:39:26 +0000 |
commit | 902f541eb57090cc0e218020bd772528b1e1dd53 (patch) | |
tree | 16f7b3f42db592b638e56e2ac9f5e2576eb6bff2 /contrib/libc++/src/memory.cpp | |
parent | 429a0a7af7eec333d5ae02fa4ae60f49a74500cd (diff) | |
download | FreeBSD-src-902f541eb57090cc0e218020bd772528b1e1dd53.zip FreeBSD-src-902f541eb57090cc0e218020bd772528b1e1dd53.tar.gz |
MFC r275922: MFV r275914:
As of r270383, the dbuf_compare comparator compares the dbuf
attributes in the following order:
db_level (indirect level)
db_blkid (block number)
db_state (current state)
the address of the element
Because db_state is being considered before the element's state,
changing of db_state would affect balancedness of the AVL tree,
even when the address of element compares differently. For
instance, in dbuf_create, db_state may be altered after the
node is inserted into the AVL tree and may break AVL tree
balancedness.
Instead of using db_state as a comparision critera (introduced
in r270383), consider it only when we are doing a lookup, that
is one of the two dbuf pointers contains DB_SEARCH.
Illumos issue:
5422 preserve AVL invariants in dn_dbufs
Diffstat (limited to 'contrib/libc++/src/memory.cpp')
0 files changed, 0 insertions, 0 deletions