Deleted Added
sdiff udiff text old ( 256281 ) new ( 260385 )
full compact
1/*-
2 * Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/10/sys/geom/raid/tr_raid5.c 260385 2014-01-07 01:32:23Z scottl $");
29
30#include <sys/param.h>
31#include <sys/bio.h>
32#include <sys/endian.h>
33#include <sys/kernel.h>
34#include <sys/kobj.h>
35#include <sys/limits.h>
36#include <sys/lock.h>

--- 282 unchanged lines hidden (view full) ---

319 no += imax(0, pno + pdisks - vol->v_disks_count);
320 offset += strip_size;
321 }
322 }
323 remain -= length;
324 addr += length;
325 start = 0;
326 } while (remain > 0);
327 while ((cbp = bioq_takefirst(&queue)) != NULL) {
328 sd = cbp->bio_caller1;
329 cbp->bio_caller1 = NULL;
330 g_raid_subdisk_iostart(sd, cbp);
331 }
332 return;
333failure:
334 while ((cbp = bioq_takefirst(&queue)) != NULL)
335 g_destroy_bio(cbp);
336 if (bp->bio_error == 0)
337 bp->bio_error = ENOMEM;
338 g_raid_iodone(bp, bp->bio_error);
339}
340
341static void
342g_raid_tr_iostart_raid5(struct g_raid_tr_object *tr, struct bio *bp)
343{

--- 78 unchanged lines hidden ---