Skip to contentSkip to conversation

kernel improvement to support reordering of device list

DISCUSSION Eric Levy 1 participant 1 message Nov 10, 2022 Btrfs file system

lore
Share & tools
lore

Eric Levy

author
#0 lore raw

I have been using a file system spanning multiple block devices attached to an iSCSI target. Whenever devices are added or removed from the target, I must reboot the initiating host. I have not been able safely to refresh the device list while the host has mounted devices, because each time I change the device configuration and refresh the device list, the address of existing devices changes.

While ideally the device list may be refreshed with a guarantee of no changes to the address of any existing device, it is possible in principle that the file system, with support from the kernel, might handle safe maintenance of existing mounts despite changes in device ordering. It would require an event propagated to the file system notifying about a possible upcoming change to the device list. The file system would need to process the event by resolving existing transactions, and then suspending I/O operations, until notified that the change in the device list had completed. After such notifications, the file system would need to scan the new device list, and adjust the state of the active mount before resuming processing of queued operations.

In such a way, it would be possible for the mount to persist across changes in the addresses of the devices included in the mounted file system.

Of course, the removal of any device that is part of an existing mount must be a failure condition. Even so, the new feature would add resilience by isolating transactions from potentially dangerous actions.

Has any discussion arisen for support of such a feature in the kernel and file system?