亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? raid5.h

?? umon bootloader source code, support mips cpu.
?? H
字號(hào):
#ifndef _RAID5_H
#define _RAID5_H

#include <linux/raid/md.h>
#include <linux/raid/xor.h>

/*
 *
 * Each stripe contains one buffer per disc.  Each buffer can be in
 * one of a number of states stored in "flags".  Changes between
 * these states happen *almost* exclusively under a per-stripe
 * spinlock.  Some very specific changes can happen in bi_end_io, and
 * these are not protected by the spin lock.
 *
 * The flag bits that are used to represent these states are:
 *   R5_UPTODATE and R5_LOCKED
 *
 * State Empty == !UPTODATE, !LOCK
 *        We have no data, and there is no active request
 * State Want == !UPTODATE, LOCK
 *        A read request is being submitted for this block
 * State Dirty == UPTODATE, LOCK
 *        Some new data is in this buffer, and it is being written out
 * State Clean == UPTODATE, !LOCK
 *        We have valid data which is the same as on disc
 *
 * The possible state transitions are:
 *
 *  Empty -> Want   - on read or write to get old data for  parity calc
 *  Empty -> Dirty  - on compute_parity to satisfy write/sync request.(RECONSTRUCT_WRITE)
 *  Empty -> Clean  - on compute_block when computing a block for failed drive
 *  Want  -> Empty  - on failed read
 *  Want  -> Clean  - on successful completion of read request
 *  Dirty -> Clean  - on successful completion of write request
 *  Dirty -> Clean  - on failed write
 *  Clean -> Dirty  - on compute_parity to satisfy write/sync (RECONSTRUCT or RMW)
 *
 * The Want->Empty, Want->Clean, Dirty->Clean, transitions
 * all happen in b_end_io at interrupt time.
 * Each sets the Uptodate bit before releasing the Lock bit.
 * This leaves one multi-stage transition:
 *    Want->Dirty->Clean
 * This is safe because thinking that a Clean buffer is actually dirty
 * will at worst delay some action, and the stripe will be scheduled
 * for attention after the transition is complete.
 *
 * There is one possibility that is not covered by these states.  That
 * is if one drive has failed and there is a spare being rebuilt.  We
 * can't distinguish between a clean block that has been generated
 * from parity calculations, and a clean block that has been
 * successfully written to the spare ( or to parity when resyncing).
 * To distingush these states we have a stripe bit STRIPE_INSYNC that
 * is set whenever a write is scheduled to the spare, or to the parity
 * disc if there is no spare.  A sync request clears this bit, and
 * when we find it set with no buffers locked, we know the sync is
 * complete.
 *
 * Buffers for the md device that arrive via make_request are attached
 * to the appropriate stripe in one of two lists linked on b_reqnext.
 * One list (bh_read) for read requests, one (bh_write) for write.
 * There should never be more than one buffer on the two lists
 * together, but we are not guaranteed of that so we allow for more.
 *
 * If a buffer is on the read list when the associated cache buffer is
 * Uptodate, the data is copied into the read buffer and it's b_end_io
 * routine is called.  This may happen in the end_request routine only
 * if the buffer has just successfully been read.  end_request should
 * remove the buffers from the list and then set the Uptodate bit on
 * the buffer.  Other threads may do this only if they first check
 * that the Uptodate bit is set.  Once they have checked that they may
 * take buffers off the read queue.
 *
 * When a buffer on the write list is committed for write it is copied
 * into the cache buffer, which is then marked dirty, and moved onto a
 * third list, the written list (bh_written).  Once both the parity
 * block and the cached buffer are successfully written, any buffer on
 * a written list can be returned with b_end_io.
 *
 * The write list and read list both act as fifos.  The read list is
 * protected by the device_lock.  The write and written lists are
 * protected by the stripe lock.  The device_lock, which can be
 * claimed while the stipe lock is held, is only for list
 * manipulations and will only be held for a very short time.  It can
 * be claimed from interrupts.
 *
 *
 * Stripes in the stripe cache can be on one of two lists (or on
 * neither).  The "inactive_list" contains stripes which are not
 * currently being used for any request.  They can freely be reused
 * for another stripe.  The "handle_list" contains stripes that need
 * to be handled in some way.  Both of these are fifo queues.  Each
 * stripe is also (potentially) linked to a hash bucket in the hash
 * table so that it can be found by sector number.  Stripes that are
 * not hashed must be on the inactive_list, and will normally be at
 * the front.  All stripes start life this way.
 *
 * The inactive_list, handle_list and hash bucket lists are all protected by the
 * device_lock.
 *  - stripes on the inactive_list never have their stripe_lock held.
 *  - stripes have a reference counter. If count==0, they are on a list.
 *  - If a stripe might need handling, STRIPE_HANDLE is set.
 *  - When refcount reaches zero, then if STRIPE_HANDLE it is put on
 *    handle_list else inactive_list
 *
 * This, combined with the fact that STRIPE_HANDLE is only ever
 * cleared while a stripe has a non-zero count means that if the
 * refcount is 0 and STRIPE_HANDLE is set, then it is on the
 * handle_list and if recount is 0 and STRIPE_HANDLE is not set, then
 * the stripe is on inactive_list.
 *
 * The possible transitions are:
 *  activate an unhashed/inactive stripe (get_active_stripe())
 *     lockdev check-hash unlink-stripe cnt++ clean-stripe hash-stripe unlockdev
 *  activate a hashed, possibly active stripe (get_active_stripe())
 *     lockdev check-hash if(!cnt++)unlink-stripe unlockdev
 *  attach a request to an active stripe (add_stripe_bh())
 *     lockdev attach-buffer unlockdev
 *  handle a stripe (handle_stripe())
 *     lockstripe clrSTRIPE_HANDLE ... (lockdev check-buffers unlockdev) .. change-state .. record io needed unlockstripe schedule io
 *  release an active stripe (release_stripe())
 *     lockdev if (!--cnt) { if  STRIPE_HANDLE, add to handle_list else add to inactive-list } unlockdev
 *
 * The refcount counts each thread that have activated the stripe,
 * plus raid5d if it is handling it, plus one for each active request
 * on a cached buffer.
 */

