* [d-kernel] PATCH: 2.6 fixes for fix-drivers-block and fix-build
@ 2004-10-23 9:36 Konstantin A. Lepikhov
0 siblings, 0 replies; only message in thread
From: Konstantin A. Lepikhov @ 2004-10-23 9:36 UTC (permalink / raw)
To: ALT Linux Kernel Devel Mailing List
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
Hi!
Найдено в -ck1 updates. Есть ли смысл их добавить?
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #2: buildfix.diff --]
[-- Type: text/plain, Size: 1882 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/10/18 22:43:26-07:00 torvalds@ppc970.osdl.org
# Wrap <linux/compiler.h> inside '#ifndef __ASSEMBLY__'
#
# None of the compatibility defines make sense for assembly
# files, and gcc has trouble with vararg macros when using
# "-traditional" (which is used for asm), to the point of
# ICE'ing.
#
# include/linux/compiler.h
# 2004/10/18 22:43:20-07:00 torvalds@ppc970.osdl.org +4 -2
# Wrap <linux/compiler.h> inside '#ifndef __ASSEMBLY__'
#
# None of the compatibility defines make sense for assembly
# files, and gcc has trouble with vararg macros when using
# "-traditional" (which is used for asm), to the point of
# ICE'ing.
#
Index: linux-2.6.9-ck1/include/linux/compiler.h
===================================================================
--- linux-2.6.9-ck1.orig/include/linux/compiler.h 2004-10-19 08:57:12.000000000 +1000
+++ linux-2.6.9-ck1/include/linux/compiler.h 2004-10-19 20:05:41.255008517 +1000
@@ -1,6 +1,8 @@
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H
+#ifndef __ASSEMBLY__
+
#ifdef __CHECKER__
# define __user __attribute__((noderef, address_space(1)))
# define __kernel /* default address space */
@@ -21,7 +23,6 @@ extern void __chk_io_ptr(void __iomem *)
#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
#if __GNUC__ > 3
# include <linux/compiler-gcc+.h> /* catch-all for GCC 4, 5, etc. */
#elif __GNUC__ == 3
@@ -31,7 +32,6 @@ extern void __chk_io_ptr(void __iomem *)
#else
# error Sorry, your compiler is too old/not recognized.
#endif
-#endif
/* Intel compiler defines __GNUC__. So we will overwrite implementations
* coming from above header files here
@@ -61,6 +61,8 @@ extern void __chk_io_ptr(void __iomem *)
(typeof(ptr)) (__ptr + (off)); })
#endif
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
/*
[-- Attachment #3: fix-bad-segment-coalescing-in-blk_recalc_rq_segments.patch --]
[-- Type: text/plain, Size: 1881 bytes --]
From: Jens Axboe <axboe@suse.de>
blk_recalc_rq_segments forgots to take ->max_segment_size into account and
gladly merges segments bigger than we can support, thus underestimating the
number of segments needed to fill it.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Index: linux-2.6.9-ck2/drivers/block/ll_rw_blk.c
===================================================================
--- linux-2.6.9-ck2.orig/drivers/block/ll_rw_blk.c 2004-10-22 10:34:33.000000000 +1000
+++ linux-2.6.9-ck2/drivers/block/ll_rw_blk.c 2004-10-22 21:46:27.286378575 +1000
@@ -2740,22 +2740,36 @@ void blk_recalc_rq_segments(struct reque
{
struct bio *bio, *prevbio = NULL;
int nr_phys_segs, nr_hw_segs;
+ unsigned int phys_size, hw_size;
+ request_queue_t *q = rq->q;
if (!rq->bio)
return;
- nr_phys_segs = nr_hw_segs = 0;
+ phys_size = hw_size = nr_phys_segs = nr_hw_segs = 0;
rq_for_each_bio(bio, rq) {
/* Force bio hw/phys segs to be recalculated. */
bio->bi_flags &= ~(1 << BIO_SEG_VALID);
- nr_phys_segs += bio_phys_segments(rq->q, bio);
- nr_hw_segs += bio_hw_segments(rq->q, bio);
+ nr_phys_segs += bio_phys_segments(q, bio);
+ nr_hw_segs += bio_hw_segments(q, bio);
if (prevbio) {
- if (blk_phys_contig_segment(rq->q, prevbio, bio))
+ int pseg = phys_size + prevbio->bi_size + bio->bi_size;
+ int hseg = hw_size + prevbio->bi_size + bio->bi_size;
+
+ if (blk_phys_contig_segment(q, prevbio, bio) &&
+ pseg <= q->max_segment_size) {
nr_phys_segs--;
- if (blk_hw_contig_segment(rq->q, prevbio, bio))
+ phys_size += prevbio->bi_size + bio->bi_size;
+ } else
+ phys_size = 0;
+
+ if (blk_hw_contig_segment(q, prevbio, bio) &&
+ hseg <= q->max_segment_size) {
nr_hw_segs--;
+ hw_size += prevbio->bi_size + bio->bi_size;
+ } else
+ hw_size = 0;
}
prevbio = bio;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-23 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-23 9:36 [d-kernel] PATCH: 2.6 fixes for fix-drivers-block and fix-build Konstantin A. Lepikhov
ALT Linux kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git