OPEN_RDWR
if ((hdp = handle_alloc(root_dir, OPEN_RDWR)) == NULL) {
assert(flags == OPEN_RDWR || flags == OPEN_RDONLY);
if (flags == OPEN_RDWR && isroot) {
if (open_db(hdp, OPEN_RDWR) != 0) {
#define IS_RDWR(f) (((f) & OPEN_FLAGS) == OPEN_RDWR)
#define HDL_RDWR(h) (((h)->flags & OPEN_FLAGS) == OPEN_RDWR)
#define DB_RDWR(h) ((DB(h)->flags & OPEN_FLAGS) == OPEN_RDWR)