Project

General

Profile

Bug #7904

loader: remove open_disk cache

Added by Toomas Soome almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
bootloader
Start date:
2017-02-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The recent rework on implementing support to read disk/partition size from partition table and implementing more strict validation for reads in biosdisk.c did reveal the problem with open_disk cache. To save the memory and based on the fact that with ufs there was only one file system reader active at the time, the open_disk data was cached and shared. The cache implementation is still there and active, however, it really does not do any good in case of zfs, because the disk devices are always open with pools.

Moreover, sharing the open disk info in case of multiple file systems on the same disk can render the pool unreadable because the last partition size will be stored in open_disk structure and since this structure is shared, the pool IO will be limited to the last partition size.

The fix is relatively simple and straight forward - we just remove the cache part, ensuring every opened disk device will get its own private instance of open disk info and the structure data will not be disturbed.

#1

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 74207d1d4df9f8f95dbf4932ea9049f9cf7b6058

commit  74207d1d4df9f8f95dbf4932ea9049f9cf7b6058
Author: Toomas Soome <tsoome@me.com>
Date:   2017-02-25T10:56:37.000Z

    7904 loader: remove open_disk cache
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF