On Mon, Apr 21, 2025 at 7:07 PM Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx> wrote: > > > > On 4/19/25 5:06 AM, Joanne Koong wrote: > > Use a bitfield for tracking initialized, blocked, aborted, and io_uring > > state of the fuse connection. Track connected state using a bool instead > > of an unsigned. > > > > On a 64-bit system, this shaves off 16 bytes from the size of struct > > fuse_conn. > > > > No functional changes. > > > > Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx> > > --- > > fs/fuse/fuse_i.h | 24 ++++++++++++------------ > > 1 file changed, 12 insertions(+), 12 deletions(-) > > > > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > > index b54f4f57789f..6aecada8aadd 100644 > > --- a/fs/fuse/fuse_i.h > > +++ b/fs/fuse/fuse_i.h > > @@ -690,24 +690,24 @@ struct fuse_conn { > > * active_background, bg_queue, blocked */ > > spinlock_t bg_lock; > > > > - /** Flag indicating that INIT reply has been received. Allocating > > - * any fuse request will be suspended until the flag is set */ > > - int initialized; > > - > > - /** Flag indicating if connection is blocked. This will be > > - the case before the INIT reply is received, and if there > > - are too many outstading backgrounds requests */ > > - int blocked; > > - > > /** waitq for blocked connection */ > > wait_queue_head_t blocked_waitq; > > > > /** Connection established, cleared on umount, connection > > abort and device release */ > > - unsigned connected; > > + bool connected; > > Why not also convert connected to bitfield? fuse_drop_waiting() checks the connected state locklessly through READ_ONCE(fc->connected). The smallest size READ_ONCE supports is a byte, I don't think it works on bitfields. Thanks, Joanne > > > -- > Thanks, > Jingbo