struct stripe_head {
	struct stripe_head	*hash_next, **hash_pprev; /* hash pointers */
	struct list_head	lru;			/* inactive_list or handle_list */
	struct raid5_private_data	*raid_conf;
	sector_t		sector;			/* sector of this row */
	int			pd_idx;			/* parity disk index */
	unsigned long		state;			/* state flags */
	atomic_t		count;			/* nr of active thread/requests */
	spinlock_t		lock;
	struct r5dev {
		struct bio	req;
		struct bio_vec	vec;
		struct page	*page;
		struct bio	*toread, *towrite, *written;
		sector_t	sector;			/* sector of this page */
		unsigned long	flags;
	} dev[1]; /* allocated with extra space depending of RAID geometry */
};
/* Flags */
#define	R5_UPTODATE	0	/* page contains current data */
#define	R5_LOCKED	1	/* IO has been submitted on "req" */
#define	R5_OVERWRITE	2	/* towrite covers whole page */
/* and some that are internal to handle_stripe */
#define	R5_Insync	3	/* rdev && rdev->in_sync at start */
#define	R5_Wantread	4	/* want to schedule a read */
#define	R5_Wantwrite	5
#define	R5_Syncio	6	/* this io need to be accounted as resync io */
#define	R5_Overlap	7	/* There is a pending overlapping request on this block */

/*
 * Write method
 */
#define RECONSTRUCT_WRITE	1
#define READ_MODIFY_WRITE	2
/* not a write method, but a compute_parity mode */
#define	CHECK_PARITY		3

/*
 * Stripe state
 */
#define STRIPE_ERROR		1
#define STRIPE_HANDLE		2
#define	STRIPE_SYNCING		3
#define	STRIPE_INSYNC		4
#define	STRIPE_PREREAD_ACTIVE	5
#define	STRIPE_DELAYED		6

/*
 * Plugging:
 *
 * To improve write throughput, we need to delay the handling of some
 * stripes until there has been a chance that several write requests
 * for the one stripe have all been collected.
 * In particular, any write request that would require pre-reading
 * is put on a "delayed" queue until there are no stripes currently
 * in a pre-read phase.  Further, if the "delayed" queue is empty when
 * a stripe is put on it then we "plug" the queue and do not process it
 * until an unplug call is made. (the unplug_io_fn() is called).
 *
 * When preread is initiated on a stripe, we set PREREAD_ACTIVE and add
 * it to the count of prereading stripes.
 * When write is initiated, or the stripe refcnt == 0 (just in case) we
 * clear the PREREAD_ACTIVE flag and decrement the count
 * Whenever the delayed queue is empty and the device is not plugged, we
 * move any strips from delayed to handle and clear the DELAYED flag and set PREREAD_ACTIVE.
 * In stripe_handle, if we find pre-reading is necessary, we do it if
 * PREREAD_ACTIVE is set, else we set DELAYED which will send it to the delayed queue.
 * HANDLE gets cleared if stripe_handle leave nothing locked.
 */
 

