summaryrefslogtreecommitdiff
path: root/hurd/libstore
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2010-12-13 17:11:51 +0100
committerThomas Schwinge <thomas@schwinge.name>2010-12-13 17:11:51 +0100
commit2d75167da62e3486836e5f1773e5f1ab06e43fe8 (patch)
treee44fc83e0b1419836d1b21652ad1d38b8d0af2c4 /hurd/libstore
parent217998d56f5b6424a685f8c87f2c0e924d1c89da (diff)
parent5c5c16e265d8ef56b71f319885f32bf144bdea23 (diff)
Merge branch 'master' into external_pager_mechanism
Conflicts: microkernel/mach/external_pager_mechanism.mdwn
Diffstat (limited to 'hurd/libstore')
-rw-r--r--hurd/libstore/bunzip2_store.mdwn12
-rw-r--r--hurd/libstore/concat_store.mdwn12
-rw-r--r--hurd/libstore/copy_store.mdwn25
-rw-r--r--hurd/libstore/device_store.mdwn12
-rw-r--r--hurd/libstore/examples/ramdisk.mdwn32
-rw-r--r--hurd/libstore/file_store.mdwn12
-rw-r--r--hurd/libstore/gunzip_store.mdwn12
-rw-r--r--hurd/libstore/ileave_store.mdwn12
-rw-r--r--hurd/libstore/nbd_store.mdwn12
-rw-r--r--hurd/libstore/part.mdwn26
-rw-r--r--hurd/libstore/query_store.mdwn12
-rw-r--r--hurd/libstore/remap_store.mdwn12
-rw-r--r--hurd/libstore/task_store.mdwn12
-rw-r--r--hurd/libstore/typed_store.mdwn12
-rw-r--r--hurd/libstore/url_store.mdwn12
-rw-r--r--hurd/libstore/zero_store.mdwn19
16 files changed, 246 insertions, 0 deletions
diff --git a/hurd/libstore/bunzip2_store.mdwn b/hurd/libstore/bunzip2_store.mdwn
new file mode 100644
index 00000000..bd5fc914
--- /dev/null
+++ b/hurd/libstore/bunzip2_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="bunzip2 store: bunzip2 data on the fly"]]
diff --git a/hurd/libstore/concat_store.mdwn b/hurd/libstore/concat_store.mdwn
new file mode 100644
index 00000000..1d3a895a
--- /dev/null
+++ b/hurd/libstore/concat_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="concat store: concatenate"]]
diff --git a/hurd/libstore/copy_store.mdwn b/hurd/libstore/copy_store.mdwn
new file mode 100644
index 00000000..5df5d220
--- /dev/null
+++ b/hurd/libstore/copy_store.mdwn
@@ -0,0 +1,25 @@
+[[!meta copyright="Copyright © 2000, 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="copy store: copy-on-write; discard changes on termination"]]
+
+A *copy* store is meaningful only with respect to a child store. What a *copy*
+store does is to read the child store's entire contents into memory at startup
+time and then use that buffer as the contents of the store thereafter. (The
+code for this is in `libstore/copy.c`.)
+
+Because of how the interfaces are specified, reading the entire contents of a
+[[*zero* store|zero store]] in fact means just `vm_allocate`ing fresh memory.
+So, a *copy* store based on a [[*zero* store|zero store]] is just what you'd
+get from `vm_allocate`ing some memory and passing it into
+`store_buffer_create`.
+
+See a [[ramdisk example|examples/ramdisk]].
diff --git a/hurd/libstore/device_store.mdwn b/hurd/libstore/device_store.mdwn
new file mode 100644
index 00000000..4b97f8cc
--- /dev/null
+++ b/hurd/libstore/device_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="device store: Mach device access"]]
diff --git a/hurd/libstore/examples/ramdisk.mdwn b/hurd/libstore/examples/ramdisk.mdwn
new file mode 100644
index 00000000..33d33601
--- /dev/null
+++ b/hurd/libstore/examples/ramdisk.mdwn
@@ -0,0 +1,32 @@
+[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+ $ settrans --create --active ramdisk0 /hurd/storeio -T copy zero:32M
+ $ mkfs.ext2 -F -b 4096 ramdisk0
+ [...]
+ $ settrans --active --orphan ramdisk0 /hurd/ext2fs.static ramdisk0
+ $ df -h ramdisk0/
+ df: Warning: cannot read table of mounted file systems
+ Filesystem Size Used Avail Use% Mounted on
+ - 32M 1.1M 30M 4% /media/data/home/tschwinge/ramdisk0
+
+This uses [[settrans]] and [[storeio]] to create a ramdisk of 32 MiB by routing
+a thusly sized [[zero store]] through the [[copy store]], connecting
+that to the `ramdisk0` node, create a `ext2` filesystem on it, and replace the
+translator running on the `ramdisk0` node with a instance of the [[`ext2fs`
+translator|translator/ext2fs]] running on the same node ([[translator
+stacking|translator/stacking]]).
+
+It is a [[!taglink open_issue_hurd]] why this does only work with
+`ext2fs.static`, but not the dynamically linked `ext2fs` (`settrans:
+/hurd/ext2fs: Translator died`).
+
+A (better) alternative would be using the [[`tmpfs`
+translator|translator/tmpfs]], but that one is broken at the moment.
diff --git a/hurd/libstore/file_store.mdwn b/hurd/libstore/file_store.mdwn
new file mode 100644
index 00000000..5e9f6822
--- /dev/null
+++ b/hurd/libstore/file_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="file store: use a file as a kind of block device"]]
diff --git a/hurd/libstore/gunzip_store.mdwn b/hurd/libstore/gunzip_store.mdwn
new file mode 100644
index 00000000..25fca4bf
--- /dev/null
+++ b/hurd/libstore/gunzip_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="gunzip store: gunzip data on the fly"]]
diff --git a/hurd/libstore/ileave_store.mdwn b/hurd/libstore/ileave_store.mdwn
new file mode 100644
index 00000000..29b51b72
--- /dev/null
+++ b/hurd/libstore/ileave_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="ileave store: interleave store (striping)"]]
diff --git a/hurd/libstore/nbd_store.mdwn b/hurd/libstore/nbd_store.mdwn
new file mode 100644
index 00000000..5874b162
--- /dev/null
+++ b/hurd/libstore/nbd_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="nbd store: Linux-compatible network block device"]]
diff --git a/hurd/libstore/part.mdwn b/hurd/libstore/part.mdwn
new file mode 100644
index 00000000..5d727ad8
--- /dev/null
+++ b/hurd/libstore/part.mdwn
@@ -0,0 +1,26 @@
+[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="part store"]]
+
+`part.c`
+
+Written by Neal in 2001, 2002.
+
+Useful if the microkernel / [[DDE]] / [[microkernel/mach/gnumach/ports/Xen]]
+doesn't export *partition devices*, but only *raw* devices.
+
+Neal:
+
+> The motivation was to be able to evict the partitioning logic from Mach.
+
+---
+
+TODO: How to use, etc.
diff --git a/hurd/libstore/query_store.mdwn b/hurd/libstore/query_store.mdwn
new file mode 100644
index 00000000..9ebf8e47
--- /dev/null
+++ b/hurd/libstore/query_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="query store"]]
diff --git a/hurd/libstore/remap_store.mdwn b/hurd/libstore/remap_store.mdwn
new file mode 100644
index 00000000..158ffe95
--- /dev/null
+++ b/hurd/libstore/remap_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="remap store"]]
diff --git a/hurd/libstore/task_store.mdwn b/hurd/libstore/task_store.mdwn
new file mode 100644
index 00000000..e4426639
--- /dev/null
+++ b/hurd/libstore/task_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="task store: Mach task store backend"]]
diff --git a/hurd/libstore/typed_store.mdwn b/hurd/libstore/typed_store.mdwn
new file mode 100644
index 00000000..e71ff67f
--- /dev/null
+++ b/hurd/libstore/typed_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="typed store: chainable stores"]]
diff --git a/hurd/libstore/url_store.mdwn b/hurd/libstore/url_store.mdwn
new file mode 100644
index 00000000..17a24e97
--- /dev/null
+++ b/hurd/libstore/url_store.mdwn
@@ -0,0 +1,12 @@
+[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="url store: typed store with URL syntax"]]
diff --git a/hurd/libstore/zero_store.mdwn b/hurd/libstore/zero_store.mdwn
new file mode 100644
index 00000000..4c53ab56
--- /dev/null
+++ b/hurd/libstore/zero_store.mdwn
@@ -0,0 +1,19 @@
+[[!meta copyright="Copyright © 2000, 2007, 2008, 2009 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="zero store: empty block device"]]
+
+A *zero* store is what `/dev/zero` is (always reads zeros), the setting on
+`/dev/zero` gives no name (i.e. size) and the default size is the maximum
+possible. The only meaning of the size of a *zero* is what `st_size` will
+report and what offsets it will let you try to read or write from--there is
+never any data associated with a *zero* store. (The code for this is in
+`libstore/zero.c`.)