* it wasn't the first one. 'firstk' allows us
* to track which newline we actually use
*/
- int firstk = m[j].al;
+ int firstk = m[j].al+1;
if (words) {
m[j].hi = m[j].al;
break;
*/
for (k = m[j].al; k > 0; k--)
if (ends_line(af.list[m[j].a+k-1])) {
- if (firstk == m[j].al)
+ if (firstk >= m[j].al)
firstk = k;
newlines++;
if (newlines >= 3) {
* it wasn't the first one. 'firstk' allows us
* to track which newline we actually use
*/
- int firstk = 0;
+ int firstk = -1;
for (k = 0 ; k < m[j].al ; k++)
if (ends_line(af.list[m[j].a+k])) {
- if (firstk == 0)
+ if (firstk <= 0)
firstk = k;
newlines++;
if (newlines >= 3) {
break;
}
}
+ if (firstk >= 0 &&
+ m[j+1].type == Unmatched) {
+ /* If this Unmatched exceeds 3 lines, just stop here */
+ int p;
+ int nl = 0;
+ for (p = 0; p < m[j+1].al ; p++)
+ if (ends_line(af.list[m[j+1].a+p])) {
+ nl++;
+ if (nl > 3)
+ break;
+ }
+ if (nl > 3)
+ k = firstk;
+ }
if (k < m[j].al)
m[j].lo = k+1;
else
raid1_shrink_buffers(conf);
return -ENOMEM;
}
+|||||||
+ if (!sector_nr)
+ if (init_resync(conf))
+ return -ENOMEM;
+ /*
+=======
+ if (sector_nr >= max_sector) {
+ close_sync(conf);
+ return 0;
+ }
+
+ /*
+>>>>>>>
static void end_sync_read(struct buffer_head *bh, int uptodate)
{
raid1_free_buf(r1_bh);
sync_request_done(sect, mddev_to_conf(mddev));
md_done_sync(mddev,size>>9, uptodate);
-|||||||
- if (!sector_nr)
- if (init_resync(conf))
- return -ENOMEM;
- /*
- * If there is non-resync activity waiting for us then
- * put in a delay to throttle resync.
-=======
- if (sector_nr >= max_sector) {
- close_sync(conf);
- return 0;
- }
-
- /*
- * If there is non-resync activity waiting for us then
- * put in a delay to throttle resync.
->>>>>>>
}
}