From: Chris Mason <chris.mason@oracle.com>
To: "Martin Bürger" <mbuerger@edu.uni-klu.ac.at>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: different oops
Date: Fri, 03 Oct 2008 12:40:35 -0400 [thread overview]
Message-ID: <1223052035.13375.27.camel@think.oraclecorp.com> (raw)
In-Reply-To: <200810031814.06897.mbuerger@edu.uni-klu.ac.at>
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
On Fri, 2008-10-03 at 18:14 +0200, Martin Bürger wrote:
> Hi,
> I'm using the sources from [1] which I checked out today. When
> testing the file system with compilebench [2] I traced oops [3]
> (with 2 cores, SMP), [4] (single core), [5] (no smp) and [6]
> (no-preemt).
>
> [1]
> git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
> [2] http://oss.oracle.com/~mason/compilebench/
> [3] http://rafb.net/p/1hUnky34.html
> [4] http://rafb.net/p/kEGqY199.html
> [5] http://rafb.net/p/pAHJrV88.html
> [6] http://rafb.net/p/tkz92m77.html
Hello,
This is a long standing bug that so far we've only heard about on gentoo
installs. Could you please give the attached patch a try against your
sources?
-chris
[-- Attachment #2: flush-on-mount.diff --]
[-- Type: text/x-patch, Size: 1802 bytes --]
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0be044b..726aaf6 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1482,6 +1482,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
__setup_root(4096, 4096, 4096, 4096, tree_root,
fs_info, BTRFS_ROOT_TREE_OBJECTID);
+ filemap_write_and_wait(fs_devices->latest_bdev->bd_inode->i_mapping);
bh = __bread(fs_devices->latest_bdev,
BTRFS_SUPER_INFO_OFFSET / 4096, 4096);
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f63cf76..9555408 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -361,8 +361,12 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
list_for_each(cur, head) {
device = list_entry(cur, struct btrfs_device, dev_list);
- if (device->bdev)
+ if (device->bdev) {
+ struct address_space *mapping;
+ mapping = device->bdev->bd_inode->i_mapping;
+ filemap_write_and_wait(mapping);
continue;
+ }
if (!device->name)
continue;
@@ -374,6 +378,7 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
goto error;
}
set_blocksize(bdev, 4096);
+ filemap_write_and_wait(bdev->bd_inode->i_mapping);
bh = __bread(bdev, BTRFS_SUPER_INFO_OFFSET / 4096, 4096);
if (!bh)
@@ -442,6 +447,8 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder,
ret = set_blocksize(bdev, 4096);
if (ret)
goto error_close;
+
+ filemap_write_and_wait(bdev->bd_inode->i_mapping);
bh = __bread(bdev, BTRFS_SUPER_INFO_OFFSET / 4096, 4096);
if (!bh) {
ret = -EIO;
@@ -951,6 +958,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
goto out;
}
+ filemap_write_and_wait(bdev->bd_inode->i_mapping);
bh = __bread(bdev, BTRFS_SUPER_INFO_OFFSET / 4096, 4096);
if (!bh) {
ret = -EIO;
next prev parent reply other threads:[~2008-10-03 16:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 16:14 different oops Martin Bürger
2008-10-03 16:40 ` Chris Mason [this message]
2008-10-03 17:10 ` Martin Bürger
2008-10-03 19:07 ` Chris Mason
2008-10-03 17:16 ` Andrea Gelmini
2008-10-03 17:59 ` Chris Mason
2008-10-03 18:03 ` Andrea Gelmini
2008-10-03 20:22 ` Martin Bürger
2008-10-03 20:26 ` Chris Mason
2008-10-03 22:09 ` Andrea Gelmini
2008-10-04 0:15 ` Andrea Gelmini
2008-10-04 0:30 ` Chris Mason
2008-10-04 0:31 ` Chris Mason
2008-10-04 3:41 ` Jeff Schroeder
2008-10-04 17:27 ` Chris Mason
2008-10-07 11:31 ` Andrea Gelmini
2008-10-07 12:56 ` Chris Mason
2008-10-07 15:04 ` Andrea Gelmini
2008-10-07 16:03 ` Chris Mason
2008-10-07 16:36 ` Andrea Gelmini
2008-10-08 21:51 ` Andrea Gelmini
2008-10-09 0:11 ` Chris Mason
[not found] ` <9cdbb57f0810090120v6381ab0eg5377039b0065e68@mail.gmail.com>
[not found] ` <1223575532.14090.39.camel@think.oraclecorp.com>
2008-10-10 8:43 ` Andrea Gelmini
[not found] ` <48EE6B50.6090102@oracle.com>
2008-10-10 8:45 ` Andrea Gelmini
2008-10-10 10:49 ` Andrea Gelmini
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=1223052035.13375.27.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mbuerger@edu.uni-klu.ac.at \
/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