This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / ntfs / types.h
index 08a55aa..a98731e 100644 (file)
@@ -53,6 +53,34 @@ typedef sle64 leLCN;
 typedef s64 LSN;
 typedef sle64 leLSN;
 
+/**
+ * runlist_element - in memory vcn to lcn mapping array element
+ * @vcn:       starting vcn of the current array element
+ * @lcn:       starting lcn of the current array element
+ * @length:    length in clusters of the current array element
+ *
+ * The last vcn (in fact the last vcn + 1) is reached when length == 0.
+ *
+ * When lcn == -1 this means that the count vcns starting at vcn are not
+ * physically allocated (i.e. this is a hole / data is sparse).
+ */
+typedef struct {       /* In memory vcn to lcn mapping structure element. */
+       VCN vcn;        /* vcn = Starting virtual cluster number. */
+       LCN lcn;        /* lcn = Starting logical cluster number. */
+       s64 length;     /* Run length in clusters. */
+} runlist_element;
+
+/**
+ * runlist - in memory vcn to lcn mapping array including a read/write lock
+ * @rl:                pointer to an array of runlist elements
+ * @lock:      read/write spinlock for serializing access to @rl
+ *
+ */
+typedef struct {
+       runlist_element *rl;
+       struct rw_semaphore lock;
+} runlist;
+
 typedef enum {
        FALSE = 0,
        TRUE = 1