Project

General

Profile

Actions

Submit #2912

closed

Don't implement .vfs_sync for nothing

Added by tkusumi over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/09/2016
Due date:
% Done:

0%

Estimated time:

Description

https://leaf.dragonflybsd.org/~tkusumi/diff/0001-sys-kern-Don-t-implement-.vfs_sync-for-nothing.patch

The only reason filesystems without requirement of syncing
(e.g. no backing storage) need to implement .vfs_sync is because
those fs need a sync with return value of 0 on unmount.

If vfs allows sync with return value of EOPNOTSUPP, then those
fs no longer have to implement .vfs_sync with vfs_stdsync() only
to pass dounmount().

  1. grep "\.vfs_sync" sys/vfs sys/gnu/vfs -rI | grep vfs_stdsync
    sys/vfs/udf/udf_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/portal/portal_vfsops.c: .vfs_sync = vfs_stdsync
    sys/vfs/devfs/devfs_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/isofs/cd9660/cd9660_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/tmpfs/tmpfs_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/dirfs/dirfs_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/ntfs/ntfs_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/procfs/procfs_vfsops.c: .vfs_sync = vfs_stdsync
    sys/vfs/hpfs/hpfs_vfsops.c: .vfs_sync = vfs_stdsync,
    sys/vfs/nullfs/null_vfsops.c: .vfs_sync = vfs_stdsync,

The drawback is when there is a sync (other than vfs_stdnosync)
that returns EOPNOTSUPP for real errors. The existing fs in
DragonFly don't do this (and shouldn't either).

Actions #1

Updated by tkusumi over 8 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF