D5784: Add support for FreeBSD in FSUtils::getDirectoryFileSystem().
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Mon Apr 9 19:35:40 UTC 2018
bruns added a comment.
Restricted Application added a project: Baloo.
The whole function as currently used is pointless.
Currently, it sets the NO_COW flag on BTRFS, but this is insufficient:
- XFS - https://lwn.net/Articles/747633/
- F2FS
- Hammer2 ?
At least on Linux, the correct thing is to *try* to set the no_cow flag, and silently ignore any `EOPNOTSUPP` errors.
Thats what I get on Linux for:
- File without permission to write: `ioctl(3, FS_IOC_SETFLAGS, 0x7ffee879084c) = -1 EPERM (Operation not permitted)`
- On an old XFS: `ioctl(3, FS_IOC_SETFLAGS, 0x7fff8e52467c) = -1 EOPNOTSUPP (Operation not supported)`
- BTRFS: `ioctl(3, FS_IOC_SETFLAGS, 0x7fff06817a2c) = 0`
This way the code is future proof even when a new FS appears or an old one gains new features.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D5784
To: tcberner, #freebsd, kfunk, poboiko
Cc: bruns, adridg, kfunk, #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180409/03b4cab7/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list