-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonthan Brassow
authored and
Alasdair G Kergon
committed
Jun 22, 2009
1 parent
f08de7e
commit e33d79b
Showing
10 changed files
with
1,449 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 754c5fc7ebb417b23601a6222a6005cc2e7f2913 | ||
refs/heads/master: f5db4af466e2dca0fe822019812d586ca910b00c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Device-Mapper Logging | ||
===================== | ||
The device-mapper logging code is used by some of the device-mapper | ||
RAID targets to track regions of the disk that are not consistent. | ||
A region (or portion of the address space) of the disk may be | ||
inconsistent because a RAID stripe is currently being operated on or | ||
a machine died while the region was being altered. In the case of | ||
mirrors, a region would be considered dirty/inconsistent while you | ||
are writing to it because the writes need to be replicated for all | ||
the legs of the mirror and may not reach the legs at the same time. | ||
Once all writes are complete, the region is considered clean again. | ||
|
||
There is a generic logging interface that the device-mapper RAID | ||
implementations use to perform logging operations (see | ||
dm_dirty_log_type in include/linux/dm-dirty-log.h). Various different | ||
logging implementations are available and provide different | ||
capabilities. The list includes: | ||
|
||
Type Files | ||
==== ===== | ||
disk drivers/md/dm-log.c | ||
core drivers/md/dm-log.c | ||
userspace drivers/md/dm-log-userspace* include/linux/dm-log-userspace.h | ||
|
||
The "disk" log type | ||
------------------- | ||
This log implementation commits the log state to disk. This way, the | ||
logging state survives reboots/crashes. | ||
|
||
The "core" log type | ||
------------------- | ||
This log implementation keeps the log state in memory. The log state | ||
will not survive a reboot or crash, but there may be a small boost in | ||
performance. This method can also be used if no storage device is | ||
available for storing log state. | ||
|
||
The "userspace" log type | ||
------------------------ | ||
This log type simply provides a way to export the log API to userspace, | ||
so log implementations can be done there. This is done by forwarding most | ||
logging requests to userspace, where a daemon receives and processes the | ||
request. | ||
|
||
The structure used for communication between kernel and userspace are | ||
located in include/linux/dm-log-userspace.h. Due to the frequency, | ||
diversity, and 2-way communication nature of the exchanges between | ||
kernel and userspace, 'connector' is used as the interface for | ||
communication. | ||
|
||
There are currently two userspace log implementations that leverage this | ||
framework - "clustered_disk" and "clustered_core". These implementations | ||
provide a cluster-coherent log for shared-storage. Device-mapper mirroring | ||
can be used in a shared-storage environment when the cluster log implementations | ||
are employed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.