On Thu, Jun 02, 2011 at 09:36:43PM +0300, Sergei Trofimovich wrote:
> ...
> > @@ -801,6 +800,15 @@ static struct dentry *btrfs_mount(struct 
> > file_system_type *fs_type, int flags,
> >     fs_info->fs_devices = fs_devices;
> >     tree_root->fs_info = fs_info;
> >  
> > +   fs_info->super_copy = kzalloc(sizeof(struct btrfs_super_block),
> > +                   GFP_NOFS);
> > +   fs_info->super_for_commit = kzalloc(sizeof(struct btrfs_super_block),
> > +                   GFP_NOFS);
> 
> In light of 
> http://thread.gmane.org/gmane.comp.file-systems.btrfs/11004/focus=11038
> what do you think of allocating BTRFS_SUPER_INFO_SIZE instead of sizeof?

that it's absolutely correct fix. Although allocator would provide a 4kb
buffer (slab) and the rest of the 2.5-4kb space would remain untouched,
this could bite later, when this assumption would not hold.

Passed through xfstests and a few fs_mark rounds.
Patch updated in git://repo.or.cz/linux-2.6/btrfs-unstable.git #cleanups


david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to