[PATCH] erofs: fix file-backed mounts over FUSE
Al Viro
viro at zeniv.linux.org.uk
Thu Nov 14 17:34:22 AEDT 2024
On Thu, Nov 14, 2024 at 02:23:27PM +0800, Gao Xiang wrote:
> > 3) AFAICS, (buf->kmap_type == EROFS_KMAP) == (buf->base != NULL). What's
> > the point of having that as a separate field?
>
> Once buf->kmap_type has EROFS_KMAP and EROFS_KMAP_ATOMIC, but it
> seems that it can be cleaned up now.
>
> I will clean up later but it's a seperate story.
>
> >
> > 4) Why bother with union? Just have buf->file serve as your buf->use_fp
> > and be done with that...
>
> I'd like to leave `struct erofs_buf` as small as possible since
> it's on stack.
enum + bool eats at least as much as a pointer, and if it's on stack...
an extra word is really noise - it's not as if you had a plenty of
those in the current call chain at any given point.
More information about the Linux-erofs
mailing list