Re: [RFC PATCH 0/4] fs: introduce new writeback error tracking infrastructure and convert ext4 to use it
From: Matthew Wilcox
Date: Mon Apr 03 2017 - 10:51:25 EST
On Mon, Apr 03, 2017 at 02:25:11PM +1000, NeilBrown wrote:
> I don't like that you need to add a 'flush' handler to every filesystem,
> most of which just call
> + return filemap_report_wb_error(file);
>
> Could we just have
> if (filp->f_op->flush)
> retval = filp->f_op->flush(filp, id);
> + else
> + retval = filemap_report_wb_error(filp);
> in flip_close() ??
Maybe this is badly named as ext4_flush_file(). Maybe this should be
generic_flush_file(), and then there's no per-filesystem overhead to this?