Re: [PATCH 2.5] Report write errors to applications

From: Andrew Morton (akpm@digeo.com)
Date: Wed Jan 29 2003 - 16:42:05 EST


Oliver Xymoron <oxymoron@waste.org> wrote:
>
> > - fsync_buffers_list() will handle them and will return errors to the fsync()
> > caller. We only need to handle those buffers which were stripped
> > asynchronously by VM activity.
>
> Are we guaranteed that we'll get a try_to_free_buffers after IO
> completion and before sync? I haven't dug through this path much.

Think so. That's the only place where buffers are detached. Otherwise,
fsync_buffers_list() looks at them all.

There's also the prune_icache() buffer-stripper remove_inode_buffers().
Nobody knows about the inode by that time, but there's a chance that the
inode will be rescued before it is thrown away, so remove_inode_buffers()
should propagate errors into the address_space as well.

> Another 2.5 change I hadn't noticed. Ok, will look at that. I haven't
> come up with a good test for the writepage ENOSPC, thoughts?

See kswapd-writepage.c from
http://www.zip.com.au/~akpm/linux/patches/2.5/ext3-tools.tar.gz

If you run that over a filesystem which has only a few K of space, apply
memory pressure while it is sleeping then data loss will ensue.

hm, there's also enospc-writepage.c which is designed to exactly demonstrate
this problem.

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



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:23 EST