All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugang <hugang@soulinfo.com>
To: Jens Axboe <axboe@suse.de>
Cc: Bart Samwel <bart@samwel.tk>, Andrew Morton <akpm@osdl.org>,
	smackinlay@mail.com, Bartek Kania <mrbk@gnarf.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] laptop-mode-2.6.0 version 5
Date: Fri, 2 Jan 2004 17:02:34 +0800	[thread overview]
Message-ID: <20040102170234.66d6811d@localhost> (raw)
In-Reply-To: <20040101183545.GD5523@suse.de>

Organization: Beijing Soul
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; powerpc-unknown-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Thu, 1 Jan 2004 19:35:45 +0100
Jens Axboe <axboe@suse.de> wrote:

> Patch is obviously bogus, just look at the comm definition in sched.h:
> 
> 	char comm[16];
> 
> IO submission must happen in process context, so we also know that
> current is valid.

You are right. But why add this patch, My laptop not crash when I enable block dump, So I try to find where is the Bug. Final, The bug is in sector_t, I was enable CONFIG_LBD, So sector_t is u64, So We have to change the code when enable CONFIG_LBD.

I'd like the 2.4 style so add count number into printf.

Here is the patch fix it
+
+   if (unlikely(block_dump)) {
+       char b[BDEVNAME_SIZE];
+       printk("%s(%d): %s block %llu/%u on %s\n",
+           current->comm, current->pid,
+           (rw & WRITE) ? "WRITE" : (rw == READA ? "READA" : "READ"),
+           (u64)bio->bi_sector, count, bdevname(bio->bi_bdev,b));
+   }
+


I think, also have this bug in 2.4.23, here is the patch for it, Hope can helpful.
Index: linux-2.4.23/drivers/block/ll_rw_blk.c
===================================================================
--- linux-2.4.23/drivers/block/ll_rw_blk.c      (revision 4)
+++ linux-2.4.23/drivers/block/ll_rw_blk.c      (working copy)
@@ -1298,7 +1298,7 @@
                wake_up(&bh->b_wait);
 
        if (block_dump)
-               printk(KERN_DEBUG "%s: %s block %lu/%u on %s\n", current->comm, rw == WRITE ? "WRITE" : "READ", bh->b_rsector, count, kdevname(bh->b_rdev));
+               printk(KERN_DEBUG "%s: %s block %llu/%u on %s\n", current->comm, rw == WRITE ? "WRITE" : "READ", (u64)bh->b_rsector, count, kdevname(bh->b_rdev));
 
        put_bh(bh);
        switch (rw) {

-- 
Hu Gang / Steve
RLU#          : 204016 [1999] (Registered Linux user)
GPG Public Key: http://soulinfo.com/~hugang/HuGang.asc

       reply	other threads:[~2004-01-02 11:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031231210756.315.qmail@mail.com>
     [not found] ` <3FF3887C.90404@samwel.tk>
     [not found]   ` <20031231184830.1168b8ff.akpm@osdl.org>
     [not found]     ` <3FF43BAF.7040704@samwel.tk>
     [not found]       ` <3FF457C0.2040303@samwel.tk>
     [not found]         ` <20040101183545.GD5523@suse.de>
2004-01-02  9:02           ` Hugang [this message]
2004-01-02 11:27             ` [PATCH] laptop-mode-2.6.0 version 5 Jens Axboe
2004-01-02 11:38               ` Hugang
2004-01-02 12:03                 ` Jens Axboe
2004-01-04  9:52                   ` Peter Chubb
2004-01-04 10:31                     ` Jens Axboe
2004-03-29 15:42                     ` Jens Axboe
2004-03-29 15:42                   ` Peter Chubb
     [not found] <20040102025509.91753.qmail@mail.com>
2004-01-02 13:01 ` [PATCH] laptop-mode-2.6.0, " Bart Samwel
2004-01-02 21:05   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040102170234.66d6811d@localhost \
    --to=hugang@soulinfo.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=bart@samwel.tk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrbk@gnarf.org \
    --cc=smackinlay@mail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.