raid5.c (18b0033491f584a2d79697da714b1ef9d6b27d22) | raid5.c (f701d589aa34d7531183c9ac6f7713ba14212b02) |
---|---|
1/* 2 * raid5.c : Multiple Devices driver for Linux 3 * Copyright (C) 1996, 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman 4 * Copyright (C) 1999, 2000 Ingo Molnar 5 * Copyright (C) 2002, 2003 H. Peter Anvin 6 * 7 * RAID-4/5/6 management functions. 8 * Thanks to Penguin Computing for making the RAID-6 development possible --- 31 unchanged lines hidden (view full) --- 40 * When we notice that bm_flush > bm_write, we write out all pending updates 41 * to the bitmap, and advance bm_write to where bm_flush was. 42 * This may occasionally write a bit out twice, but is sure never to 43 * miss any bits. 44 */ 45 46#include <linux/blkdev.h> 47#include <linux/kthread.h> | 1/* 2 * raid5.c : Multiple Devices driver for Linux 3 * Copyright (C) 1996, 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman 4 * Copyright (C) 1999, 2000 Ingo Molnar 5 * Copyright (C) 2002, 2003 H. Peter Anvin 6 * 7 * RAID-4/5/6 management functions. 8 * Thanks to Penguin Computing for making the RAID-6 development possible --- 31 unchanged lines hidden (view full) --- 40 * When we notice that bm_flush > bm_write, we write out all pending updates 41 * to the bitmap, and advance bm_write to where bm_flush was. 42 * This may occasionally write a bit out twice, but is sure never to 43 * miss any bits. 44 */ 45 46#include <linux/blkdev.h> 47#include <linux/kthread.h> |
48#include <linux/raid/pq.h> |
|
48#include <linux/async_tx.h> 49#include <linux/seq_file.h> 50#include "md.h" 51#include "raid5.h" | 49#include <linux/async_tx.h> 50#include <linux/seq_file.h> 51#include "md.h" 52#include "raid5.h" |
52#include "raid6.h" | |
53#include "bitmap.h" 54 55/* 56 * Stripe cache 57 */ 58 59#define NR_STRIPES 256 60#define STRIPE_SIZE PAGE_SIZE --- 28 unchanged lines hidden (view full) --- 89 90#ifdef DEBUG 91#define inline 92#define __inline__ 93#endif 94 95#define printk_rl(args...) ((void) (printk_ratelimit() && printk(args))) 96 | 53#include "bitmap.h" 54 55/* 56 * Stripe cache 57 */ 58 59#define NR_STRIPES 256 60#define STRIPE_SIZE PAGE_SIZE --- 28 unchanged lines hidden (view full) --- 89 90#ifdef DEBUG 91#define inline 92#define __inline__ 93#endif 94 95#define printk_rl(args...) ((void) (printk_ratelimit() && printk(args))) 96 |
97#if !RAID6_USE_EMPTY_ZERO_PAGE 98/* In .bss so it's zeroed */ 99const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); 100#endif 101 | |
102/* 103 * We maintain a biased count of active stripes in the bottom 16 bits of 104 * bi_phys_segments, and a count of processed stripes in the upper 16 bits 105 */ 106static inline int raid5_bi_phys_segments(struct bio *bio) 107{ 108 return bio->bi_phys_segments & 0xffff; 109} --- 5038 unchanged lines hidden (view full) --- 5148 .check_reshape = raid5_check_reshape, 5149 .start_reshape = raid5_start_reshape, 5150#endif 5151 .quiesce = raid5_quiesce, 5152}; 5153 5154static int __init raid5_init(void) 5155{ | 97/* 98 * We maintain a biased count of active stripes in the bottom 16 bits of 99 * bi_phys_segments, and a count of processed stripes in the upper 16 bits 100 */ 101static inline int raid5_bi_phys_segments(struct bio *bio) 102{ 103 return bio->bi_phys_segments & 0xffff; 104} --- 5038 unchanged lines hidden (view full) --- 5143 .check_reshape = raid5_check_reshape, 5144 .start_reshape = raid5_start_reshape, 5145#endif 5146 .quiesce = raid5_quiesce, 5147}; 5148 5149static int __init raid5_init(void) 5150{ |
5156 int e; 5157 5158 e = raid6_select_algo(); 5159 if ( e ) 5160 return e; | |
5161 register_md_personality(&raid6_personality); 5162 register_md_personality(&raid5_personality); 5163 register_md_personality(&raid4_personality); 5164 return 0; 5165} 5166 5167static void raid5_exit(void) 5168{ --- 20 unchanged lines hidden --- | 5151 register_md_personality(&raid6_personality); 5152 register_md_personality(&raid5_personality); 5153 register_md_personality(&raid4_personality); 5154 return 0; 5155} 5156 5157static void raid5_exit(void) 5158{ --- 20 unchanged lines hidden --- |