[New: openFATE 318831] Transactional filesystem
Feature added by: Sławomir Lach (Lachu) Feature #318831, revision 1 Title: Transactional filesystem openSUSE Distribution: Unconfirmed Priority Requester: Neutral Requested by: Sławomir Lach (lachu) Partner organization: openSUSE.org Description: With Btrfs filesystem and subvolumes and copy-on-write it's (probably) possible to create transactional filesystem. How it could work? 1. It should be system call to start new transaction. Transaction would be per-thread. Any created file will be saved to subvolume. Any modified file will be saved to subcvolume. All process performing read opeation will see old version of file. Write operation on modified file could cause one of two thinks: 1) operation would block, 2) Transaction is deleted and process that starts transaction is informed about this. After process call function to end transaction, subvolumes would be megred. 2. It could be also per-file transaction. If process open file with special flag, a file-transaction is started. It works similar like previous transaction type, but only for file, so: 1) If another process open the same file for reading, it sees old version. 2) If process open file for writting, then transactionis rollback or open will block. Changes will be applied (old file will be replaced with new), when process close all fd connected to file in transaction. Instead of using BTRFS subvolumes and copy-on-wirte you can use some union fs, which saves modification date of file, while opened and comparing modification date, when saving. If date was changed, transaction will rollback. Use Case: There's some problem with baddly written tool, like programs, which saves file firstly in /tmp and then moving it to correct location to avoid problems. Business case (Partner benefit): openSUSE.org: Unix is great, because it's possible to remove file, when other process using it, but there's no way to change content of file, when process is using it. There's some problem with baddly written tool, like programs, which saves file firstly in /tmp and then moving it to correct location to avoid problems. With transactional filesystem it's a lot simpler. -- openSUSE Feature: https://features.opensuse.org/318831
participants (1)
-
fate_noreply@suse.de