|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] manual merge phase 1 of 2 :-(
ChangeSet 1.1345.1.1, 2005/03/22 15:55:29+00:00, jrb44@xxxxxxxxxxxxxxxxxx
manual merge phase 1 of 2 :-(
blockstore.h | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+)
diff -Nru a/tools/blktap/blockstore.h b/tools/blktap/blockstore.h
--- a/tools/blktap/blockstore.h 2005-03-22 15:03:56 -05:00
+++ b/tools/blktap/blockstore.h 2005-03-22 15:03:56 -05:00
@@ -21,15 +21,40 @@
#define SECTOR_SHIFT 9
#endif
+#define FREEBLOCK_SIZE (BLOCK_SIZE / sizeof(u64)) - (3 * sizeof(u64))
+#define FREEBLOCK_MAGIC 0x0fee0fee0fee0fee
+
+typedef struct {
+ u64 magic;
+ u64 next;
+ u64 count;
+ u64 list[FREEBLOCK_SIZE];
+} freeblock_t;
+
+#define BLOCKSTORE_MAGIC 0xaaaaaaa00aaaaaaa
+#define BLOCKSTORE_SUPER 1ULL
+
+typedef struct {
+ u64 magic;
+ u64 freelist_full;
+ u64 freelist_current;
+} blockstore_super_t;
extern void *newblock();
extern void *readblock(u64 id);
extern u64 allocblock(void *block);
extern u64 allocblock_hint(void *block, u64 hint);
extern int writeblock(u64 id, void *block);
+
+/* Add this blockid to a freelist, to be recycled by the allocator. */
+extern void releaseblock(u64 id);
+
+/* this is a memory free() operation for block-sized allocations */
extern void freeblock(void *block);
extern int __init_blockstore(void);
+/* debug for freelist. */
+void freelist_count(int print_each);
#define ALLOCFAIL (((u64)(-1)))
/* Distribution
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] manual merge phase 1 of 2 :-(,
BitKeeper Bot <=
|
|
|
|
|