From: GOTO Masanori <gotom@debian.org>
To: viro@math.psu.edu
Cc: gotom@debian.org, torvalds@transmeta.com,
marcelo@conectiva.com.br, linux-kernel@vger.kernel.org,
andrea@suse.de
Subject: Re: [PATCH] direct IO breaks root filesystem
Date: Tue, 11 Dec 2001 20:30:40 +0900 [thread overview]
Message-ID: <w531yi2ngdb.wl@megaela.fe.dis.titech.ac.jp> (raw)
In-Reply-To: In your message of "Tue, 11 Dec 2001 04:13:06 -0500 (EST)" <Pine.GSO.4.21.0112110411540.16630-100000@binet.math.psu.edu>
In-Reply-To: <w534rmynn77.wl@megaela.fe.dis.titech.ac.jp> <Pine.GSO.4.21.0112110411540.16630-100000@binet.math.psu.edu>
At Tue, 11 Dec 2001 04:13:06 -0500 (EST),
Alexander Viro <viro@math.psu.edu> wrote:
> > + /*
> > + * If inode is BLK and it is not already mounted,
> > + * blocksize change hardsect_size.
> > + */
> > + if (S_ISBLK(inode->i_mode) && !is_mounted(inode->i_rdev)) {
>
> That's obviously wrong. What's to stop it from getting mounted
> right after that check?
Ah! You're right. I was confused, I'm sorry.
New patch is here (and works well)... Ugh.
--- linux-2.4.17-pre8.vanilla/mm/filemap.c Tue Dec 11 15:54:57 2001
+++ linux-2.4.17-pre8/mm/filemap.c Tue Dec 11 19:36:09 2001
@@ -1508,8 +1508,21 @@
new_iobuf = 1;
}
- blocksize = 1 << inode->i_blkbits;
- blocksize_bits = inode->i_blkbits;
+ /*
+ * If inode is block device, blocksize is set as hardsect_size.
+ */
+ if (S_ISBLK(inode->i_mode)) {
+ int size;
+
+ size = get_hardsect_size(inode->i_rdev);
+ blocksize = size;
+ for (blocksize_bits = 0; !(size & 1); )
+ size >>= 1, blocksize_bits++;
+ } else {
+ blocksize = 1 << inode->i_blkbits;
+ blocksize_bits = inode->i_blkbits;
+ }
+
blocksize_mask = blocksize - 1;
chunk_size = KIO_MAX_ATOMIC_IO << 10;
-- gotom
next prev parent reply other threads:[~2001-12-11 11:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <w53bsh9ybtn.wl@megaela.fe.dis.titech.ac.jp>
2001-12-10 3:59 ` GOTO Masanori
2001-12-10 5:55 ` Linus Torvalds
2001-12-10 12:39 ` GOTO Masanori
2001-12-10 14:40 ` Andrea Arcangeli
2001-12-10 17:10 ` Linus Torvalds
2001-12-11 9:03 ` GOTO Masanori
2001-12-11 9:13 ` Alexander Viro
2001-12-11 11:30 ` GOTO Masanori [this message]
2001-12-11 17:26 ` Linus Torvalds
2001-12-11 17:37 ` Linus Torvalds
2001-12-11 18:03 ` Martin Dalecki
2001-12-12 0:25 ` Tachino Nobuhiro
2001-12-12 0:34 ` Linus Torvalds
2001-12-12 0:51 ` Tachino Nobuhiro
2001-12-12 1:46 ` Linus Torvalds
2001-12-12 3:25 ` GOTO Masanori
2001-12-12 16:20 ` Marcelo Tosatti
2001-12-12 2:46 ` Tachino Nobuhiro
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=w531yi2ngdb.wl@megaela.fe.dis.titech.ac.jp \
--to=gotom@debian.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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®