Re: [PATCH 4/5] readahead: backoff on I/O error

Andrew Morton
2006-06-12T03:43:48Z

On Mon, 12 Jun 2006 09:12:45 +0800
Wu Fengguang <wfg@mail.ustc.edu.cn> wrote:

> Andrew:
> I was a bit afraid about that because I have no CDROM to try it out.
> But since Michael has tested it OK, it should be OK for the stable kernel.

hm. It's a problem, but not a terribly huge one.

It's nice to print the filename, but we shouldn't use d_iname because long
filenames aren't stored there. And if the file was unlinked after open
then I don't think we'll oops, but the filename isn't very meaningful.

So...

--- devel/mm/filemap.c~readahead-backoff-on-i-o-error-tweaks 2006-06-11 20:40:52.000000000 -0700
+++ devel-akpm/mm/filemap.c 2006-06-11 20:41:05.000000000 -0700
@@ -804,8 +804,7 @@ static void shrink_readahead_size_eio(st
return;

ra->ra_pages /= 4;
- printk(KERN_WARNING "Retracting readahead size of %s to %luK\n",
- filp->f_dentry->d_iname,
+ printk(KERN_WARNING "Reducing readahead size to %luK\n",
ra->ra_pages << (PAGE_CACHE_SHIFT - 10));
}

_