Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 580505 Details for
Bug 816335
btrfs panic mounting filesystem
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
possible fix
fedora.patch (text/plain), 3.12 KB, created by
Josef Bacik
on 2012-04-26 15:02:46 UTC
(
hide
)
Description:
possible fix
Filename:
MIME Type:
Creator:
Josef Bacik
Created:
2012-04-26 15:02:46 UTC
Size:
3.12 KB
patch
obsolete
>commit 524988b17726d8ca208fc7667e2a2444996d6e3a >Author: Josef Bacik <josef@dhcp231-144.rdu.redhat.com> >Date: Thu Apr 26 10:59:46 2012 -0400 > > - Fix btrfs mount failures after mkfs (rhbz 816335) > >diff --git a/btrfs-flush-before-mount.patch b/btrfs-flush-before-mount.patch >new file mode 100644 >index 0000000..822a95a >--- /dev/null >+++ b/btrfs-flush-before-mount.patch >@@ -0,0 +1,51 @@ >+commit 3c4bb26b213e618473e486776483a5bad15ba6da >+Author: Chris Mason <chris.mason@oracle.com> >+Date: Tue Mar 27 18:56:56 2012 -0400 >+ >+ Btrfs: flush out and clean up any block device pages during mount >+ >+ Btrfs puts the filesystem metadata into its own address space, and >+ somehow the block device address space isn't getting onto disk properly >+ before a mount. The end result is that a loop of mkfs and mounting the >+ filesystem will sometimes find stale or incorrect data. >+ >+ This commit should fix it by sprinkling fdatawrites and invalidate_bdev >+ calls around. This is a short term measure to make sure it is fixed. >+ The block devices really should be flushed and cleaned up higher in the >+ stack. >+ >+ Signed-off-by: Chris Mason <chris.mason@oracle.com> >+ >+diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c >+index 7b55eee..fd43f6b 100644 >+--- a/fs/btrfs/disk-io.c >++++ b/fs/btrfs/disk-io.c >+@@ -2031,6 +2031,7 @@ int open_ctree(struct super_block *sb, >+ __setup_root(4096, 4096, 4096, 4096, tree_root, >+ fs_info, BTRFS_ROOT_TREE_OBJECTID); >+ >++ invalidate_bdev(fs_devices->latest_bdev); >+ bh = btrfs_read_dev_super(fs_devices->latest_bdev); >+ if (!bh) { >+ err = -EINVAL; >+diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c >+index 68a1754..a872b48 100644 >+--- a/fs/btrfs/volumes.c >++++ b/fs/btrfs/volumes.c >+@@ -622,6 +622,8 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, >+ printk(KERN_INFO "open %s failed\n", device->name); >+ goto error; >+ } >++ filemap_write_and_wait(bdev->bd_inode->i_mapping); >++ invalidate_bdev(bdev); >+ set_blocksize(bdev, 4096); >+ >+ bh = btrfs_read_dev_super(bdev); >+@@ -1354,6 +1356,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) >+ } >+ >+ set_blocksize(bdev, 4096); >++ invalidate_bdev(bdev); >+ bh = btrfs_read_dev_super(bdev); >+ if (!bh) { >+ ret = -EINVAL; >diff --git a/kernel.spec b/kernel.spec >index 980f151..4db84e6 100644 >--- a/kernel.spec >+++ b/kernel.spec >@@ -812,6 +812,9 @@ Patch22012: ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.pat > > Patch22013: perf-fix-build-breakage.patch > >+#rhbz 816335 >+Patch22014: btrfs-flush-before-mount.patch >+ > # END OF PATCH DEFINITIONS > > %endif >@@ -1377,7 +1380,7 @@ ApplyPatch ext4-fix-resize-when-resizing-within-single-group.patch > # xfs > > # btrfs >- >+ApplyPatch btrfs-flush-before-mount.patch > > # eCryptfs > >@@ -2431,6 +2434,9 @@ fi > # '-' | | > # '-' > %changelog >+* Thu Apr 26 2012 Josef Bacik <josef@toxicpanda.com> >+- Add patch to fix btrfs problems after mks (rhbz 816335) >+ > * Tue Apr 24 2012 Josh Boyer <jwboyer@redhat.com> > - Add patch to fix perf build due to incorrect cherry-pick in 3.3.3 > - Add patch to fix ipw2200 (rhbz 802106)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 816335
: 580505