[PATCHSET 0/4] vfs: actually return fs errors from ->sync_fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

While auditing the VFS code, I noticed that while ->sync_fs is allowed
to return error codes to reflect some sort of internal filesystem error,
none of the callers actually check the return value.  Back when this
callout was introduced for sync_filesystem in 2.5 this didn't matter
because we only did it prior to rebooting, and best-effort was enough.

Nowadays, we've grown other callers that mandate persistence of fs
metadata, like syncfs(2) and quota sync.  Reporting internal fs errors
is critical for these functions, and we drop the errors.  Fix them, and
also fix FIFREEZE, so that userspace can't freeze broken filesystems.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=return-sync-fs-errors-5.17
---
 fs/quota/dquot.c   |   11 ++++++++---
 fs/super.c         |   19 ++++++++++++-------
 fs/sync.c          |   18 ++++++++++++------
 fs/xfs/xfs_super.c |    6 +++++-
 4 files changed, 37 insertions(+), 17 deletions(-)




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux