public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: raz ben yehuda <raziebe@gmail.com>
To: Neil Brown <neilb@suse.de>, linux raid <linux-raid@vger.kernel.org>
Subject: Subject:[PATCH 011:013]: raid0.h: reshape structure
Date: Wed, 17 Jun 2009 00:59:24 +0300	[thread overview]
Message-ID: <1245189564.3478.115.camel@raz> (raw)

reshape structures. reshape and reshape_bio
for reverse mapping.

 raid0.h |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Signed-off-by: razb <raziebe@gmail.com>
---
diff --git a/drivers/md/raid0.h b/drivers/md/raid0.h
index 91f8e87..a0d6ae2 100644
--- a/drivers/md/raid0.h
+++ b/drivers/md/raid0.h
@@ -13,8 +13,37 @@ struct raid0_private_data
 	struct strip_zone *strip_zone;
 	mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */
 	int nr_strip_zones;
+	struct mutex reshape_lock;
+	struct raid0_reshape *reshape;
 };
 
 typedef struct raid0_private_data raid0_conf_t;
 
+struct raid0_reshape {
+	int16_t pages;	/* single reshape io size in pages */
+	int16_t nr_bios; /* number of bios in each chunk read */
+	int32_t bio_size; /* single reshape io size in bytes */
+	int32_t last_bio_size; /* single reshape io size in bytes */
+	atomic_t active_ios; /*number of active reshape bios (read or write)*/
+	struct bio_list ios;/* succefull reshape reads list */
+	struct bio_list incoming_ios;/* incmoing ios while reshaping  */
+	int raid_disks; /* number of raid disks in new array */
+	int window; 	/* reshape last window size */
+	long flags;	/* reshape state flag */
+	spinlock_t lock; /* lock used to maintain both lists */
+	raid0_conf_t *conf;/* reshape temporary mapping raid device */
+	mddev_t *mddev_src; /* source mddev */
+};
+
+struct raid0_reshape_bio{
+	sector_t array_sector;
+	int bi_size;
+	struct raid0_reshape *reshape;
+};
+
+static inline struct raid0_reshape *mddev_to_reshape(mddev_t *mddev)
+{
+	return	((raid0_conf_t *)mddev->private)->reshape;
+}
+
 #endif




                 reply	other threads:[~2009-06-16 21:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245189564.3478.115.camel@raz \
    --to=raziebe@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox