| Submitter | Daniel Fahlgren |
|---|---|
| Date | Dec. 13, 2011, 7:53 a.m. |
| Message ID | <1323762790.27828.30.camel@fahlgren-laptop> |
| Download | mbox | patch |
| Permalink | /patch/131031/ |
| State | New |
| Headers | show |
Comments
On Tue, 2011-12-13 at 08:53 +0100, Daniel Fahlgren wrote: > Neither the kernel nor the ubifs system is the latest, but the code in > ubifs_write_inode hasn't changed since 2008-something. > > Looking at the list there is another similar report[1] but that isn't in > the same place. Attached is a patch that fixes the problem for me. To be > honest is my local version slightly different and is checking for > inode->i_sb->s_flags & MS_RDONLY and not c->ro_mount. I'm not sure if it > is in the correct place regarding locks, or if the check should be in > ubifs_jnl_write instead. I think this patch fixes the symptom, not the real cause. Most probably it is a VFS bug in your kernel. If UBIFS is R/O, it should never have any dirty inodes, so there should be nothing to write! What is your kernel version? Can you enable generic UBIFS debugging and collect the UBIFS prints and send them? Use ignore_loglevel kernel argument when booting to make sure all UBIFS output goes to your console, otherwise you'll not see them there and they will end up in the ring buffer, and will probably overlap. Thanks!
Patch
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 20403dc..be472d1 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -301,6 +301,9 @@ static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc) if (is_bad_inode(inode)) return 0; + if (c->ro_mount) + return 0; + mutex_lock(&ui->ui_mutex); /* * Due to races between write-back forced by budgeting