struct disk_info {
	mdk_rdev_t	*rdev;
};

struct raid5_private_data {
	struct stripe_head	**stripe_hashtbl;
	mddev_t			*mddev;
	struct disk_info	*spare;
	int			chunk_size, level, algorithm;
	int			raid_disks, working_disks, failed_disks;
	int			max_nr_stripes;

	struct list_head	handle_list; /* stripes needing handling */
	struct list_head	delayed_list; /* stripes that have plugged requests */
	atomic_t		preread_active_stripes; /* stripes with scheduled io */

	char			cache_name[20];
	kmem_cache_t		*slab_cache; /* for allocating stripes */
	/*
	 * Free stripes pool
	 */
	atomic_t		active_stripes;
	struct list_head	inactive_list;
	wait_queue_head_t	wait_for_stripe;
	wait_queue_head_t	wait_for_overlap;
	int			inactive_blocked;	/* release of inactive stripes blocked,
							 * waiting for 25% to be free
							 */        
	spinlock_t		device_lock;
	struct disk_info	disks[0];
};

typedef struct raid5_private_data raid5_conf_t;

#define mddev_to_conf(mddev) ((raid5_conf_t *) mddev->private)

/*
 * Our supported algorithms
 */
#define ALGORITHM_LEFT_ASYMMETRIC	0
#define ALGORITHM_RIGHT_ASYMMETRIC	1
#define ALGORITHM_LEFT_SYMMETRIC	2
#define ALGORITHM_RIGHT_SYMMETRIC	3

