git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git]
/
drivers
/
md
/
dm-snap.h
diff --git
a/drivers/md/dm-snap.h
b/drivers/md/dm-snap.h
index fdec1e2dc87183926cac41e1d62fc961e9aab851..650e0f1f51d8a6c312a001c8443cf3bc8064d481 100644
(file)
--- a/
drivers/md/dm-snap.h
+++ b/
drivers/md/dm-snap.h
@@
-10,7
+10,9
@@
#define DM_SNAPSHOT_H
#include "dm.h"
#define DM_SNAPSHOT_H
#include "dm.h"
+#include "dm-bio-list.h"
#include <linux/blkdev.h>
#include <linux/blkdev.h>
+#include <linux/workqueue.h>
struct exception_table {
uint32_t hash_mask;
struct exception_table {
uint32_t hash_mask;
@@
-28,7
+30,7
@@
typedef sector_t chunk_t;
* An exception is used where an old chunk of data has been
* replaced by a new one.
*/
* An exception is used where an old chunk of data has been
* replaced by a new one.
*/
-struct exception {
+struct
dm_snap_
exception {
struct list_head hash_list;
chunk_t old_chunk;
struct list_head hash_list;
chunk_t old_chunk;
@@
-56,13
+58,13
@@
struct exception_store {
* Find somewhere to store the next exception.
*/
int (*prepare_exception) (struct exception_store *store,
* Find somewhere to store the next exception.
*/
int (*prepare_exception) (struct exception_store *store,
- struct exception *e);
+ struct
dm_snap_
exception *e);
/*
* Update the metadata with this exception.
*/
void (*commit_exception) (struct exception_store *store,
/*
* Update the metadata with this exception.
*/
void (*commit_exception) (struct exception_store *store,
- struct exception *e,
+ struct
dm_snap_
exception *e,
void (*callback) (void *, int success),
void *callback_context);
void (*callback) (void *, int success),
void *callback_context);
@@
-112,10
+114,20
@@
struct dm_snapshot {
struct exception_table pending;
struct exception_table complete;
struct exception_table pending;
struct exception_table complete;
+ /*
+ * pe_lock protects all pending_exception operations and access
+ * as well as the snapshot_bios list.
+ */
+ spinlock_t pe_lock;
+
/* The on disk metadata handler */
struct exception_store store;
struct kcopyd_client *kcopyd_client;
/* The on disk metadata handler */
struct exception_store store;
struct kcopyd_client *kcopyd_client;
+
+ /* Queue of snapshot writes for ksnapd to flush */
+ struct bio_list queued_bios;
+ struct work_struct queued_bios_work;
};
/*
};
/*
@@
-128,10
+140,9
@@
int dm_add_exception(struct dm_snapshot *s, chunk_t old, chunk_t new);
* Constructor and destructor for the default persistent
* store.
*/
* Constructor and destructor for the default persistent
* store.
*/
-int dm_create_persistent(struct exception_store *store
, uint32_t chunk_size
);
+int dm_create_persistent(struct exception_store *store);
-int dm_create_transient(struct exception_store *store,
- struct dm_snapshot *s, int blocksize);
+int dm_create_transient(struct exception_store *store);
/*
* Return the number of sectors in the device.
/*
* Return the number of sectors in the device.