From: Andrew Morton <akpm@osdl.org>
To: olh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: very low performance on SCSI disks if device node is in tmpfs
Date: Tue, 25 May 2004 15:41:07 -0700 [thread overview]
Message-ID: <20040525154107.053b9ef6.akpm@osdl.org> (raw)
In-Reply-To: <20040525145923.68af0ad8.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> wrote:
>
> Everything there is consistent with "not doing readahead".
>
We need to set file->f_ra _after_ calling blkdev_open(), when inode->i_mapping
points at the right thing. And we need to get it from
inode->i_mapping->host->i_mapping too, which represents the underlying device.
--- 25/fs/open.c~blockdev-readahead-fix Tue May 25 15:38:15 2004
+++ 25-akpm/fs/open.c Tue May 25 15:38:15 2004
@@ -790,7 +790,6 @@ struct file *dentry_open(struct dentry *
}
f->f_mapping = inode->i_mapping;
- file_ra_state_init(&f->f_ra, f->f_mapping);
f->f_dentry = dentry;
f->f_vfsmnt = mnt;
f->f_pos = 0;
@@ -804,6 +803,8 @@ struct file *dentry_open(struct dentry *
}
f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
+ file_ra_state_init(&f->f_ra, f->f_mapping->host->i_mapping);
+
/* NB: we're sure to have correct a_ops only after f_op->open */
if (f->f_flags & O_DIRECT) {
if (!f->f_mapping || !f->f_mapping->a_ops ||
_
next prev parent reply other threads:[~2004-05-25 22:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-25 18:47 Olaf Hering
2004-05-25 19:14 ` Richard B. Johnson
2004-05-25 19:34 ` Olaf Hering
2004-05-25 19:44 ` Richard B. Johnson
2004-05-25 20:02 ` Oliver Neukum
2004-05-25 21:48 ` Andrew Morton
2004-05-25 21:57 ` Richard B. Johnson
2004-05-25 21:59 ` Andrew Morton
2004-05-25 22:41 ` Andrew Morton [this message]
2004-05-26 0:05 ` Linus Torvalds
2004-05-26 0:10 ` viro
2004-05-26 0:14 ` Andrew Morton
2004-05-26 9:53 ` Olaf Hering
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=20040525154107.053b9ef6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olh@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®