Re: [LSF/MM TOPIC] Direct block mapping through fs for device

Matthew Wilcox
2019-05-02T01:52:18Z

On Mon, Apr 29, 2019 at 09:26:45AM -0400, Jerome Glisse wrote:
> This is a filesystem opt-in feature if a given filesystem do not want
> to implement it then just do not implement it and it will use page
> cache. It is not mandatory i am not forcing anyone. The first reasons
> for those are not filesystem but mmap of device file. But as LSF/MM
> is up i thought it would be a good time to maybe propose that for file-
> system too. If you do not want that for your filesystem then just NAK
> any patch that add that to filesystem you care about.

No. This is stupid, broken, and wrong. I know we already have
application-visible differences between filesystems, and every single one
of those is a bug. They may be hard bugs to fix, they may be bugs that we
feel like we can't fix, they may never be fixed. But they are all bugs.

Applications should be able to work on any Linux filesystem without
having to care what it is. Code has a tendency to far outlive its
authors expectations (and indeed sometimes its authors). If 'tar' had
an #ifdef XFS / #elsif EXT4 / #elsif BTRFS / ... #endif, that would be
awful.

We need the same semantics across all major filesystems. Anything else
is us making application developers lives harder than necessary, and
that's unacceptable.