Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127925
b: refs/heads/master
c: 2a21e37
h: refs/heads/master
i:
  127923: afc8621
v: v3
  • Loading branch information
Theodore Ts'o committed Nov 5, 2008
1 parent 0718c01 commit 1e9d244
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97df5d155dee478efe33b001f502e9630e1bba92
refs/heads/master: 2a21e37e48b94388f2cc8c0392f104f5443d4bb8
16 changes: 15 additions & 1 deletion trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,20 @@ static int ext4_da_writepages(struct address_space *mapping,
*/
if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
return 0;

/*
* If the filesystem has aborted, it is read-only, so return
* right away instead of dumping stack traces later on that
* will obscure the real source of the problem. We test
* EXT4_MOUNT_ABORT instead of sb->s_flag's MS_RDONLY because
* the latter could be true if the filesystem is mounted
* read-only, and in that case, ext4_da_writepages should
* *never* be called, so if that ever happens, we would want
* the stack trace.
*/
if (unlikely(sbi->s_mount_opt & EXT4_MOUNT_ABORT))
return -EROFS;

/*
* Make sure nr_to_write is >= sbi->s_mb_stream_request
* This make sure small files blocks are allocated in
Expand Down Expand Up @@ -2441,7 +2455,7 @@ static int ext4_da_writepages(struct address_space *mapping,
handle = ext4_journal_start(inode, needed_blocks);
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
printk(KERN_EMERG "%s: jbd2_start: "
printk(KERN_CRIT "%s: jbd2_start: "
"%ld pages, ino %lu; err %d\n", __func__,
wbc->nr_to_write, inode->i_ino, ret);
dump_stack();
Expand Down

0 comments on commit 1e9d244

Please sign in to comment.