Re: [PATCH 7/7] reiserfs: propagate issue-flush error code

From: Bartlomiej Zolnierkiewicz
Date: Mon Mar 30 2009 - 11:24:07 EST


On Monday 30 March 2009, Fernando Luis Vázquez Cao wrote:
> blkdev_issue_flush() may fail (i.e. due to media error on FLUSH CACHE
> command execution) so its users should check for the return value.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@xxxxxxxxxxxxx>
> ---
>
> diff -urNp linux-2.6.29-orig/fs/reiserfs/file.c linux-2.6.29/fs/reiserfs/file.c
> --- linux-2.6.29-orig/fs/reiserfs/file.c 2009-03-24 08:12:14.000000000 +0900
> +++ linux-2.6.29/fs/reiserfs/file.c 2009-03-30 16:19:19.000000000 +0900
> @@ -146,8 +146,9 @@ static int reiserfs_sync_file(struct fil
> reiserfs_write_lock(p_s_inode->i_sb);
> barrier_done = reiserfs_commit_for_inode(p_s_inode);
> reiserfs_write_unlock(p_s_inode->i_sb);
> - if (barrier_done != 1 && reiserfs_barrier_flush(p_s_inode->i_sb))
> - blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL);
> + if (!n_err && barrier_done != 1 &&
> + reiserfs_barrier_flush(p_s_inode->i_sb))
> + n_err = block_flush_device(p_s_inode->i_sb->s_bdev);

This is again different from my original patch
(the change in behavior should be documented).

Thanks,
Bart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/