* [PATCH 1/2] jbd: Check return value of blkdev_issue_flush()
@ 2012-07-09 21:45 Jan Kara
2012-07-09 21:45 ` [PATCH 2/2] ext3: " Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2012-07-09 21:45 UTC (permalink / raw)
To: linux-ext4; +Cc: Jan Kara
blkdev_issue_flush() can fail. Make sure the error gets properly propagated.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/jbd/recovery.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
I have queued this patch in my tree and plan to send it to Linus in the
next merge window.
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c
index 008bf06..a748fe2 100644
--- a/fs/jbd/recovery.c
+++ b/fs/jbd/recovery.c
@@ -265,8 +265,11 @@ int journal_recover(journal_t *journal)
if (!err)
err = err2;
/* Flush disk caches to get replayed data on the permanent storage */
- if (journal->j_flags & JFS_BARRIER)
- blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
+ if (journal->j_flags & JFS_BARRIER) {
+ err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
+ if (!err)
+ err = err2;
+ }
return err;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] ext3: Check return value of blkdev_issue_flush()
2012-07-09 21:45 [PATCH 1/2] jbd: Check return value of blkdev_issue_flush() Jan Kara
@ 2012-07-09 21:45 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2012-07-09 21:45 UTC (permalink / raw)
To: linux-ext4; +Cc: Jan Kara
blkdev_issue_flush() can fail. Make sure the error gets properly propagated.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext3/fsync.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
I have queued this patch in my tree and plan to send it to Linus in the
next merge window.
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c
index d4dff27..b31dbd4 100644
--- a/fs/ext3/fsync.c
+++ b/fs/ext3/fsync.c
@@ -92,8 +92,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
* disk caches manually so that data really is on persistent
* storage
*/
- if (needs_barrier)
- blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
+ if (needs_barrier) {
+ int err;
+
+ err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
+ if (!ret)
+ ret = err;
+ }
out:
trace_ext3_sync_file_exit(inode, ret);
return ret;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-09 21:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 21:45 [PATCH 1/2] jbd: Check return value of blkdev_issue_flush() Jan Kara
2012-07-09 21:45 ` [PATCH 2/2] ext3: " Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).