Skip to content
Snippets Groups Projects
  1. Jul 09, 2021
  2. Jul 07, 2021
  3. Jul 05, 2021
  4. Jul 02, 2021
  5. Jun 25, 2021
  6. Jun 24, 2021
  7. Jun 21, 2021
  8. Jun 18, 2021
  9. Jun 17, 2021
  10. Jun 15, 2021
  11. Jun 04, 2021
  12. Jun 03, 2021
  13. Jun 02, 2021
  14. May 26, 2021
  15. May 18, 2021
  16. May 17, 2021
  17. May 14, 2021
  18. May 12, 2021
  19. May 11, 2021
  20. May 10, 2021
  21. May 04, 2021
  22. May 02, 2021
  23. May 01, 2021
  24. Apr 30, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      util: add transactions.c · 8cad15b1
      Vladimir Sementsov-Ogievskiy authored
      
      Add simple transaction API to use in further update of block graph
      operations.
      
      Supposed usage is:
      
      - "prepare" is main function of the action and it should make the main
        effect of the action to be visible for the following actions, keeping
        possibility of roll-back, saving necessary things in action state,
        which is prepended to the action list (to do that, prepare func
        should call tran_add()). So, driver struct doesn't include "prepare"
        field, as it is supposed to be called directly.
      
      - commit/rollback is supposed to be called for the list of action
        states, to commit/rollback all the actions in reverse order
      
      - When possible "commit" should not make visible effect for other
        actions, which make possible transparent logical interaction between
        actions.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20210428151804.439460-9-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8cad15b1
Loading