[RFC PATCH 0/3] vfs, overlayfs: Fix syncfs() to return error

From: Vivek Goyal
Date: Wed Dec 16 2020 - 18:34:07 EST


Hi,

This is V2 of patches which tries to fix syncfs() for overlayfs to
return error code when sync_filesystem(upper_sb) returns error or
there are writeback errors on upper_sb.

I posted V1 of patch here.

https://lore.kernel.org/linux-fsdevel/20201216143802.GA10550@xxxxxxxxxx/

This is just compile tested patch series. Trying to get early feedback
to figure out what direction to move in to fix this issue.

Thanks
Vivek

Vivek Goyal (3):
vfs: add new f_op->syncfs vector
overlayfs: Implement f_op->syncfs() call
overlayfs: Check writeback errors w.r.t upper in ->syncfs()

fs/overlayfs/file.c | 1 +
fs/overlayfs/overlayfs.h | 3 +++
fs/overlayfs/ovl_entry.h | 2 ++
fs/overlayfs/readdir.c | 1 +
fs/overlayfs/super.c | 41 +++++++++++++++++++++++++++++++++++++++-
fs/sync.c | 29 +++++++++++++++++++---------
include/linux/fs.h | 1 +
7 files changed, 68 insertions(+), 10 deletions(-)

--
2.25.4