All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Whiting <ewhiting@amis.com>
To: linux-kernel@vger.kernel.org,
	"jfs-discussion@oss.software.ibm.com" 
	<jfs-discussion@www-124.southbury.usf.ibm.com>
Cc: reiserfs-list@namesys.com, Chris Mason <mason@suse.com>
Subject: Buffer cache confusion? Re: [reiserfs-list] bug? in using generic  read/write functions to read/write block devices in 2.4.11-pre2
Date: Wed, 03 Oct 2001 15:09:32 -0600	[thread overview]
Message-ID: <3BBB7E8C.89B78444@amis.com> (raw)
In-Reply-To: <3BBB01F2.F82BDB46@namesys.com>



I see a similar odd failure with jfs in 2.4.11pre1. Is this related to
the 2.4.11preX buffer cache improvements?

eric


# uname -a
2.4.11-pre1 #1 SMP Tue Oct 2 12:28:07 MDT 2001 i686
# mkfs.jfs /dev/hdc3
mkfs.jfs development version: $Name: v1_0_6 $
Warning!  All data on device /dev/hdc3 will be lost!
Continue? (Y/N) Y
Format completed successfully.
10241436 kilobytes total disk space.
# mount -t jfs /dev/hdc3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/hdc3,
        or too many mounted file systems


"Vladimir V. Saveliev" wrote:
> 
> 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

      parent reply	other threads:[~2001-10-03 21:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-03 12:17 bug? in using generic read/write functions to read/write block devices in 2.4.11-pre2 Vladimir V. Saveliev
2001-10-03 13:16 ` [PATCH] " 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 ` Eric Whiting [this message]

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=3BBB7E8C.89B78444@amis.com \
    --to=ewhiting@amis.com \
    --cc=jfs-discussion@www-124.southbury.usf.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    --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.