From: "Vladimir V. Saveliev" <vs@namesys.com>
To: linux-kernel@vger.kernel.org, reiserfs-list@namesys.com
Subject: bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2
Date: Wed, 03 Oct 2001 16:17:54 +0400 [thread overview]
Message-ID: <3BBB01F2.F82BDB46@namesys.com> (raw)
Hi
It looks like something wrong happens with writing/reading to block
device using generic read/write functions when one does:
mke2fs /dev/hda1 (blocksize is 4096)
mount /dev/hda1
umount /dev/hda1
mke2fs /dev/hda1 - FAILS with
Warning: could not write 8 blocks in inode table starting at 492004:
Attempt to write block from filesystem resulted in short write
(note that /dev/hda1 should be big enough - 3gb is enogh for example)
Explanation of what happens (could be wrong and unclear):
blocksize of /dev/hda1 was 1024. So, /dev/hda1's inode->i_blkbits is set
to 10.
mount-ing used set_blocksize() to change blocksize to 4096 in
blk_size[][].
But inode of /dev/hda1 still has i_blkbits which makes
block_prepare_write to create buffers of 1024 bytes and call
blkdev_get_block for each of them.
fs/block_dev.c:/max_block calculates number of blocks on the device
using blk_size[][] and thinks that there are 4 times less blocks on the
device.
Thanks,
vs
PS: thanks to Elena <grev@namesys.botik.ru> for finding that
next reply other threads:[~2001-10-03 12:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-03 12:17 Vladimir V. Saveliev [this message]
2001-10-03 13:16 ` [PATCH] Re: bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2 Alexander Viro
2001-10-03 16:18 ` Linus Torvalds
2001-10-03 21:43 ` Alexander Viro
2001-10-03 21:56 ` Christoph Hellwig
2001-10-03 22:51 ` Alexander Viro
2001-10-03 19:55 ` Whining about 2.5 (was Re: [PATCH] Re: bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2) Rob Landley
2001-10-04 0:38 ` Rik van Riel
2001-10-03 22:27 ` Rob Landley
2001-10-04 20:53 ` Whining about 2.5 (was Re: [PATCH] Re: bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2O Alan Cox
2001-10-04 23:59 ` Whining about NUMA. :) [Was whining about 2.5...] Rob Landley
2001-10-05 14:51 ` Alan Cox
2001-10-08 17:57 ` Martin J. Bligh
2001-10-08 18:10 ` Alan Cox
2001-10-08 18:20 ` Martin J. Bligh
2001-10-08 18:31 ` Alan Cox
2001-10-08 18:35 ` Jesse Barnes
2001-10-08 18:55 ` Martin J. Bligh
2001-10-08 17:48 ` Marcelo Tosatti
2001-10-08 19:20 ` Martin J. Bligh
2001-10-08 19:12 ` Jesse Barnes
2001-10-08 19:37 ` Peter Rival
2001-10-04 23:39 ` NUMA & classzones (was Whining about 2.5) Martin J. Bligh
2001-10-04 23:55 ` Rob Landley
2001-10-05 17:29 ` Martin J. Bligh
2001-10-06 1:44 ` Jesse Barnes
2001-10-04 21:02 ` Whining about 2.5 (was Re: [PATCH] Re: bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2) Alan Cox
2001-10-03 21:09 ` Buffer cache confusion? Re: [reiserfs-list] bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2 Eric Whiting
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=3BBB01F2.F82BDB46@namesys.com \
--to=vs@namesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-list@namesys.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.