[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151025195055.GA5021@gmail.com>
Date: Sun, 25 Oct 2015 19:50:55 +0000
From: Alexandru Moise <00moses.alexander00@...il.com>
To: Jeff Mahoney <jeffm@...e.com>
Cc: clm@...com, jbacik@...com, dsterba@...e.com,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: zero out delayed node upon allocation
> > This allows us to trim out half of btrfs_init_delayed_node() which
> > is now reduntant.
>
> It's redundant if kmem_cache_zalloc is used, but you haven't
> documented that doing so is now required. For all of these changes
> you've posted, if they're to be accepted, I'd really prefer to set up
> the slab with a constructor instead. Then we don't need to worry
> about such guarantees. The object returned via kmem_cache_alloc will
> always be properly initialized.
Well I wouldn't say it's *required* just makes this particular piece
of code neater, since we memset-zero the node's inode_item _anyways_.
I like the constructor idea though, do you suggest I should invest in
that idea?
>
> This makes assumptions about atomic_t and what atomic_set does that
> aren't guaranteed to be true. When accessors/mutators are part of the
> API they should be used.
>
> - -Jeff
You're right, taking out that atomic_set was really stupid. I'll
resent the patch with a proper explanation in the commit message and
put the atomic_set back.
Unless you feel that the change is rather pointless, I'll gladly back
off :-).
Regards,
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists