[lkml]   [2015]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 :-).


 \ /
  Last update: 2015-10-25 18:21    [W:0.090 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site