#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av电影在线观看| 国产精品996| 欧美日韩高清在线| 亚洲最大成人综合| 欧美日韩国产美女| 欧美aaa在线| 国产欧美日韩不卡免费| 成人影视亚洲图片在线| 亚洲免费毛片网站| 欧美一区二区网站| 国产一区欧美日韩| 亚洲欧美日韩久久| 91精品国产综合久久久蜜臀粉嫩| 久久精品国产秦先生| 国产网红主播福利一区二区| 精品国产乱码久久久久久闺蜜| 精品综合久久久久久8888| 国产拍欧美日韩视频二区| av不卡在线观看| 日韩精品91亚洲二区在线观看 | 日韩一区日韩二区| 欧美色涩在线第一页| 久久精品国产澳门| 18成人在线观看| 在线播放91灌醉迷j高跟美女 | 国内精品自线一区二区三区视频| 欧美国产日韩精品免费观看| 91福利在线导航| 国产在线不卡一区| 亚洲国产成人tv| 国产片一区二区| 欧美精品在线观看播放| 高清av一区二区| 日韩高清在线观看| 亚洲欧洲精品天堂一级| 日韩午夜激情免费电影| 97久久精品人人爽人人爽蜜臀| 男人的天堂久久精品| 136国产福利精品导航| 日韩视频免费直播| 日本精品免费观看高清观看| 精久久久久久久久久久| 亚洲一区在线观看视频| 国产精品毛片久久久久久久| 日韩亚洲欧美一区二区三区| 色偷偷久久人人79超碰人人澡| 国产乱码精品一品二品| 日本网站在线观看一区二区三区| 亚洲欧美一区二区在线观看| 久久老女人爱爱| 日韩一区二区三区视频| 欧美午夜宅男影院| 99天天综合性| 成人一区二区三区视频在线观看| 美女性感视频久久| 亚洲一区二区成人在线观看| 中文字幕在线一区| 久久综合色鬼综合色| 91麻豆精品国产91久久久资源速度 | 中文字幕精品—区二区四季| 日韩一区二区免费在线观看| 一本色道久久综合亚洲91| 成人综合婷婷国产精品久久免费| 久久99精品久久久久久动态图| 视频在线观看一区| 亚洲高清在线精品| av不卡在线观看| 99热这里都是精品| www.欧美色图| 成人av在线一区二区三区| 国产美女在线观看一区| 精品一区二区三区影院在线午夜 | 欧美成人乱码一区二区三区| 欧美老女人在线| 欧美伦理影视网| 欧美日本在线一区| 宅男在线国产精品| 日韩视频一区二区| 2023国产精品| 久久久国际精品| 国产日韩欧美制服另类| 日本一区二区三区电影| 国产女主播在线一区二区| 欧美激情一区二区三区在线| 日本一区二区三级电影在线观看| 国产亚洲综合性久久久影院| 中文字幕第一区二区| 一区在线中文字幕| 一区二区三区四区激情| 亚洲成a人片综合在线| 日韩中文字幕亚洲一区二区va在线| 天堂蜜桃91精品| 激情综合色丁香一区二区| 国产精品综合久久| 成人综合激情网| 色哦色哦哦色天天综合| 欧美怡红院视频| 日韩一区二区三区av| 国产日韩欧美不卡| 亚洲综合小说图片| 美美哒免费高清在线观看视频一区二区| 蜜臀av亚洲一区中文字幕| 国产精品一区在线| 色综合视频在线观看| 欧美人牲a欧美精品| 久久综合久久鬼色中文字| 国产精品卡一卡二卡三| 亚洲r级在线视频| 国产精品系列在线观看| 色婷婷综合中文久久一本| 91精品国产综合久久福利| 国产欧美视频一区二区| 亚洲黄色av一区| 九一九一国产精品| 99久精品国产| 日韩视频123| 最新国产成人在线观看| 奇米精品一区二区三区在线观看一| 岛国一区二区三区| 欧美日韩国产一级| 国产欧美视频一区二区三区| 五月婷婷久久丁香| 成人动漫在线一区| 欧美丰满美乳xxx高潮www| 国产精品系列在线| 免费一级片91| 91国偷自产一区二区三区观看| 欧美一区二区三区电影| 亚洲天堂成人在线观看| 久久国产精品色| 欧美亚洲综合色| 国产精品欧美久久久久一区二区| 天堂影院一区二区| 色哟哟在线观看一区二区三区| 欧美精品一区二区三区四区| 亚洲风情在线资源站| 不卡电影一区二区三区| 精品成人免费观看| 日韩成人一区二区三区在线观看| av不卡免费在线观看| 久久人人爽人人爽| 亚洲成人av一区二区| 色拍拍在线精品视频8848| 国产日产亚洲精品系列| 老司机精品视频一区二区三区| 色综合婷婷久久| 中文字幕中文字幕一区| 久久国产剧场电影| 欧美老肥妇做.爰bbww视频| 一区二区三区国产| av亚洲精华国产精华| 国产丝袜在线精品| 国产精一区二区三区| 欧美精品一区二区三区一线天视频 | 国产精品私房写真福利视频| 美女视频一区二区| 91精品国产黑色紧身裤美女| 亚洲午夜久久久久久久久电影院| 岛国一区二区三区| 久久精品亚洲精品国产欧美| 久久9热精品视频| 91精品国产综合久久久久久久久久| 亚洲午夜影视影院在线观看| 在线日韩一区二区| 亚洲综合成人网| 欧美在线短视频| 天堂va蜜桃一区二区三区漫画版 | 91精品久久久久久久久99蜜臂| 亚洲电影在线免费观看| 欧美三级蜜桃2在线观看| 亚洲一区二区美女| 欧美日韩国产大片| 蜜臀av一区二区在线观看| 日韩精品中文字幕在线不卡尤物 | 欧美一二三在线| 久久99九九99精品| 久久夜色精品国产噜噜av| 久久精工是国产品牌吗| 国产亚洲视频系列| 99视频热这里只有精品免费| 中文字幕一区二区不卡| 日本伦理一区二区| 日韩精品午夜视频| 欧美xfplay| 成人97人人超碰人人99| 一区二区三区视频在线看| 精品视频全国免费看| 久久精品国产一区二区| 国产精品无码永久免费888| 99国产精品视频免费观看| 亚洲va欧美va国产va天堂影院| 日韩无一区二区| 国产91丝袜在线播放| 亚洲精品高清在线观看| 日韩一区二区精品葵司在线 | 91色在线porny| 日韩精品国产精品| 国产蜜臀av在线一区二区三区| 91视频观看免费| 免费观看在线色综合|