From ce002301b524b4f6377b7dd3df6bc683c919123c Mon Sep 17 00:00:00 2001
From: Manuel Bentele
Date: Tue, 14 May 2019 01:13:20 +0200
Subject: Added sequence and class diagram of the loop device driver
---
analysis/loop/class_diagram_loop_device.pdf | Bin 0 -> 23098 bytes
analysis/loop/class_diagram_loop_device.svg | 10151 +++++++++++++++++++
analysis/loop/class_diagram_loop_device.xmi | 1632 +++
analysis/loop/class_diagram_loop_device_small.pdf | Bin 0 -> 22590 bytes
analysis/loop/class_diagram_loop_device_small.svg | 8391 +++++++++++++++
analysis/loop/class_diagram_loop_device_small.xmi | 1522 +++
.../sequence_diagram_loop_device_init_exit.pdf | Bin 0 -> 25973 bytes
.../sequence_diagram_loop_device_init_exit.svg | 1 +
.../sequence_diagram_loop_device_init_exit.txt | 187 +
9 files changed, 21884 insertions(+)
create mode 100644 analysis/loop/class_diagram_loop_device.pdf
create mode 100644 analysis/loop/class_diagram_loop_device.svg
create mode 100644 analysis/loop/class_diagram_loop_device.xmi
create mode 100644 analysis/loop/class_diagram_loop_device_small.pdf
create mode 100644 analysis/loop/class_diagram_loop_device_small.svg
create mode 100644 analysis/loop/class_diagram_loop_device_small.xmi
create mode 100644 analysis/loop/sequence_diagram_loop_device_init_exit.pdf
create mode 100644 analysis/loop/sequence_diagram_loop_device_init_exit.svg
create mode 100644 analysis/loop/sequence_diagram_loop_device_init_exit.txt
diff --git a/analysis/loop/class_diagram_loop_device.pdf b/analysis/loop/class_diagram_loop_device.pdf
new file mode 100644
index 0000000..55a54ae
Binary files /dev/null and b/analysis/loop/class_diagram_loop_device.pdf differ
diff --git a/analysis/loop/class_diagram_loop_device.svg b/analysis/loop/class_diagram_loop_device.svg
new file mode 100644
index 0000000..ca177c0
--- /dev/null
+++ b/analysis/loop/class_diagram_loop_device.svg
@@ -0,0 +1,10151 @@
+
+
diff --git a/analysis/loop/class_diagram_loop_device.xmi b/analysis/loop/class_diagram_loop_device.xmi
new file mode 100644
index 0000000..108027e
--- /dev/null
+++ b/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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/analysis/loop/class_diagram_loop_device_small.pdf b/analysis/loop/class_diagram_loop_device_small.pdf
new file mode 100644
index 0000000..85b35f5
Binary files /dev/null and b/analysis/loop/class_diagram_loop_device_small.pdf differ
diff --git a/analysis/loop/class_diagram_loop_device_small.svg b/analysis/loop/class_diagram_loop_device_small.svg
new file mode 100644
index 0000000..71959a0
--- /dev/null
+++ b/analysis/loop/class_diagram_loop_device_small.svg
@@ -0,0 +1,8391 @@
+
+
diff --git a/analysis/loop/class_diagram_loop_device_small.xmi b/analysis/loop/class_diagram_loop_device_small.xmi
new file mode 100644
index 0000000..91a2d2e
--- /dev/null
+++ b/analysis/loop/class_diagram_loop_device_small.xmi
@@ -0,0 +1,1522 @@
+
+
+
+
+ umbrello uml modeller http://umbrello.kde.org
+ 1.6.16
+ UnicodeUTF8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/analysis/loop/sequence_diagram_loop_device_init_exit.pdf b/analysis/loop/sequence_diagram_loop_device_init_exit.pdf
new file mode 100644
index 0000000..4ce08a9
Binary files /dev/null and b/analysis/loop/sequence_diagram_loop_device_init_exit.pdf differ
diff --git a/analysis/loop/sequence_diagram_loop_device_init_exit.svg b/analysis/loop/sequence_diagram_loop_device_init_exit.svg
new file mode 100644
index 0000000..b01c93d
--- /dev/null
+++ b/analysis/loop/sequence_diagram_loop_device_init_exit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/analysis/loop/sequence_diagram_loop_device_init_exit.txt b/analysis/loop/sequence_diagram_loop_device_init_exit.txt
new file mode 100644
index 0000000..1c04f40
--- /dev/null
+++ b/analysis/loop/sequence_diagram_loop_device_init_exit.txt
@@ -0,0 +1,187 @@
+title Loop device kernel module
+participantgroup #lightyellow Kernel
+participant Kernel
+participantgroup #lightblue Loop device kernel module
+participant Module
+participant Loop control
+participant Loop device
+end
+participant MISC
+participant Blkdev
+participant Blk-mq
+participant Blk-settings
+participant Blk-core
+participant Genhd
+end
+
+group Kernel module init
+activate Kernel
+
+Kernel->Module:module_init
+activate Module
+deactivate Kernel
+Module->Loop control:loop_init
+deactivate Module
+activate Loop control
+Loop control->MISC:misc_register
+deactivate Loop control
+activate MISC
+note right of MISC:create "loop-control"\nmisc device
+Loop control<--MISC:
+deactivate MISC
+activate Loop control
+Loop control->Blkdev:register_blkdev
+deactivate Loop control
+activate Blkdev
+note right of Blkdev:create "loop"\nblock device
+Loop control<--Blkdev:
+activate Loop control
+deactivate Blkdev
+Loop control->Genhd:blk_register_region
+deactivate Loop control
+activate Genhd
+note right of Genhd:register device\nnumbers
+Loop control<--Genhd:
+deactivate Genhd
+activate Loop control
+
+loop pre-create loop devices
+Loop control->Loop device:loop_add
+deactivate Loop control
+activate Loop device
+Loop device->Blk-mq:blk_mq_alloc_tag_set
+activate Blk-mq
+deactivate Loop device
+Loop device<--Blk-mq:
+deactivate Blk-mq
+activate Loop device
+Loop device->Blk-mq:blk_mq_init_queue
+activate Blk-mq
+deactivate Loop device
+Loop device<--Blk-mq:
+deactivate Blk-mq
+activate Loop device
+Loop device->Blk-settings:blk_queue_max_hw_sectors
+activate Blk-settings
+deactivate Loop device
+Loop device<--Blk-settings:
+deactivate Blk-settings
+
+activate Loop device
+Loop device->Blk-core:blk_queue_flag_set
+activate Blk-core
+deactivate Loop device
+Loop device<--Blk-core:
+deactivate Blk-core
+
+activate Loop device
+Loop device->Genhd:alloc_disk
+activate Genhd
+deactivate Loop device
+Loop device<--Genhd:
+deactivate Genhd
+
+activate Loop device
+Loop device->Genhd:add_disk
+activate Genhd
+deactivate Loop device
+Loop device<--Genhd:
+deactivate Genhd
+
+activate Loop device
+Loop control<--Loop device:
+deactivate Loop device
+activate Loop control
+end
+
+Module<--Loop control:
+deactivate Loop control
+activate Module
+Kernel<--Module:
+deactivate Module
+activate Kernel
+space
+deactivate Kernel
+end
+
+group Kernel module exit
+activate Kernel
+Kernel->Module:module_exit
+deactivate Kernel
+activate Module
+Module->Loop control:loop_exit
+deactivate Module
+activate Loop control
+
+
+loop delete loop devices
+Loop control->Loop device:loop_remove
+deactivate Loop control
+
+activate Loop device
+Loop device->Genhd:del_gendisk
+activate Genhd
+deactivate Loop device
+Loop device<--Genhd:
+deactivate Genhd
+
+activate Loop device
+Loop device->Blk-core:blk_cleanup_queue
+activate Blk-core
+deactivate Loop device
+Loop device<--Blk-core:
+deactivate Blk-core
+
+activate Loop device
+Loop device->Blk-mq:blk_mq_free_tag_set
+activate Blk-mq
+deactivate Loop device
+Loop device<--Blk-mq:
+deactivate Blk-mq
+
+activate Loop device
+Loop device->Genhd:put_disk
+activate Genhd
+deactivate Loop device
+Loop device<--Genhd:
+deactivate Genhd
+
+activate Loop device
+Loop control<--Loop device:
+deactivate Loop device
+activate Loop control
+end
+
+Loop control->Genhd:blk_unregister_region
+deactivate Loop control
+activate Genhd
+note right of Genhd:delete device\nnumbers
+Loop control<--Genhd:
+deactivate Genhd
+activate Loop control
+
+Loop control->Blkdev:unregister_blkdev
+deactivate Loop control
+activate Blkdev
+note right of Blkdev:delete "loop"\nblock device
+Loop control<--Blkdev:
+deactivate Blkdev
+activate Loop control
+
+Loop control->MISC:misc_deregister
+deactivate Loop control
+activate MISC
+note right of MISC:delete "loop-control"\nmisc device
+Loop control<--MISC:
+deactivate MISC
+
+activate Loop control
+Module<--Loop control:
+deactivate Loop control
+
+activate Module
+Kernel<--Module:
+deactivate Module
+
+activate Kernel
+end
\ No newline at end of file
--
cgit v1.2.3-55-g7522