[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0a82d4fc-3b2c-4b04-a0ee-539bf6896c6f@linux.alibaba.com>
Date: Thu, 14 Nov 2024 14:38:46 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: linux-erofs@...ts.ozlabs.org, LKML <linux-kernel@...r.kernel.org>,
syzbot+0b1279812c46e48bb0c1@...kaller.appspotmail.com
Subject: Re: [PATCH] erofs: fix file-backed mounts over FUSE
On 2024/11/14 14:34, Al Viro wrote:
> 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.
Yeah, enum can be avoided now, I will clean up this enum
as a seperate effort.
Thanks,
Gao Xiang
Powered by blists - more mailing lists